Write a function f(x; y; z) which represents the square of the distance between
a point (x; y; z) and the point (2; 3; 4). Certainly, the distance is minimized exactly when
f(x; y; z) is minimized. Suppose we are constrained to live on the surface of the sphere
described by x^2 + y^2 + z^2 = 18. Find the points on the sphere which are closest and farthest
from the point (2; 3; 4)
Copyright © 2024 Q2A.ES - All rights reserved.
Answers & Comments
Verified answer
Let D = d^2 = (x - 2)^2 + (y - 3)^2 + (z - 4)^2
.........= x^2 - 4x + y^2 - 6y + z^2 - 8z + 29
.........= -4x - 6y - 8z + 47, via constraint
We want to optimize
D = -4x - 6y - 8z + 47, subject to x^2 + y^2 + z^2 = 18
Via Lagrange, grad D = λ grad g
==> <-4, -6, -8> = λ<2x, 2y, 2z>
==> x = -2/λ, y = -3/λ, z = -4/λ.
Substitute into g:
4/λ^2 + 9/λ^2 + 16/λ^2 = 18
==> λ = ±√58 / 6.
So, (x, y, z) = (±12/√58, ±18/√58, ±24/√58) will yield the maximal/minimal distances.
I hope this helps!