info prev up next book cdrom email home

Point-Quadratic Distance

Find the minimum distance between a point in the plane $(x_0,y_0)$ and a quadratic Plane Curve

\begin{displaymath}
y=a_0+a_1x+a_2x^2.
\end{displaymath} (1)

The square of the distance is
$\displaystyle r^2$ $\textstyle =$ $\displaystyle (x-x_0)^2+(y-y_0)^2$  
  $\textstyle =$ $\displaystyle (x-x_0)^2+(a_0+a_1x+a_2x^2-y_0)^2.$ (2)

Minimizing the distance squared is the equivalent to minimizing the distance (since $r^2$ and $\vert r\vert$ have minima at the same point), so take
\begin{displaymath}
{\partial (r^2)\over \partial x} = 2(x-x_0)+2(a_0+a_1x+a_2x^2-y_0)(a_1+2a_2x)=0
\end{displaymath} (3)


\begin{displaymath}
x-x_0+a_0a_1+{a_1}^2+a_1a_2x^2-a_1y_0+2a_0a_2x+2a_1a_2x^2+2{a_2}^2x^3-2a_2y_0x=0
\end{displaymath} (4)


\begin{displaymath}
2{a_2}^2x^3+3a_1a_2x^2+({a_1}^2+2a_0a_2-2a_2y_0+1)x+(a_0a_1-a_1y_0-x_0)=0.
\end{displaymath} (5)

Minimizing the distance therefore requires solution of a Cubic Equation.

See also Point-Point Distance--1-D, Point-Point Distance--2-D, Point-Point Distance--3-D




© 1996-9 Eric W. Weisstein
1999-05-25