Show that the maximum and minimum values of the function $u=x^2+y^2+xy$, where $ax^2+by^2=ab\ (a>b>0)$ are given by $$4(u-a)(u-b)=ab$$
My attempt- using Lagrange Multiplier method, $$F(x,y)= (x^2+y^2+xy)-\lambda(ax^2+by^2-ab)$$ $$dF= (2x+y-2a\lambda x)dx+(2y+x-2b\lambda y)dy$$ Equating to zero to get, $$y/x= 2(a\lambda -1); y/x= 1/(2(b\lambda-1))$$
$$\implies 4(a\lambda-1)(b\lambda-1)=1$$ $$\implies 4(a^2\lambda-a)(b^2\lambda-b)=ab$$
I am stuck here. Finding $(x_0,y_0)$ which finds extrema for $u$ and then substituting to prove $$4(u-a)(u-b)=ab$$ is very tedious. Can someone help on how I should go about it?

Constraint:
$$a x^2 + b y^2 = ab$$
...can be replaced with the following one:
$$x=\sqrt{b}\cos\varphi,\quad y=\sqrt{a}\sin\varphi$$
So the function that we need to minimize/maximize becomes:
$$u(x,y)=u(\varphi)=b\cos^2\varphi+a\sin^2\varphi+\sqrt{ab}\sin\varphi\cos\varphi$$
...or (by applying some pretty elementary trigonometry):
$$u(\varphi)=\frac{a+b}{2}-\frac{a-b}{2}\cos2\varphi+\frac{\sqrt{ab}}{2}\sin2\varphi$$
It can be easily proved (feel free to ask) that any harmonic of the form:
$$f(\alpha)=P\cos\alpha+Q\sin\alpha$$
...has amplitude:
$$R=\sqrt{P^2+Q^2}$$
...with the following extremes:
$$f_{max}=+R,\quad f_{min}=-R$$
In our case:
$$P=-\frac{a-b}2,\quad Q=\frac{\sqrt{ab}}{2}\implies R=\frac12\sqrt{a^2-ab+b^2}$$
This gives the following extremal values:
$$u_{min}=\frac{a+b}{2}-\frac12\sqrt{a^2-ab+b^2}$$
$$u_{max}=\frac{a+b}{2}+\frac12\sqrt{a^2-ab+b^2}$$
A quadratic equation:
$$u^2+Bu+C=0$$
...with $u_{min}$, $u_{max}$ as solutions must have the following coefficients:
$$B=-(u_{min}+u_{max})=-(a+b)$$
$$C=u_{min}u_{max}=\frac34ab$$
So we have the following quadratic equation:
$$u^2-(a+b)u+\frac34ab=0$$
$$4u^2-4(a+b)u+4ab=ab$$
...or finally:
$$4(u-a)(u-b)=ab$$
The most obvious solution (Lagrange mulitplier) is often not the simplest one.