Finding the extreme values of $f(x,y,z)=x^2+y^2+z^2$ constraint to $x^2+y^2+z^2+xy=12$

988 Views Asked by At

$f(x,y,z)=x^2+y^2+z^2$ constraint to $x^2+y^2+z^2+xy=12$

So I have made 4 equations using Lagrange Multipliers,

$2x=\lambda(2x+y)$ , $2y=\lambda(2y+x)$ , $2z=\lambda(2z)$ , and $x^2+y^2+z^2+xy=12$

The third equation is $2z=2z\lambda$ which ends up with $z=0$ or $\lambda=1$

With $z=0$ put in the constraint equation, I get $x= \pm 2$ and a minimum of $f(\pm 2,\pm 2,0)=8$

and with $\lambda=1$ put in the $F_x=\lambda G_x$ and $F_y=\lambda G_y$, I get $x,y=0$ and from the constraint equation I get $z=\pm\sqrt{12}$

which gives the max at $f(0,0,\pm\sqrt{12})=12$

which is incorrect and the answer was $24$ and I do not know of what mistakes I did.

3

There are 3 best solutions below

2
On

If $z=0$, then your system becomes$$\left\{\begin{array}{l}2x=\lambda(2x+y)\\2y=\lambda(2y+x)\\x^2+y^2+xy=12.\end{array}\right.\label{a}\tag1$$The system which consists of the first two equations is equivalent to$$\left\{\begin{array}{l}(2-2\lambda)x-\lambda y=0\\-\lambda x+(2-2\lambda)y=0.\end{array}\right.\label{b}\tag2$$If the determinant of the matrix of the coefficients of the system \eqref{b} turns out to be different from $0$, then the system has one and only one solution, which is $x=y=0$, but there is no such solution of the system \eqref{a}.

The determinant mentioned above is $3\lambda^2-8\lambda+4$ which is equal to $0$ if and only if $\lambda=2$ or $\lambda=\frac23$. If $\lambda=2$, then the system \eqref{b} becomes equivalent to $x+y=0$, and the solutions of the system$$\left\{\begin{array}{l}x+y=0\\x^2+y^2+xy=12\end{array}\right.$$are $\pm\left(2\sqrt3,-2\sqrt3\right)$, which you have missed. And $f\left(\pm2\sqrt3,\mp2\sqrt3\right)=24$.

And if $\lambda=\frac23$, then the system \eqref{b} is equivalent to $x-y=0$, and the solutions of the system$$\left\{\begin{array}{l}x-y=0\\x^2+y^2+xy=12\end{array}\right.$$are $\pm\left(2,2\right)$, which you have found.

0
On

The stationary points according to Lagrange, are the tangent points between the ellipsoid

$$ x^2+y^2+z^2+x y =12 $$

and the family of spheres given by

$$ x^2+y^2+z^2 = r^2 $$

so the stationary points are

$$ \left[ \begin{array}{ccccc} r^2& x & y & z & \lambda\\ 8 & -2 & -2 & 0 & -\frac{2}{3} \\ 8 & 2 & 2 & 0 & -\frac{2}{3} \\ 12 & 0 & 0 & -2 \sqrt{3} & -1 \\ 12 & 0 & 0 & 2 \sqrt{3} & -1 \\ 24 & -2 \sqrt{3} & 2 \sqrt{3} & 0 & -2 \\ 24 & 2 \sqrt{3} & -2 \sqrt{3} & 0 & -2 \\ \end{array} \right] $$

0
On

This particular problem does not require the Lagrange multipiers method.

Observe that $f(x,y,z)=12-xy.$ Thus the task can be reduced to the two variables problem, namely $$g(x,y)=12-xy,\quad x^2+y^2\le 12 -xy$$ Denote $r=\sqrt{x^2+y^2}.$ For fixed $r$ the largest value of $g(x,y)=12-xy$ is attained for $y=-x.$ In that case we are reduced to finding the maximal value of $$12+{r^2\over 2}\ \ {\rm under\ condition}\ r^2\le 12+{r^2\over 2},\ \ {\rm i.e.}\ r^2\le 24 $$ Clearly the maximal value $24$ is attained when $r^2=24$ Therefore the maximal value of $g(x,y)$ is attained, when $y=-x$ and $x^2+y^2=24.$ Thus at $\left (\pm 2\sqrt{3},\mp 2\sqrt{3}\right ).$ Now we can go back to the original problem and determine that $z=0.$

Concerning the minimal value of $g(x,y),$ we can repeat similar steps to obtain that for fixed $r$ the minimal value $8$ is attained for $x=y=\pm 2,$ $z=0.$