This question is a continuation from a previous question I recently asked:
Stationary points of a multivariable function
I now have to find the maximum and minimum values of my function on the circle: $x^2 +y^2 = 4$
I'll repeat what I have so you don't have to keep checking back to my previous post:
The function: $f(x,y) = (x^2+2y^2)e^{-x^2-y^2}$
The partial derivatives: $f_x = (-2x(x^2+2y^2)+2x)e^{-x^2-y^2}$, $f_y=(-2y(x^2+2y^2)+4y)e^{-x^2-y^2}$
From here I set up my Lagrange equations (Since I know that that $\nabla f = \lambda \nabla g$ where $g$ is the function of the given circle):
(I also know that $e^{-x^2-y^2}$ simply becomes $e^{-4}$ since $x^2 +y^2 =4$)
$$(-2x(x^2+2y^2)+2x)e^{-4} = 2\lambda x \space (1)$$
$$(-2y(x^2+2y^2)+4y)e^{-4} = 2\lambda y \space (2)$$
$$x^2+y^2 = 4 \space (3)$$
From here I wasn't entirely sure what to do but I tried dividing both sides of $(1)$ by $2x$ to get: $-e^{-4}(x^2+2y^2)+e^{-4} = \lambda$, and similarly divide both sides of $(2)$ by $2y$ to get: $-e^{-4}(x^2+2y^2)+2e^{-4} = \lambda$
So my new Lagrange equations would be:
$$-e^{-4}(x^2+2y^2)+e^{-4} = \lambda \space (4)$$
$$-e^{-4}(x^2+2y^2)+2e^{-4} = \lambda \space (5)$$
$$x^2 +y^2 = 4 \space (3)$$
I'm not even sure if what I did is correct and even so I'm not sure where I would go from here, equating $(4)$ and $(5)$ wouldn't help (At least I don't think it will) and so I'm quite confused on where to go from here or where I've made a mistake.
If anyone can guide me in the right direction or show me a better method it would really help, thanks in advance
Best Answer
Before analyzing your solution, I'll use a simpler method: the function to study is $$ F(x)=(8-x^2)e^{-4} $$ for $x\in[-2,2]$. The minimum is $4e^{-4}$ and the maximum is $8e^{-4}$.
If you want to go the hard way, the equations to solve are $$ \begin{cases} 2x(1-x^2-2y^2)e^{-x^2-y^2}=2\lambda x \\[6px] 2y(2-x^2-2y^2)e^{-x^2-y^2}=2\lambda y \\[6px] x^2+y^2=4 \end{cases} $$ Since $x^2+y^2=4$ you can't have both $x=0$ and $y=0$, so there are three cases.
Case 1
$$ \begin{cases} x=0 \\[6px] (2-x^2-2y^2)e^{-4}=\lambda \\[6px] x^2+y^2=4 \end{cases} $$ This leads to $y=\pm2$.
Case 2
$$ \begin{cases} (1-x^2-2y^2)e^{-x^2-y^2}=\lambda \\[6px] y=0 \\[6px] x^2+y^2=4 \end{cases} $$ This leads to $x=\pm2$
Case 3
$$ \begin{cases} (1-x^2-2y^2)e^{-x^2-y^2}=\lambda \\[6px] (2-x^2-2y^2)e^{-x^2-y^2}=\lambda \\[6px] x^2+y^2=4 \end{cases} $$ This has no solution.
Hence you have to consider $$ f(0,\pm2)=8e^{-4} \qquad f(\pm2,0)=4e^{-4} $$