#PhysicsFactlet (273)
A brief introduction to the calculus of variations.
Trigger warning: lots of formulas manipulated the way experimental physicists do 🙂
🧵 1/
The simplest introduction to the calculus of variations is to solve in a slightly roundabout way a very easy geometrical problem: what is the shortest path between 2 points on a plane?
(spoiler: it's a straight line)
2/
Let's pretend we have no idea, and so we are forced to take into consideration all possible functions passing through 2 given points. What we want to do is to calculate the length of each of them, and select the shortest one.
(spoiler: we are not REALLY going to do that)
3/
The length of a curve is given by the integral (between the start and finish points) of the infinitesimal lengths ds. And, since we are on the plane, ds is given by Pythagoras theorem.
4/
With some manipulation that will make any mathematician in a 10km radius scream, we can rewrite ds, and thus the length of the curve, in a more convenient way.
5/
What we want to do now is to look over all possible functions that pass from the two points, and select the one with the shortest length. This is impossible to do via brute force, so we are going to "cheat" 🙂
6/
Imagine that y(x) is the function we are looking for (i.e. our solution). Any function f(x) that we look will be the (unknown) solution y(x) plus a "perturbation" ε η(x), where η(x) is also a function, and ε is a number that tells us how big the perturbation is.
7/
When you look for the minimum of a function (or functional), what you want to do is to differentiate it, and then look when the derivative is zero. In this case we want to differentiate with respect to ε. Furthermore we know that we will get our solution at ε=0.
8/
To make the derivative we make use of the chain rule, and then we set ε=0 remembering how we defined f(x).
9/
The next step is (as it is often the case) an integration by parts.
The first term is zero because η(x) is zero at both extremes. So also the second term must be zero, and it must be zero for every possible η, meaning that the part in square brackets must be zero too.
10/
If the derivative of a function is zero, it means that the function itself is a constant. And if we rearrange it, we find that y' is also a constant, meaning that our solution was a straight line after all!
Is your mind suitable blown? 😉
11/
Was this just much ado about nothing? Well, we solved a problem we already knew the solution of, but in doing so we stumbled on a quite general way of solving this kind of problems. So let's look again at what we have done.
12/
Let's say we want to find the function f that minimizes (or maximizes) the functional I. We can once again pretend that f is the sum of our unknown solution + a perturbation.
13/
To find the minimum (or the maximum) we want to differentiate with respect to ε, and then set ε=0 like we did before.
14/
We again integrate by parts the second term, and notice that we remain with a term that goes to zero because η is zero at the extremes, and a term that must be zero whatever η is.
15/
The final differential equation that we found might be familiar to you, as it is exactly the Euler-Lagrange equation that governs the dynamics of classical mechanics systems. We just have to interpret the parameter x as time, and F as the Lagrangian of the system.
16/
Exercise (a simple but instructive one): find the shortest line between two points on a cylinder.
Obviously we want to do it in cylindrical coordinates. We can also assume that the axis of the cylinder is aligned with the z coordinate, and that the cylinder has radius R.
17/
What is the functional we want to minimize? As we did before we use Pythagoras' theorem to find ds and thus the length of the curve.
18/
Since we now know F, we apply the Euler-Lagrange equation we found above, and (lo and behold!) we find that the geodesics on a cylinder looks suspiciously similar to the geodesics on a plane 😉
19/
This is clearly just the tip of the iceberg, but if you were not familiar with the calculus of variations, I hope I managed to show you the general idea behind it 🙂
20/20
(If you manage to read through 20 tweets with all those equations, I congratulate you!!!)
Share this Scrolly Tale with your friends.
A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.