info prev up next book cdrom email home

Point-Point Distance--2-D

Given two points in the Plane, find the curve which minimizes the distance between them. The Line Element is given by

\begin{displaymath}
ds=\sqrt{dx^2+dy^2},
\end{displaymath} (1)

so the Arc Length between the points $x_1$ and $x_2$ is
\begin{displaymath}
L = \int ds = \int_{x_1}^{x_2} \sqrt{1+{y'}^2}\,dx,
\end{displaymath} (2)

where $y'\equiv dy/dx$ and the quantity we are minimizing is
\begin{displaymath}
f=\sqrt{1+{y'}^2}.
\end{displaymath} (3)

Finding the derivatives gives
$\displaystyle {\partial f\over \partial y}$ $\textstyle =$ $\displaystyle 0$ (4)
$\displaystyle {d\over dx}{\partial f\over\partial y'}$ $\textstyle =$ $\displaystyle {d\over dx}[(1+{y'}^2)^{-1/2} y'],$ (5)

so the Euler-Lagrange Differential Equation becomes
\begin{displaymath}
{\partial f\over \partial y}-{d\over dx}{\partial f\over\partial y'}
= {d\over dx} \left({y'\over\sqrt{1+{y'}^2}}\right)=0.
\end{displaymath} (6)

Integrating and rearranging,
\begin{displaymath}
{y'\over\sqrt{1+{y'}^2}} = c
\end{displaymath} (7)


\begin{displaymath}
y'^2=c^2(1+{y'}^2)
\end{displaymath} (8)


\begin{displaymath}
y'^2(1-c^2)=c^2
\end{displaymath} (9)


\begin{displaymath}
y'={c\over\sqrt{1-c^2}} \equiv a.
\end{displaymath} (10)

The solution is therefore
\begin{displaymath}
y=ax+b,
\end{displaymath} (11)

which is a straight Line. Now verify that the Arc Length is indeed the straight-line distance between the points. $a$ and $b$ are determined from
$\displaystyle y_1$ $\textstyle =$ $\displaystyle ax_1+b$ (12)
$\displaystyle y_2$ $\textstyle =$ $\displaystyle ax_2+b.$ (13)

Writing (12) and (13) as a Matrix Equation gives
\begin{displaymath}
\left[{\matrix{y_1\cr y_2\cr}}\right]=\left[{\matrix{x_1 & 1\cr x_2 & 1\cr}}\right]\left[{\matrix{a\cr b\cr}}\right]
\end{displaymath} (14)


$\displaystyle \left[\begin{array}{c}a\\  b\end{array}\right]$ $\textstyle =$ $\displaystyle \left[\begin{array}{cc}x_1 & 1\\  x_2 & 1\end{array}\right]^{-1}\left[\begin{array}{c}y_1\\  y_2\end{array}\right]$  
  $\textstyle =$ $\displaystyle {1\over{x_1-x_2}}\left[\begin{array}{cc}1 & -1\\  -x_2 & x_1\end{array}\right]^{-1}\left[\begin{array}{c}y_1\\  y_2\end{array}\right],$ (15)

so
$\displaystyle a$ $\textstyle =$ $\displaystyle {y_1-y_2\over x_1-x_2} = {y_2-y_1\over x_2-x_1}$ (16)
$\displaystyle b$ $\textstyle =$ $\displaystyle {x_1y_2-x_2y_1\over x_1-x_2}$ (17)


$\displaystyle L$ $\textstyle =$ $\displaystyle \int_{x_1}^{x_2} \sqrt{1+y'^2}\,dy = (x_2-x_1)\sqrt{1+a^2}$  
  $\textstyle =$ $\displaystyle (x_2-x_1)\sqrt{1+\left({y_2-y_1\over x_2-x_1}\right)^2}$  
  $\textstyle =$ $\displaystyle \sqrt{(x_2-x_1)^2+(y_2-y_1)^2},$ (18)

as expected.


The shortest distance between two points on a Sphere is the so-called Great Circle distance.

See also Calculus of Variations, Great Circle, Point-Point Distance--1-D, Point-Point Distance--3-D, Point-Quadratic Distance, Tetrahedron Inscribing, Triangle Inscribing in a Circle


References

Arfken, G. Mathematical Methods for Physicists, 3rd ed. Orlando, FL: Academic Press, pp. 930-931, 1985.



info prev up next book cdrom email home

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