Let the square of the distance function be f ( x , y , z ) = x 2 + y 2 + z 2 f(x,y,z)=x^2+y^2+z^2 f ( x , y , z ) = x 2 + y 2 + z 2
Given, the constraint function g ( x , y , z ) = x y + 12 x + z 2 g(x,y,z)=xy+12x+z^2 g ( x , y , z ) = x y + 12 x + z 2
Apply Lagrange Multiplier as,
∇ f ( x , y , z ) = λ g ( x , y , z ) \nabla f(x,y,z)=\lambda g(x,y,z) ∇ f ( x , y , z ) = λ g ( x , y , z )
So, find the gradient both sides to obtain,
< 2 x , 2 y , 2 z > = λ < y + 12 , x , 2 z > <2x,2y,2z>=\lambda\ <y+12,x,2z> < 2 x , 2 y , 2 z >= λ < y + 12 , x , 2 z >
Equate to gradients of both sides as,
2 x = λ ( y + 12 ) , 2 y = λ ( x ) , 2 z = λ ( 2 z ) 2x=\lambda (y+12),
2y=\lambda (x),
2z=\lambda (2z) 2 x = λ ( y + 12 ) , 2 y = λ ( x ) , 2 z = λ ( 2 z ) From equation 2 z = λ ( 2 z ) , λ = 1 2z=\lambda (2z),\lambda=1 2 z = λ ( 2 z ) , λ = 1 , so plug λ = 1 \lambda=1 λ = 1 into 2 y = λ ( x ) 2y=\lambda (x) 2 y = λ ( x ) to obtain x = 2 y x=2y x = 2 y .
Next, plug x = 2 y x=2y x = 2 y and λ = 1 \lambda=1 λ = 1 into equation 2 x = λ ( y + 12 ) 2x=\lambda (y+12) 2 x = λ ( y + 12 ) and solve for y y y as,
2 ( 2 y ) = ( y + 12 ) 2(2y)=(y+12) 2 ( 2 y ) = ( y + 12 ) 4 y = y + 12 4y=y+12 4 y = y + 12 Subtract y y y from both sides to isolate variable y y y from constant as,
4 y − y = y + 12 − y 4y-y=y+12-y 4 y − y = y + 12 − y 3 y = 12 3y=12 3 y = 12 Divide both sides by 3 3 3 to obtain,
3 y 3 = 12 3 \frac{3y}{3}=\frac{12}{3} 3 3 y = 3 12 y = 4 y=4 y = 4
So, the value of y y y is y = 4 y=4 y = 4 and x = 2 y = 2 ( 4 ) = 8 x=2y=2(4)=8 x = 2 y = 2 ( 4 ) = 8
Now, plug the values of x x x and y y y into constraint equation x y + 12 x + z 2 = 144 xy+12x+z^2=144 x y + 12 x + z 2 = 144 and solve for z z z as,
( 8 ) ( 4 ) + 12 ( 8 ) + z 2 = 144 (8)(4)+12(8)+z^2=144 ( 8 ) ( 4 ) + 12 ( 8 ) + z 2 = 144 32 + 48 + z 2 = 144 32+48+z^2=144 32 + 48 + z 2 = 144 80 + z 2 = 144 80+z^2=144 80 + z 2 = 144 Subtract 80 80 80 from both sides to obtain,
80 + z 2 − 80 = 144 − 80 80+z^2-80=144-80 80 + z 2 − 80 = 144 − 80 z 2 = 64 z^2=64 z 2 = 64 z = ± 8 z=±8 z = ± 8 Now, plug x = 8 , y = 4 x=8,y=4 x = 8 , y = 4 and z = ± 8 z=±8 z = ± 8 into objective function f ( x , y , z ) = x 2 + y 2 + z 2 f(x,y,z)=x^2+y^2+z^2 f ( x , y , z ) = x 2 + y 2 + z 2 to obtain,
f ( 8 , 4 , ± 8 ) = ( 8 ) 2 + ( 4 ) 2 + ( ± 8 ) 2 = 64 + 16 + 64 = 144 f(8,4,±8)=(8)^2+(4)^2+(±8)^2=64+16+64=144 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 d=\sqrt{144}=12 d = 144 = 12
Therefore, the shortest distance from the surface x y + 12 x + z 2 = 144 xy+12x+z^2=144 x y + 12 x + z 2 = 144 to the origin is [ 12 ] [12] [ 12 ] .