Find maximum point of $f(x,y,z) = 8x^2 +4yz -16z +600$ with one restriction I need to find the critical points of $$f(x,y,z) = 8x^2 +4yz -16z +600$$ restricted by $4x^2+y^2+4z^2=16$.
I constructed the lagrangian function $$L(x, y, z, \lambda ) = 8x^2 +4yz -16z +600 - \lambda (4x^2+y^2+4z^2-16) $$
but I'm very confused about how to determine those points. I know I need to make a system with all the first derivatives of $L$ equaled to $0$. I did it but every time I try to solve it I get different solutions. How can I get the points?
Thanks.
 A: There are a number of constrained critical points. If you set the gradient of $L$ equal to $0$, you find that
$$(4x,z,y-4) = \lambda(4x,y,4z).$$
If $x\ne 0$, we must have $\lambda = 1$ and then $z=y$ and $y-4=4z$. This gives $y=z=-4/3$ and $x=\pm 4/3$.
However, if $x=0$, then we also get additional solutions by setting
\begin{equation}
(z,y-4) = \lambda(y,4z),\tag{$*$}
\end{equation}
from which we get
$$\frac zy = \frac{y-4}{4z}.$$
(Note that we cannot have $x=y=z=0$ on our constraint set, so this is fine. Note that ($*$) says that $z=0$ if and only if $y=0$.)
This yields $4z^2=y(y-4)$, which, if I'm not mistaken, leads, along with the constraint equation, to $y^2-2y-8 = (y-4)(y+2) = 0$, so $y=4$ or $y=-2$. These give additional critical points $(0,4,0)$ and $(0,-2,\pm\sqrt3)$.
Because there's such dispute amongst the various answerers, let me check the values of $f$ at these various points:
\begin{multline}
f(\pm 4/3, -4/3, -4/3) = \frac{1928}3,  \quad   f(0,4,0) = 600, \\  f(0,-2,\sqrt3) = 600 - 24\sqrt 3,\quad   f(0,-2,-\sqrt3) = 600 + 24\sqrt3.
\end{multline}
Indeed, $1928/3$ wins out for the maximum value, but only just barely!!
Philosophical Remark: You do not need to solve explicitly for $\lambda$; you can eliminate it as I did by taking ratios. It is to emphasize this pedagogical point that I wrote out the solution so carefully. :)
A: $$L(x,y,z,\lambda) = 8x^2-4\lambda x^2 + 4yz - \lambda y^2 - 16z - 4\lambda z^2 + 600 + 16\lambda$$
$$\frac{d}{dx}L(x,y,z,\lambda) = 16x-8\lambda x = 0, x = 0 \space or \space \lambda = 2$$
$$\frac{d}{dy}L(x,y,z,\lambda) = 4z-2\lambda y = 0 \space or \space 4z = 4y, \space for \space \lambda =  2$$
$$So, y = z$$
$$\frac{d}{dz}L(x,y,z,\lambda) = 4y-16-8\lambda z = 0, \space or \space 4y = 16z + 16, \space for \space \lambda =  2$$
$$As \space y = z, \space y = z = -\frac {4}{3}$$
$$\frac{d}{d\lambda}L(x,y,z,\lambda) = -4x^2-y^2-4z^2+16 = 0, \text { which is our original constraint.}$$
$$As \space \lambda = 2, \space y = z = -\frac{4}{3},$$
$$-4x^2-\frac{16}{9}-\frac{64}{9}+16 = 0$$
$$4x^2=16-\frac{80}{9} \space so, \space x = \pm \frac{4}{3}$$
$$\text {So, critical points for } \lambda = 2$$
$$(-\frac{4}{3},-\frac{4}{3},-\frac{4}{3}),(\frac{4}{3},-\frac{4}{3},-\frac{4}{3})$$
Similarly two more critical points for x = 0.
A: Using Lagrange Multipliers, we wish to find the points $(x, y, z)$ such that $\nabla f(x, y, z) = \lambda \nabla g(x, y, z),$ where $g(x, y, z) = 4x^2 + y^2 + 4z^2 = 16$ and $\lambda$ is some constant. Observe that the gradients are given by $\nabla f = \langle f_x, f_y, f_z \rangle = \langle 16x, 4z, 4y - 16 \rangle$ and $\nabla g = \langle 8x, 2y, 8z \rangle,$ hence we must solve the following $4 \times 4$ system of equations. $$\begin{cases} 16x = 8 \lambda x \\ 4z = 2 \lambda y \\ 4y - 16 = 8 \lambda z \\ 4x^2 + y^2 + 4z^2 = 16\end{cases}$$ Using the first equation, we have that $(16 - 8 \lambda)x = 0,$ from which it follows that $\lambda = 2$ or $x = 0.$ Using the second equation, we have that $2z = \lambda y$ so that $4z^2 = \lambda^2 y^2.$ Using the third equation, we have that $4y = 8 \lambda z + 16 = 4 \lambda^2 y + 16$ (by the second equation) so that $(4 \lambda^2 - 4)y + 16 = 0.$ Using the fourth equation, we have that $4x^2 + (\lambda^2 + 1) y^2 = 16$ (by the second equation). $$\begin{cases} 4z^2 = \lambda^2 y^2 \\ (4 \lambda^2 - 4)y + 16 = 0 \\ 4x^2 + (\lambda^2 + 1) y^2 = 16 \end{cases}$$
Given that $\lambda = 2,$ we may solve for $y$ in the second equation; solve for $z$ in the first equation; and solve for $x$ in the third equation. On the other hand, if $x = 0,$ then we are dealing with the functions $f(0, y, z) = 4yz - 16z + 600 = h(y, z)$ and $g(0, y, z) = y^2 + 4z^2 = k(y, z) = 16,$ and we can use Lagrange Multipliers to find the critical points of $h(y, z)$ with respect to the constraint $k(y, z) = 16.$ Explicitly, we have that $\langle 4z, 4y - 16 \rangle = \nabla h(y, z) = \mu \nabla k(y, z) = \mu \langle 2y, 8z \rangle$ so that $$\begin{cases} 4z = 2 \mu y \\ 4y - 16 = 8 \mu z \end{cases}$$ is the relevant system of equations. Considering that $\mu$ is nonzero, we can eliminate it by taking $$16 \mu z^2 = (2z)(8 \mu z) = (2z)(4y - 16) = (\mu y)(4y - 16) = \mu (4y^2 - 16y)$$ and cancelling a factor of $\mu$ from the left- and right-hand sides. We have therefore that $16z^2 = 4y^2 - 16y.$ Use the fact that $16z^2 = 4(16 - y^2)$ to solve for $y.$
