# Finding maximum and minimum values of a function on a region

Function:

$f(x,y) = e^{x^2+y^2}$

Region:

$x^4+2x^2y^2+y^4=4$

I know you can simplify the region and plug-in $x^2+y^2$ from that into the function and get the answer (ans. = $e^2$) but I wanted to know if there was a, albeit, longer way of using Legrange multipliers.

So I have,

$f_x=\lambda g_x$

$2xe^{x^2+y^2} = \lambda 4x^3+4xy^2$

$\lambda = e^{x^2+y^2}/2(x^2+y^2)$

But I'm not sure what I would do with this lambda value. Don't see how I could find an x or y value from this.

-
You have to make $f_x = 0$, $f_y = 0$ and $f_\lambda = 0$. It gives you 3 equations with 3 variables, which can be solved in most of the cases. But you also need to analyse whether those extrema are max or min. – Kaster Mar 14 '13 at 8:17
When I added my post I overlooked that you've already figured out to use Lagrange multipliers, deleted my post after, and undeleted it again, just in case maybe you find some info there. – Kaster Mar 14 '13 at 8:19

## Hint

Use Lagrange multipliers, in this case only one and construct Lagrangian $$L = e^{x^2+y^2}-\lambda\left(x^4+2x^2y^2+y^4-4\right)$$ and find it's extrema by $$\frac {\partial L}{\partial x} = 0 \\ \frac {\partial L}{\partial y} = 0 \\ \frac {\partial L}{\partial \lambda} = 0 \\$$ Then analyse each extremum for max or min. More info is here - Lagrange multiplier

-
Thank you! This is a useful variant of the method to know: as it works out, only the third equation provides the information which resolves the problem (the other two just yield the $\lambda$ OP already found...). – RecklessReckoner Apr 28 '13 at 7:24

You will save a lot of work by noting that $t \mapsto e^t$ is strictly increasing. Hence you can just find max/min of $x^2+y^2$ (and remember to take $e$ to the computed max/min at the end).

This trick is good to have up your sleeve (even for problems that aren't this contrived).

-

Define $$f(x,y):=e^{x^2+y^2},\qquad g(x,y):=(x^2+y^2)^2-4\ .$$ We are looking for the points $${\bf z}\in S:=\{(x,y)\ |\ g(x,y)=0\}$$ where $\nabla f({\bf z})=2 e^{x^2+y^2}{\bf z}$ is parallel to $\nabla g(x,y)=2(x^2+y^2){\bf z}$. Now in this atypical case the two gradients are parallel at all points ${\bf z}\in S$, because $S$ is in fact a level line of $f$. Therefore it doesn't make much sense of talking about conditional extrema here.

In a "typical" application of Lagrange's method there will be only a finite number of points ${\bf z}_k\in S$, where the two gradients are parallel, and these points are candidates for a conditional local extremum.

-
Thank you for characterizing the peculiar nature of this extremization. – RecklessReckoner Apr 28 '13 at 7:24