Minimum Distance to an Ellipse
Date: 06/10/99 at 11:18:23
From: Christian Gauthier
Subject: Geometry Conic Ellipse
What is the minimum distance between a point inside or outside an
ellipse and the ellipse, if I know the general equation of the ellipse
Date: 06/10/99 at 15:26:53
From: Doctor Rob
Subject: Re: Geometry Conic Ellipse
There may be a general formula for this, but if so, it is so
complicated that no one would ever write it out explicitly. I would
find the distance in the following way.
The point
Q(x0,y0)
on the ellipse whose distance from the given point
P(X,Y)
is least at a point such that the tangent to the ellipse at
Q
is perpendicular to the line PQ. The slope of the tangent at
y0
.
Then for these solutions, the distance PQ should be computed, and the smallest of them chosen as the answer. For an ellipse, the largest one will give you the point farthest from P .
In theory, you can solve the quartic in terms of radicals, but the result of trying to do that is generally an unmanageably complicated formula. Once you have the quartic, if you cannot factor it into linear and quadratic factors, you might as well solve it numerically.
Note that this solution does not depend on the curve being an ellipse, just a quadratic equation in x and y. It will give you the answer for parabolas, hyperbolas, and degenerate conics, too.
As an example, take the point
Then
and the slope of the perpendicular to the tangent line at Q(x0,y0) is
and that line is
Since P(3,8) is on that line, we get the equation
and since Q is on the curve, we get the equation
Eliminating
y0
from these two equations, we end up with the quartic
equation
This polynomial doesn’t factor, so we solve numerically.
There are two real roots,
x0=−0.0767858556
and
x0=1.7998308063
, approximately, and the corresponding values of
y
are
Another approach is to use a Lagrange Multiplier. Set
Then set the partials of
f
with respect to
- Doctor Rob, The Math Forum
http://mathforum.org/dr.math/