(a) We have f(x,y,z) = x² + x + y² + z² subject to the constraint x² + 2y² + 2z² = 16. We let g(x,y,z) = x² + 2y² + 2z² - 16 and let Γ denote gradient. Then Γf = ∂f/∂x i + ∂f/∂y j + ∂f/∂z k = (2x+1) i + 2y j + 2z k and Γg = ∂g/∂x i + ∂g/∂y j + ∂g/∂z k = 2x i + 4y j + 4z k. By the Lagrange multiplier method, we have Γf = µ Γg at the maximum and minimum values of f on the given constraint, for some non-zero real value µ. Hence,
(2x+1) i + 2y j + 2z k = Γf = µ Γg = µ (2x i + 4y j + 4z k) = 2xµ i + 4yµ j + 4zµ k;
hence,
2x+1 = 2xµ
2y = 4yµ
2z = 4zµ.
We observe that by the above 3 equations, we have two possibilities: (1) y and z may be both zero or (2) either y or z (or both) may not be zero. (Note that analyzing the possibilities given by the µ equations will likely be the most creative part of solving for the maximum and minimum using the Lagrange method, as such may require more than one approach.)
(1) If y and z both equal 0, then by the contraint 16 = x² + 2y² + 2z² = x² + 2∙0² + 2∙0² = x²; hence, x = ± 4; hence, we have the the points (4,0,0) and (-4,0,0) at which to examine the value of f. Plugging values into f, we have f(4,0,0) = 4² + 4 + 0² + 0² = 20 and f(-4,0,0) = (-4)² + (-4) + 0² + 0² = 12.
(2) If either x or y does not equal zero, then µ = ½ by either the second or third of the 3 equations, and by the first equation 2x + 1 = 2xµ = 2(½)x = x and consequently x = -1. And by the given constraint 16 = (-1)² + 2y² + 2z² and consequently y² + z² = 7.5. Plugging values into f, we have f(-1,y,z) = (-1)² + (-1) + y² + z² = (-1)² + (-1) + 7.5 = 7.5.
Consequently, the maximum value of f subject to the given constraint x² + 2y² + 2z² = 16 is 20 and the minimum value of f subject to the constraint is 7.5.
(b) We have f(x,y,z) = x² + x + y² + z² over the set S = {(x,y,z): x² + 2y² + 2z² ≤ 16}. As we have the maximum and minimum over the set {(x,y,z): x² + 2y² + 2z² = 16}, we need only look for local maxima and minima over the set {(x,y,z): x² + 2y² + 2z² < 16}. For a point to qualify as a local maximum or local minimum of f, at the very least the ∂f/∂x, ∂f/∂y, and ∂f/∂z must all equal zero. Consequently prospects are limited by:
0 = ∂f/∂x = 2x + 1
0 = ∂f/∂y = 2y
0 = ∂f/∂z = 2z ;
hence, we have only one point to examine (-½,0,0). We have f(-½,0,0) = (-½)² + (-½) + 0² + 0² = -¼. Hence, as f is continuous over S, we have a maximum for f over S of 20 (from part (a)) and a minimum for f over S of -¼.