<?php $classpath="/213/"; include "../../classes/1.h"; ?>
<title>
10.7 - Optimization
</title>
<meta name="week" content="">

<!--meta name="nolink" content="nolink"-->
<?php include "../../classes/2.h" ?>
<h1>10.7 Maxima / minima / other</h1>

<p>For the function $f(x,y)=2 x^2 + y^2 - 4 x y - 20 y + 3$

<ol type="a" class="space">
<li>Compute the following derivatives:<br>
<br>
$f_x (x,y)$ =<span class="justme">$2*2x+0-4y-0+0=$<span class="answer">$4x-4y$</span></span>
<br><br><br><br>
$f_y(x,y)$ =<span class="justme">$0+2y-4x-20+0=$<span class="answer">$2y-4x-20$</span></span><br><br><br><br>
$f_{xx}(x,y)$ =<span class="justme">$\frac{\del}{\del x}(4x-4y)=$<span class="answer">4</span></span><br><br><br><br>
$f_{yy}(x,y)$ =<span class="justme">$\frac{\del}{\del y}(2y-4x-20)=$<span class="answer">2</span></span>
<br><br><br><br>

$f_{xy}(x,y)$ =<span class="justme">$\frac{\del}{\del y}(f_x)=\frac{\del}{\del y}(4x-4y)=$
<span class="answer">-4</span></span>

<li> Give $x$- and $y$-values for any critical points of $f(x,y)$.
<div class="justme">Critical points occur when:<br>
$$f_x=0=4x-4y\ \Rightarrow\  x=y$$
AND
$$f_y=0=2y-4x-20\ \Rightarrow 10=y-2x$$
Substituting $x=y$ in to $10=y-2x=x-2x=-x\ \Rightarrow \ x=-10$ and $y=-10$.
There is a <span class="answer">critical point at (-10,-10)</span>.
</div>
<li> For each critical point, determine whether $f(x,y)$ has a local maximum at that point, a local minimum, or neither.

<div class="justme">
Using $f(x,y)=f(x,y)=2 x^2 + y^2 - 4 x y - 20 y + 3$, calculate some values near the critical point:
<table>
<tr style="background-color:#8e8"><th style="background-color:#fff"></th><th>-11</th><th>-10</th><th>-9</th><th>$x$</th>
</tr>
<tr><th style="background-color:#c8c">-9</th><td>110</td><td>104</td><td><span style="color:red">102</span>
</td></tr>
<tr><th style="background-color:#c8c">-10</th><td>105</td><td>103</td><td>105</td></tr>
<tr><th style="background-color:#c8c">-11</th><td><span style="color:red">102</span></td><td>104</td><td>110</td></tr>
<tr><th style="background-color:#c8c">$y$</th><td></td><td></td><td></td></tr>
</table>
<strike>Looks like it's a 
minimum</strike>.  Even though $f_{xx}=4$ and $f_{yy}=2$ are both positive--concave up, it still appears that in one of the diagonal directions, $f$ is going *down*.

<p>Using the second derivative test:
$$D=f_{xx}f_{yy}-(f_{xy})^2=2\cdot 4-(-4)^2=8-16=-8.$$
If $D\lt 0$ that means we have neither a maximum nor a minimum.  In this case we have <span class="answer">a saddle point</span>.


</div>
<li>Make a contour plot (SageMath) and confirm your answer about the critical point.
</ol>

<?php include "../../classes/3.h" ?>
