Let the two points be labelled and and have coordinates and . The length of an element of path is given by
and hence the total path length is given by
The Euler-Lagrange equation
can be rearranged to
since does not contain explicity. We can now differentiate and set it to a constant value.
which, as expected, is the equation of a straight line in the form .