Jacopo Bertolotti Profile picture
Apr 26, 2021 20 tweets 6 min read Read on X
#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!!!)

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Jacopo Bertolotti

Jacopo Bertolotti Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @j_bertolotti

Feb 24, 2023
#PhysicsFactlet
An attempt to explain what tensors are for people with high-school Math (if you are a mathematician, this thread is not for you).

Not sure why, but tensors are often introduced in a very confused way, that makes them look more scary than they actually are.

1/
Let's assume you are familiar with matrices (if you aren't, chances are you don't care what a tensor is), so the fact that multiplying rows by columns a row vector with a column vector yields a scalar (i.e. a single number) should be no surprise to you.

2/ A schematic representation of a row vector multiplying a col
If we make a column of row vectors, we can repeat the process for each of them and put the results also in a column, resulting in the usual multiplication of a matrix by a vector.

3/ Schematic representation of a column of row vectors multiply
Read 12 tweets
Oct 24, 2022
#PhysicsFactlet (346)
A few days back I stumbled on a @AAPTHQ paper that has the words "Space pirates" in the tile, read it, and decided it was a lot of fun, so now you get a mini-thread and a couple of simple animations 😉
1/
aapt.scitation.org/doi/full/10.11…
Sadly the paper is not truly about space pirates, but about the "pursuit curve"problem. I.e. object A is moving, object B follows it (pointing toward A at each time), and you want the path traced by B in the pursuit.
2/
If A is moving at constant speed in a straight line, and B is moving at a constant but higher speed, this problem can be solved analytically (at the price of a couple of nasty integrals).
3/
Read 10 tweets
Sep 12, 2022
#PhysicsFactlet (342) Lagrange multipliers
Strictly speaking Lagrange multipliers are not "Physics", but they are so useful to solve so many Physical problems, that it is definitively worth looking at them.
1/
Before we even introduce them, let's solve a super-simple problem, which will form the basis for our motivation to look into Lagrange multipliers:
Find the minimum of the function f=x²+y².

Yes, I can hear you shouting x=y=0, but let's still do the calculation.
2/
The way you find the minimum of a function is to check the points where all the partial derivatives are zero (in this case we have 2 variables, so we will look at the partial derivatives with respect to x and y): df/dx=2 x, df/dy=2y --> 2x=0, 2y=0 --> x=y=0.
3/
Read 15 tweets
Sep 11, 2022
#PersonalOpinionOnOldishGame
You can't really finish #MonsterHunterWorld, but I have played as much as I am going to (100+ hours), so here are a few thoughts about it.
TL;DR: it is a good game with some incomprehensible flaws.
1/
Monster Hunter: World is the Nth (with N being a large integer) game in the the Monster Hunter series, but it was the first one I ever played (the new one, Monster Hunter: Rise is only on Nintendo Switch).
2/
The story is non-existent, so let's ignore it. It is just a poor excuse for you to run around some well designed maps hunting and killing dinosaur-like monsters.
There are only 5 maps in the base game, but they are large enough not to be too repetitive.
3/
Read 11 tweets
Jul 18, 2022
#PhysicsFactlet (335)
Yesterday, at a small playground where my son was playing, I saw this Kugel fountain, so here comes a short thread about Kugel fountains and how they work.
🧵 1/

(Alt Text: a Kugel fountain slowly rotating in a sunny day.)
First of all, what is a Kugel fountain?
There are a few variations on the theme, but usually they are big stone spheres, sitting on a hemispherical hole, with water flowing from below. Despite their weight, they can spin with a small push, and keep spinning for a long time.
2/
How does it work?
It can't be buoyancy, as the stone sphere is a a LOT more dense than the water (we all have direct experience of stones sinking when you put them in water, and this one is not any different).
3/
Read 10 tweets
May 13, 2022
#PhysicsFactlet (331)
"Anderson localization" is a weird phenomenon that is not well known even among Physicists, but has the habit of popping up essentially everywhere.
An introductory thread 🧵
1/
The idea of "localization" originally came about as an explanation (by P.W. Anderson, hence the name) of why the spins in certain materials did not relax as fast as expected.
nobelprize.org/prizes/physics…
2/
What Anderson realized was that when you have a wave (in this case a quantum mechanical wavefunction) that propagates in a random system, interference can play a major role, and potentially impede propagation completely.
journals.aps.org/pr/abstract/10…
(Paywalled)
3/
Read 19 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(