Let the square of the distance function be f(x,y,z)=x2+y2+z2
Given, the constraint function g(x,y,z)=xy+12x+z2
Apply Lagrange Multiplier as,
∇f(x,y,z)=λg(x,y,z)
So, find the gradient both sides to obtain,
<2x,2y,2z>=λ <y+12,x,2z>
Equate to gradients of both sides as,
2x=λ(y+12),2y=λ(x),2z=λ(2z)From equation 2z=λ(2z),λ=1 , so plug λ=1 into 2y=λ(x) to obtain x=2y.
Next, plug x=2y and λ=1 into equation 2x=λ(y+12) and solve for y as,
2(2y)=(y+12)4y=y+12Subtract y from both sides to isolate variable y from constant as,
4y−y=y+12−y3y=12Divide both sides by 3 to obtain,
33y=312y=4
So, the value of y is y=4 and x=2y=2(4)=8
Now, plug the values of x and y into constraint equation xy+12x+z2=144 and solve for z as,
(8)(4)+12(8)+z2=14432+48+z2=14480+z2=144 Subtract 80 from both sides to obtain,
80+z2−80=144−80z2=64z=±8 Now, plug x=8,y=4 and z=±8 into objective function f(x,y,z)=x2+y2+z2 to obtain,
f(8,4,±8)=(8)2+(4)2+(±8)2=64+16+64=144
Next, find the square root of objective function as,
d=144=12
Therefore, the shortest distance from the surface xy+12x+z2=144 to the origin is [12].
Comments