Using the method of Lagrange multipliers: the Lagrangian is
Fix λ > 0.
That is, we are minimizing the squared distance of a point (x, y, z) on the paraboloid to the point (4, 5, 6). We can use the squared distance in place of the proper Euclidean distance because both f(x) and √f(x) have critical points at the same point x ; plus the math works out much more easily.
Find the critical points of the Lagrangian:
Solving for λ in terms of x, y, or z gives
so right away, we get
Substitute these into the constraint and solve for x, then for y and z :
This has 3 roots, but we take the lone positive solution for x because otherwise λ would be negative. This root is x ≈ 0.7965.
Then it follows that the closest point on the paraboloid to (4, 5, 6) is the critical point (0.7965, 0.9956, 6.5028).