Question:
Maximise f (x, y) = x2y, where (x, y) ∈ R2
given the constraint
that all (x, y) are points on a circle with radius √3 around origin (0, 0).
Solution:
f (±√2, 1) = 2 is the maximal value
I tried:
∂f/∂x = 2xy
∂f/∂y = x2
∂g/∂x = 2xy+y2
∂g/∂y = 2y + x2
∂f/∂x = λ(∂g/∂x) = 0
therefore:
2xy-2λx-λy2=0 {equation1}
∂f/∂y = λ(∂g/∂y) = 0
therefore:
x^2+2λy+λx2=0 {equation2}
x^2 + y2 = 3 {equation 3}
{eq1} in terms of λ:
λ = 2xy/(2x+y2)
sub λ into {eq2} gives me a big equation in terms of x and y {equation4}
Simultaneously solving {4} and {3}
2*((2xy)/(2x+y2))y + ((2xy)/(2x+y^2))(x^2) + (x^2) = 0, x^2+y^2 = 3
with wolfram, gives me answers that dont look like the given answer

Here is a plot that shows what's going on geometrically with Lagrangian multipliers in this case. The red line is the $x^2+y^2=3$ constraint, whereas the underlying contour plot is $f(x,y)=x^2 y$ (lighter regions are at higher values:
$\hspace{3 cm}$
The key observation is that the contour which just 'kisses' the constraint line represents larger values than any other contours which intersect the constraint line. So a way to maximize $f(x,y)$ while satisfying the constraint $g(x,y)$ is to require that the two curves be tangent at that intersection. That amounts to requiring that the gradients of the two functions be proportional i.e. $\nabla f =c\nabla g$ for some constant $c$. But that is equivalent (with $c=-\lambda$) to the Lagrangian multiplier scheme.