Determine the point on a curve closest to a fixed point.

Problem statement:

Given a curve y = f(x) and a point (a, b), determine the point (x, f(x))
so that the distance from (a, b) to (x, f(x)) is as small as possible.
This is often stated that we want to minimize the distance from the point
(a, b) to the curve y = f(x).

The accompanying animation shows y = f(x) = x1/2 and (a, b) = (3, 0).