To find the minimum distance between a point in the plane (x_0, y_0) and a quadratic plane curve y = a_0 + a_1 x + a_2 x^2, note that the square of the distance is r^2 | = | (x - x_0)^2 + (y - y_0)^2 | = | (x - x_0)^2 + (a_0 + a_1 x + a_2 x^2 - y_0)^2. Minimizing the distance squared is equivalent to minimizing the distance (since r^2 and left bracketing bar r right bracketing bar have minima at the same point), so take (d(r^2))/(dx) = 2(x - x_0) + 2(a_0 + a_1 x + a_2 x^2 - y_0)(a_1 + 2a_2 x) = 0.