Let’s define g(x,y,z)=x2+y+z2, so the problem is to find the maximum of f(x,y,z) subject to the constraint g(x,y,z)=1. We have
∇f=λ∇g
⟨4,2,1⟩=λ⟨2x,1,2z⟩Reading this component by component and including the restriction we get the system of equations
4=2λx
2=λ
1=2λz
x2+y+z2=1 Then x=1,z=41,λ=2.
1+y+161=1
y=−161The maximum of f occurs when x=1,y=−161,z=41.
f(1,−161,41)=4(1)+2(−161)+41=833
Comments