Find the maximum of the multivariable function 
Find the maximum of the following function:
  $$h(x, y)  =  \ln(x^{40} y^{60}) $$
  given the constraints:
  $$2x^2 + 3y^2  =  10, \quad \quad x > 0,   y > 0. $$

I know that for the first step I the $h$'s should $= 40/x , 60/y$ and the $g$'s should be $4x , 6y$. But i'm not should I should do with this information to get to the final answer. What is the final answer? It should be rounded to 5 decimal points.
 A: Put $y^2=\frac{10-2x^2}{3}$. Then we reduce our problem to the one-variable case. We have to maximize a function $$g(x)=h(x,y)=\ln\left(x^{40}\left(\frac{10-2x^2}{3}\right)^{60}\right)\quad(x>0),$$ which seems to be not too difficult.
A: Another approach, just for pleasure:
The constraint implies that $x$ and $y$ belong to the first quadrant of the ellipse
$$
\left(\frac{x}{\sqrt{5}}\right)^2+ \left(\frac{y}{\sqrt{10/3}}\right)^2= 1
$$
Therefore, you can replace $x$ and $y$ by $\sqrt{5}\cos t$ and $\sqrt{\frac{10}{3}} \sin t$, respectively, and solve for $t$ with $t\in [0,\pi/2]$, i.e., find the max and min of the mono variable function
$$
h\left(x(t),y(t)\right) = \ln\left((\sqrt{5}\cos t)^{40}( \sqrt{\frac{10}{3}} \sin t)^{60}\right) = 40 \ln(\sqrt{5}\cos t)+60\ln(\sqrt{\frac{10}{3}} \sin t)
$$
You end up with 
$$
\boxed{
\max h(x,y) = 34.6574\qquad \text{with}\quad t=0.886077
}
$$
A: You should use Lagrange multipliers. Note $$h(x,y) = 40 \ln x + 60 \ln y$$ so $$\vec{\nabla}h = \left(\frac{40}{x}, \frac{60}{y}\right)$$ and your constraint $g$ has gradient $(4x, 6y)$. Now solve $\nabla h = \lambda \nabla g$ with your constraint $g(x,y) = 10$:
$$
\begin{split}
\frac{40}{x} &= \lambda \times 4x \\
\frac{60}{y} &= \lambda \times 6y \\
2x^2 + 3y^2  &= 10
\end{split}
$$
which is 3 equations in 3 unknowns.
