I am trying to find the local extrema of this function:

$f(x,y)=e^{\frac{1}{x^2 + 2 + \cos^2 y-2 \cos y}}$

I know what I am supposed to do (finding critical points and studying the Hessian). But, since the derivatives of this function are quite long, I was wondering if there might be a more efficient way to do it.

I have thought that, since $g(t)=e^t $ strictly increasing and $h(t)=\frac{1}{t}$ is decreasing, I may just study the critical points of the function $l(x,y)=x^2 + 2 + \cos^2 y-2\cos y$. However, I am not sure whether this would be correct, my main concern is with saddle points.

It would be very helpful if anyone could tell me if that way of doing things is correct and, in case it is not correct, why so.


  • 1
    $\begingroup$ This works as you expected: Since $$f(x,y)=\exp\left(\frac1{l(x,y)}\right),$$ we have $$\partial_x f(x,y)=-\exp\left(\frac1{l(x,y)}\right)\cdot\frac{\partial_x l(x,y)}{l(x,y)^2}$$ and similarly for $\partial_y f(x,y)$, so $\nabla f(x,y)=0\iff \nabla l(x,y)=0$ $\endgroup$ Commented Jan 11, 2020 at 10:35

2 Answers 2


A function $f:\mathbb R^2 \to \mathbb R$ having a local extremum in a point $(a,b)$ means that there exists a neighbourhoud $U$ of the point such that either $f(a,b) < f(x,y)$ or $f(a,b) > f(x,y)$ for all $(x,y) \in U \setminus \{(a,b)\}$. Note that, if $g:\mathbb R \to \mathbb R$ is a increasing function $f(a,b) < f(x,y) \iff g(f(a,b)) < g(f(a,b))$ and if $h:\mathbb R \to \mathbb R$ is decreasing, $f(a,b) < f(x,y) \iff h(f(a,b)) < h(f(a,b))$. Your reasoning is thus correct.

In fact, when finding extrema, it is often a good idea to try to reason as far as you can go with increasing and decreasing functions. This has the advantage that it simplifies the calculations. Moreover, note that this also works if $g$ and $h$ are not differentiable. In some cases this method can thus be more general then calculating the gradient of the original function.


The critical points of $f(x, y)=e^{\frac{1}{\ell(x, y)}}$ satisfy the following two conditions simultaneously

$$\frac{\mathrm{d}}{\mathrm{d}x}e^{\frac{1}{\ell(x, y)}}=-\frac{\frac{\mathrm{d}}{\mathrm{d}x}\ell(x, y)}{\ell(x, y)^2}e^{\frac{1}{\ell(x, y)}}=0$$

$$\frac{\mathrm{d}}{\mathrm{d}y}e^{\frac{1}{\ell(x, y)}}=-\frac{\frac{\mathrm{d}}{\mathrm{d}y}\ell(x, y)}{\ell(x, y)^2}e^{\frac{1}{\ell(x, y)}}=0$$

This means that either $\frac{\mathrm{d}}{\mathrm{d}x}\ell(x, y)=\frac{\mathrm{d}}{\mathrm{d}y}\ell(x, y)=0$ or $\frac{e^{\frac{1}{\ell(x, y)}}}{\ell(x, y)^2}=0$. The first case are the critical points of $\ell(x, y)$. Therefore, the critical points of $f(x, y)$ are all of the following:

  • the critical points of $\ell(x, y)$. Here, the gradient of $f(x, y)$ is $0$.

  • all the points where $\ell(x, y)\to\pm\infty$. Here, the gradient of $f(x, y)$ is $0$.

  • all the points where $\ell(x, y)=0$. These are essential discontinuities of $f(x, y)$, where the function and its gradient are not defined.

For your particular $\ell(x, y)$, and if the goal is to find finite local extrema, only the first set of points matter, as there are no finite $(x, y)$ for which $\ell(x, y)\to\infty$, and the third set of points lead to "infinite local extrema". But in the general case, you need to consider all the sets of points. For example, you cannot assume that the global maximum is the maximum of the local maxima, as the third set of points shows that $f(x, y)$ gets arbitrarily large when $\ell(x, y)$ goes to $0$.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .