# Not sure how to approach this system of exponential equations

This is the problem I'm trying to solve: let $g(x,y)=e^{-3(x-1)^2}+e^{-3y^2}$ be the height of a mountain at a given $(x,y)$ point. Find max heights within $\frac{(x-1)^2}4+\frac{y^2}4 \le 1$

So what I first thought is Lagrange multipliers. So I got the gradients for both the surface and the restriction (which I called $f$):

$\nabla g=<-6e^{-3(x-1)^2}(x-1) ; -6ye^{-3y^2}>$

$\nabla f=<\frac{x-1}2; \frac y 2>$

So, given that $\nabla g = \lambda \nabla f$ my system of equations is: \begin{cases} -6e^{-3(x-1)^2}(x-1) = \lambda \frac{x-1}2 \\ -6ye^{-3y^2} = \lambda \frac y 2 \\ \frac{(x-1)^2}4+\frac{y^2}4 = 1 \end{cases}

If I set up my information the right way, I'm now completely stuck with this system of equations and how to solve it...

If we divide $x-1$ out of the first equation and $y$ out of the second, and then multiply the two equations, we get $(x-1)^2 + y^2$ in an exponent. From the third equaiton, we know $(x-1)^2 + y^2 = 4$. So this will allow us to solve for $\lambda$.

The right approach is always to try to intuit the problem... and to start using analytic methods when you already know the solution. At least in cases when intuition works.

The plot of the function $$e^{-3(x-1)^2}+e^{-3y^2}$$ (by Alpha) is

By intuition, along the circle $$(x-1)^2+y^2=4$$ (of radius $2$) the extrema are at $(1,-2)$, $(3,0)$, $(1,2)$, and $(-1,0)$; and at four other places somewhere in between. Within the circle the absolute maximum is at $(1,0)$.

Consider the extrema along the circle parametrized as $$(2\cos(\theta)+1, 2\sin(\theta)).$$ We have to find the extrema of $$e^{-12\cos^2(\theta)}+e^{-6\sin^2(\theta)}.$$

Take the derivative with respect to $\theta$ and set it equal to zero:

$$12\cos(\theta)\sin(\theta)\left(2e^{-12\cos^2(\theta)}-e^{-6\sin^2(\theta)}\right)=0.$$

This will hold if either $\cos(\theta)$ or $\sin(\theta)=0$, that is when $$\theta=0,\frac{\pi}2,\pi, \frac{3\pi}2$$ as intuition has shown. In order to find the "in between" places, we have to solve the following equation

$$e^{-12\ln(2)\cos^2(\theta)}=e^{-6\sin^2(\theta)}.$$

Taking the natural logarithm of both sides, and then taking the square roots of the samewe get $$\mid \ \cos(\theta)\mid=\sqrt{\frac1{{\ln(4)}}}\mid\sin(\theta)\mid.$$

Solving this equation will give the further four extrema as shown below

As far as the absolute maximum. Examine the function as a function of $x$ with fixed $y$s and as a function of $y$ with fixed $x$s. The shape is always like this

if $y$ is fixed, and like this

if $x$ is fixed...