3

Find the extreme of $$f(x,y) = x^2+xy+y^2+y$$

I think from what I learn on the function with two variables, we need to find the second derivatives to solve this kind of question. However, after I figured out both $f_x$ and $f_y$, $$f_x=2x+y, f_y=x+2y+1$$ I am stuck on what I should do next since this function will have $f_{xx}$, $f_{xy}$, $f_{yx}$, $f_{yy}$, four second derivatives. Can someone lead me out?

4 Answers4

2

You are on the rite track, but you need to do one more test before you know the extreme on this function. Clairaut's theorem:$$Df(x,y)=fxx-fyy-(fxy)^2$$

After you solve this, you may have three different result, which is $$Df(a,b)>0$$ --both fxx and fyy have same sign, so if fxx>0, you have the local max, fxx<0, you have local min; $$Df(a,b)<0$$ -- fxx and fyy have different sign, the function has no max/min, f has a saddle point; $$Df(a,b)=0$$ -- Test is inclusive.

Use this into you question and find out your answer.

DK_shai
  • 36
2

If you are allowed to use graphical tools, then notice the level curve $f(x,y)=k$ is an ellipse and seems to reduce to one point when $(x,y)=(\frac 13,-\frac 23)$.

https://www.desmos.com/calculator/vymqbyrxgd

Once you have guessed that, let's try to translate the curve $f(\frac 13+X,-\frac 23+Y)=\cdots=\underbrace{X^2+XY+Y^2}_{\ge 0}-\dfrac 13$ with a minimum reached for $(X,Y)=(0,0)$.

And we have indeed a minimum $k=-\frac 13$ for the guessed point.

No maximum since trivially $f\to\infty$ at infinity.


Note that with conics you can always find the translation without hint. Just set $f(X+a,Y+b)$ and try to remove terms in $X^1$ and $Y^1$ by adjusting $a,b$.

In our case:

$f(X+a,Y+b)=\underbrace{(a^2+ab+b^2+b)}_{f(a,b)}+\underbrace{(2a+b)}_{f_x(a,b)}X+\underbrace{(a+2b+1)}_{f_y(a,b)}Y+X^2+XY+Y^2$

Thus annulating $f_x,f_y$ in that case leads to $(a,b)=(\frac 13,-\frac 23)$.

Of course here we are lucky because $X^2+XY+Y^2$ is an easy study, but in general you are left with something that is simplified (no terms in X,Y) but still need further study.

zwim
  • 28,563
1

As you have obtained $f_{x}$ and $f_{y}$ one way to proceed is to look at critical points. I.e points $(a,b)$ such that $f_{x}(a,b)=f_{y}(a,b)=0$.

If you obtain such a collection of points we can then evaluate what sort of critical points these $(a,b)$ are by looking at the determinant of the Hessian matrix $$H(x,y) = \begin{bmatrix}f_{xx}(x,y) && f_{xy}(x,y)\\ f_{yx}(x,y) && f_{yy}(x,y)\end{bmatrix}.$$ Under sufficiently nice conditions on the function $f$ we have $f_{xy}=f_{yx}$ and: $$\det(H(x,y))=f_{xx}(x,y)f_{yy}(x,y)-(f_{xy}(x,y))^2$$ Then if $\det(H(a,b))>0$: $f$ attains a $\textit{maximum}$ at $(a,b)$ if $f_{xx}(a,b)<0$ or a $\textit{minimum}$ if $f_{xx}(a,b)>0$.

If instead $\det(H(a,b))=0$ the test is inconclusive.

Lastly if $\det(H(a,b))<0$ we instead conclude that $f$ has a saddle point at $(a,b)$

1

I am surprised nobody mentioned the completing square approach for finding minimum (maximum is clearly infinity):

$$x^2+xy+y^2+y=\dfrac14\left(4x^2+4xy+y^2+3\left(y^2+\dfrac 43y+\dfrac 49\right)-\dfrac43\right)\\ =\dfrac14\left((2x+y)^2+3\left(y+\dfrac23\right)^2\right)-\dfrac13\ge-\dfrac13$$ Therefore, minimum value is $-\dfrac 13$ obtained at $\left(\dfrac13,-\dfrac23\right)$.

Martund
  • 14,706
  • 2
  • 13
  • 30