Find the maximum of $f(x, y) = (3x+4y)e^{\frac{-(x^2+y^2)}{2}}$ as a function of $r$ over a closed disk $x^2+y^2\leq r^2.$
So my first guess is to check the interior points and then the boundry points. But, how do I get the function $f$ as a function of $r$?
I rewrote it as following, but not sure if this is right.
$$f(x(r, t), y(r, t)) = (3r\cos{t}+4r\sin{t})e^{-\frac{r^2}{2}},$$
I can then get the parital derivatites:
$$f_r=(3\cos{t}+4\sin{t})e^{-\frac{r^2}{2}} - (3r^2\cos{t}+4r^2\sin{t})e^{-\frac{r^2}{2}}$$ $$f_t=(-3r\sin{t}+4r\cos{t})e^{-\frac{r^2}{2}}$$
Then, I can find when the derivatives are equal to $0$,
$$f_t=(-3r\sin{t}+4r\cos{t})e^{-\frac{r^2}{2}} = 0 \implies \tan{t} = \frac{4}{3}.$$
I think I'm doing this totally wrong. Maybe I should use Lagrange multipliers somehow?
Answer is: $max(r) = 5re^{\frac{-r^2}{2}}$ if $r \leq 1$ and $max(r) =\frac{5}{\sqrt{e}}$ if $r \geq 1$. $min(r) = -max(r)$.
You have two r's in the problem. So lets call one something different by saying $x^2+y^2=r^2\le R^2$.
You have correctly calculated $t$ which results in a maximum. This gives $\cos(t)=\frac{4}{5}$ and $\sin(t)=\frac{3}{5}$. Put this into your expression for $f_r$ and it is easy to see that $r=1$.
Now if $R>1$ then you have a maximum at $r=1$ and thus $max[f(x,y)]=5 e^{-\frac{1}{2}}$.
If $R<1$ then maximum is at $r=R$ so $max[f(x,y)]=5 R e^{-\frac{R^2}{2}}$.
You of course still need to check these are maximums.