<s>[INST] Maxima/Minima Problem I am working on this Maxima and Minima Problem :
Determine the Max and Min distance of origin from the curve $3x^2+4xy+6y^2=140$
I tried it solving using the lagrange's method of multipliers. I get the following equations
$x+3x\theta+2y\theta=0$
$y+4y\theta+2x\theta=0$
$2z=0$
$3x^2+4xy+6y^2=140$
So i get $z=0$
Please suggest how to go about solving for $x$ and $y$ ?
 [/INST] \begin{align}
\min_{x,y}&x^2+y^2\\s.t.\\
3x^2+6y^2+4xy&=140\\
L(x,\lambda)&=x^2+y^2-\lambda(3x^2+6y^2+4xy-140)\\
\nabla L(x,\lambda)&=\binom{2x}{2y}-\lambda\binom{6x+4y}{12y+4x}=0\\
\text{Necessary Conditions:}\\
2x-\lambda(6x+4y)&=0\\
2y-\lambda(12y+4x)&=0\\
3x^2+6y^2+4xy&=140\\
\end{align}
Solve these 3 equations and you have your answer.
\begin{align}
2x&=\lambda(6x+4y)\\
\lambda&=\frac{2x}{6x+4y}\\
2y-\lambda(12y+4x)&=0\\
2y-\frac{2x}{6x+4y}(12y+4x)&=0\\
y&=\frac{x}{6x+4y}(12y+4x)\\
(6x+4y)y&=x(12y+4x)\\
6xy+4y^2&=12xy+4x^2\\
2y^2&=3xy+2x^2\\
3x^2+6y^2+4xy&=140\\
\text{Solving you get,}\\
x=\pm2,y=\pm4\\
d=20
\end{align}
</s>