# Finding extrema of multivariable functions.

A problem asks me to find the absolute extrema of the function given by $f: \mathbb{R}^2 \rightarrow \mathbb{R} ,f(x,y)=(x^2+y^2)e^{-(x^2+y^2)}$.

Now, how can I find the critical points?. As far as I know it should be done with the partial derivatives, but here I have that $\displaystyle\frac{\partial f}{\partial x} = 2xe^{-(x^2+y^2)}(1-x^2-y^2)$ and $\displaystyle\frac{\partial f}{\partial y}=2ey^{-(x^2+y^2)}(1-x^2-y^2)$. Then all the critical points seem to be $\{(x,y)\in \mathbb{R}^2 : x^2+y^2=1\}\cup\{(x,y):x,y\in\mathbb{R}\}$

Since $(x^2+y^2)$ and $e^{-(x^2+y^2)}$ are both greater than zero I can say that $(0,0)$ is an absolute minima (right?), but what about the maxima?.

I can't picture how every point in the circunference can be a critical point. I plotted the function and it seems that the functions increase and decrease several times, how can I test the function to find absolute maxima (or relative) around $g(x,y) = 1-x^2-y^2$ ?. I also tried to solve this with Lagrange multipliers but implies solving the system given by

$\begin{cases} 2xe^{-(x^2+y^2)}(1-x^2-y^2) = -2\lambda x & (1) \\ 2ey^{-(x^2+y^2)}(1-x^2-y^2) = -2\lambda y & (2)\\ 1-x^2-y^2=0 & (3)\end{cases}$

And I can't find $\lambda$ because I get the same solution for $\lambda$ with $(1)$ and $(2)$, this is, $\lambda =-2e^{-(x^2+y^2)}(1-x^2-y^2)$ . Any hints?.

• You might take advantage of the fact that $f$ is radially symmetric. Then you need only examine a function of one variable. – David Mitra Jan 13 '14 at 15:34
• The set of your critical points is not correct. But maybe just a typo?! Anyhow, your results so far a correct, now consider the comment of David Mitra – user127.0.0.1 Jan 13 '14 at 15:35
• There's a typo in $\partial f/\partial y$, as well. There is no application of Lagrange multipliers here: There are no constraints in this problem. – Ted Shifrin Jan 13 '14 at 15:37
• Also remember, that not every critical point must be a minimum or maximum point - it's just a candidate. So you have to determine the Hess matrix (don't know if this is the correct English name for it). This will also help distinguish between min and max – Bernd Jan 13 '14 at 15:54
• @Bernd I think It's "Hessian", but I'm also not sure. – GPerez Jan 14 '14 at 1:04

## 2 Answers

Expanding on what other have said, if you want to avoid using partial differentiation then you need to make the substation $r^2 = x^2 + y^2$ which converts to polar coordinates. Then the differential is simplified to

$$\frac{d}{dr} (r^2e^{-r^2}) = e^{-r^2} (2r-2 r^3)$$

Equating this to $0$ gives the roots $r = 1$ and $r = 0$, or $x^2 + y^2 = 1$ and $x^2 + y^2 = 0$, which correspond to turning points on the unit circle, and at the point $(0,0)$.

Edit

To verify the extrema you can find the second derivative of the expression above in $r$. In multi-vartiate calculus (like the original problem), you would need to find the hessian and check if it is positive definite (local minimum), or negative definite (local maximum). Note that the hessian is the multi-variate extension of the second derivative. Also, be careful that the hessian test only verifies local extrema and can not be used to show a general point is a global optimum unless the problem is convex.

The second derivative with respect to $r$ is

$$\frac{d^2}{dr^2} (r^2e^{-r^2}) = \frac{d}{dr} (e^{-r^2} (2r-2 r^3)) = 2 e^{-r^2} (1-5 r^2+2 r^4)$$

When $r = 0$ we find the second derivative to be $2$, thus the point $(0,0)$ is a local minimum. When $r = 1$ we find the second derivative to be $-4/e$, thus the points on the unit circle are local maximums.

Now in terms of showing the points are in-fact global extrema, you can appeal to the nature of the problem. It is not difficult to show that outside the unit circle the function is always decreasing, but is bounded by the positive axis.

• I must dissent on the fact that $r=\pm 1$, in polar coordinates $r\ge 0$. Also a coordinate change must be $g:\mathbb R^2\to\mathbb R^2$, here you only have $r:\mathbb R^2\to \mathbb R$ (I know it doesn't matter, as the angle variable $\theta$ will simplify automatically in this expression, but still, it's good practice to do the complete change). Logically though, the answer will be identical :) – GPerez Jan 14 '14 at 0:59
• Oh and also one must guarantee that it is extrema, i.e. Hessian is pos. def. or other conditions – GPerez Jan 14 '14 at 1:02
• $2r-2r^3=0$ means $2r(1-r)=0$, so $r=0$ or $r=1$, not $r=-1$. – Bernd Jan 14 '14 at 9:38
• You're both correct, I will correct my answer, thanks. I will also add in extrema verification as you suggest. – Daniel Jan 14 '14 at 12:53

Try using the substitution r(x,y)=(x^2+y^2).

Now all you have to do is find the extrema of a function in one variable. Remember that the values for x and y will correspond to a circle with radius r where r is the extrema you found.

Note, Lagrange multipliers would work if you had a functional constraint, it will not help you here.

Did that answer your question?