Consider the function $$f(x,y)=\exp(x)+\exp(y).$$ How can I maximize this function over the unit circle $x^2+y^2=1$?
My attempt. I tried using Lagrange multipliers but I was only able to solve the equations numerically an got $x\approx y\approx 0.7$ as the maximum of $f$. Is there a better solution?
We only need to consider $x,y\geq0$. For $0\le x\le 1$, let $$g(x)=\exp(x)+\exp\left(\sqrt{1-x^2}\right).$$
Note that for every $x,y\geq 0$ with $x^2+y^2=1$, we have $f(x,y)=g(x)$. So we want to maximize $g$. Note that $$g'(x)=\exp(x)-\exp\left(\sqrt{1-x^2}\right)\cdot\frac{x}{\sqrt{1-x^2}}.$$
So for $0<x<1$, $$g'(x)=0\iff \exp(x)=\exp(y)\cdot\frac{x}{y}\iff\frac{\exp(x)}x=\frac{\exp(y)}{y},$$
where I have set $y=\sqrt{1-x^2}$.
It is easy to check that $g'\left(\frac{1}{\sqrt2}\right)=0$. Note that the function $x\mapsto \frac{\exp(x)}x$ is strictly monotonically decreasing for $0\le x\le 1$ as can be easily checked by computing the derivative.
Hence, if $x<\frac{1}{\sqrt 2}$, then $y>\frac{1}{\sqrt 2}$ and thus $\frac{\exp(x)}x>\frac{\exp(y)}y$. Same idea if $x>\frac1{\sqrt 2}$.
It follows that $g'(x)=0$ if and only if $x=\frac{1}{\sqrt 2}$.
Now the maximum is simply $\max\left(g(0),g\left(\frac{1}{\sqrt 2}\right),g(1)\right)=\max(1+e,2e^{\frac{1}{\sqrt 2}})=2e^{\frac1{\sqrt{2}}}.$