The shortest distance between two points is a straight line (if there’s nothing in the way). But how can we prove this?
Imagine some arbitrarily curved path defined by the function between two fixed points: this is clearly not the shortest path. Figure below shows curved path between two fixed points (spanning the interval of to ).
What is the distance along this path between these two fixed points? Solving this problem is clearly not as simple as using the Pythagorean theorem, or is it?
If we break up the length of the path into infinitesimal segments of size , we can then use the Pythagorean theorem to characterize the length of the segments:
Where and are the infinitesimal legs, and is the hypotenuse.
Figure below shows an infinitesimal line segment of a curved path.
Computing the entire length of the path is then a matter of adding up all these infinitesimal segments. To do this, take note that the first derivative of the path’s function is the ratio of the infinitesimal legs (this is the same thing as slope).
and so the length of the hypotenuse can be expressed in terms of the derivative of :
The total length along path from to is then the sum of all the segments from to . You find the sum of infinitesimals by taking the integral:
Alright, so we are able to measure the length of a path by evaluating this integral. But how does this prove the shortest path is a straight line? For this we need to delve into what is known as “calculus of variations”. What we want to do is minimize the distance along the path between two points, and see if the resulting function defines a straight line.
For the sake of simplicity, we can express the integrand above as .
A more generalized path from to is a function of position and slope , which we can write as:
which is also know as a Lagrangian.
We want to minimize the length of path, so that means we want to minimize any deviation, or variation from the shortest path.
To characterize how much variation is in the length of a path, we can vary the integral using to signify what is being varied. This works like a derivative operator:
Then inside the integral we have a varied Lagrangian:
Here we’ll use some substitution from the product rule, to substitute the second term, so that we are varying in terms of and not both and :
So now all the variation is only in terms of .
We can now look at the whole integral and evaluate it.
The second integral term is easily evaluated
At the endpoints of our path and there is no variation, since they are fixed by definition. So . And the second term is equal to , so we are left with:
Figure below shows variation between the endpoints, but no variation at the endpoints.
Now if we want to minimize the variation in path length, we set the variation to zero: , and since between the endpoints, that means:
This result is known as the Euler-Lagrange equation, and it is used to compute things like equations of motion.
We can then plug in our Lagrangian from earlier into the Euler-Lagrange equation. The first term is easy:
, since there’s no dependence in our .
So this only leaves the other term
Where is an arbitrary constant from integration.
We then compute the other term:
Now we can solve for so we can then get the form of :
Since is an arbitrary constant, we can just say:
Integrate both sides to get the form of
We get a factor of and an arbitrary constant
This is a straight line!
So the path with the minimal variation is a straight line.
Figure below shows blue line with arbitrary variation, and black line with minimal variation.
What about higher dimensions of space? We just saw a 1-D path in a 2-D space. (The path with the minimal variation is a straight line). What about a 2-D surface in 3-D space? What is the surface with minimal variation? Instead minimizing length, we’ll now be minimizing surface area.
To characterize the nature of a surface we resort to infinitesimal segments again: except here they are planes instead of hypotenuses.
Figure below shows that a curved surface can be thought of as many infinitesimal planes stitched together:
Here we will use the fact that a plane can be defined by two vectors, or rather the vector resulting from their cross product:
Figure below shows how infinitesimal vectors form an infinitesimal plane (segment of a surface):
The magnitude of the cross product vector defining this plane is equivalent to the area between the two original vectors (the area of the plane):
Using the same factoring method we used before, we can express area in terms of derivatives:
To add up the infinitesimal area segments we take the integral along both dimensions and :
The integrand here is also a Lagrangian:
Just like with the line, this surface Lagrangian generalizes to:
Notice now there are two derivatives in the Lagrangian.
We can vary this Lagrangian too to minimize the area:
We can also use the same substitution trick we used before to vary only in terms of :
At the endpoints , so the terms with pipes vanish.
If we then plug back into the surface integral and minimize variation:
Between the endpoints there is variation :
So the Euler-Lagrange equation in the 2-D case is:
We can then plug in our Lagrangian into this Euler-Lagrange equation:
What we end up with is something not as simple as a straight line. We get an equation that describes what are called minimal surfaces:
This equation is also known as Lagrange’s equation.
The higher dimensional analog to a straight line, a plane, satisfies Lagrange’s equation
Plug it in and see. But it’s not the only solution!
In 2-D, the only one solution is a straight line. The strangeness comes when we add a dimension. In 3-D, there are more solutions than just the plane!
Other solutions include catenoids, helicoids, and weird things like the Saddle Tower.
Figure below is a catenoid:
Minimal surfaces can be created by dipping wire frames into soapy water. Surprising to me though is that a sphere or spherical bubble: is not a minimal surface! (If you plug it into the Lagrange equation, you get back a contradiction.)
With no outside forces, a line gives the shortest distance between two points, a plane, a catenoid, etc give the 2-D version of this. But what happens when outside forces, like gravity are present? The shortest distance may no longer be a straight line. The minimal surface may no longer be a flat plane. This is where you can derive things like the shape of catenary cables, and brachistochrones. I’ll leave this topic of applying force for another day.