<s>[INST] How to solve this system of equations in Lagrange Multiplier problem Find the maximum and minimum values of ${x^{2} + y^{2} + z^{2}}$ subject to the conditions ${\frac{x^{2}}{4} + \frac{y^{2}}{5} + \frac{z^{2}}{25} = 1}$  and ${x + y - z = 0}$.
Using Lagrange multiplier method, I got following equations:
$$ {2x = \frac{\lambda_{1} x}{2} + \lambda_{2}}$$
$$ {2y = \frac{2 \lambda_{1} y}{5} + \lambda_{2}}$$
$$ {2z = \frac{2 \lambda_{1} z}{25} - \lambda_{2}}$$
$${\frac{x^{2}}{4} + \frac{y^{2}}{5} + \frac{z^{2}}{25} = 1}$$
$${x + y - z = 0}$$
I'm stuck after this. I've tried to solve this system of equations to get critical point many times. Any help will be greatly appreciated. Also is there any other way to approach this problem?
 [/INST] With the Lagrange multipliers
$$
L(x,y,z,\lambda,\mu) = x^2+y^2+z^2+\lambda\left(\frac{x^2}{a}+\frac{y^2}{b}+\frac{z^2}{c}-1\right)+\mu(x+y-z)
$$
The stationary points are located at
$$
\nabla L = 0 = 
\left\{
\begin{array}{l}
 \frac{2\lambda  x}{a}+\mu +2 x \\
 \frac{2 \lambda  y}{b}+\mu +2 y \\
 \frac{2 \lambda  z}{c}-\mu +2 z \\
 \frac{x^2}{a}+\frac{y^2}{b}+\frac{z^2}{c}-1 \\
 x+y-z \\
\end{array}
\right.
$$
taking the first three rows we have
$$
\left(\frac{2\lambda  x}{a}+\mu +2 x\right)x+\left(\frac{2 \lambda  y}{b}+\mu +2 y\right)y+\left(\frac{2 \lambda  z}{c}-\mu +2 z\right)z=2\lambda+2(x^2+y^2+z^2)=0
$$
and also
$$
\cases{
x = -\frac{\mu}{2+2\lambda/a}\\
y = -\frac{\mu}{2+2\lambda/b}\\
z = \frac{\mu}{2+2\lambda/c}\\
}
$$
or
$$
\mu\left(\frac{1}{2+2\lambda/a}+\frac{1}{2+2\lambda/b}+\frac{1}{2+2\lambda/c}\right)=0
$$
Solving for $\lambda$ we have the values for $x^2+y^2+z^2$ at the stationary points.
</s>