I found out something beautiful

When walking, I know that my aim
 Is caused by the ghosts with my name. 
And although I don’t see 
Where they walk next to me, 
I know they’re all there, just the same.

-David Morin (Introduction to Classical Mechanics, 2008)

Sounds eerie, right? But, in a certain interpretation of the notion of action of a path in physics, this is actually true, and the math behind it, calculus of variations, is truly fascinating in itself.

Taylor Series: An overview

For those of you who know calculus, it's taught late into differential stuff that we can find minimas and maximas of a function, say $f(x)$ by looking for the points where $f'(x)$ turns zero. Later on, in the same course, we get an intuition for why this is true, in the $\text{Taylor series}$, a powerful way to make sense of any ( differentiable) function, by using simple polynomials.

So for any random differentiable function $f(x)$, the Taylor series, of $f(x)$ around the input $x=a$ looks like:

$$f(x-a)=\sum_{n=0}^{\infty}\frac{f^{(n)}a}{n!}(x-a)^n$$

In simpler terms

$$f(x-a)=f(a)+f'(a)(x-a)+f''(a)\frac{(x-a)^2}{2!}+f'''(a)\frac{(x-a)^3}{3!}+...$$

With this (not-so) quick overview out of the way, we see a reason why making $f'(x)=0$ makes it a maxima or a minima. Let's assume that $f'(b)=0$, so, as for small changes to the input $b \rightarrow b+\epsilon$:

$$f(b+\epsilon)=f(b)+f'(b)(b+\epsilon-b)+f''(b)\frac{(b+\epsilon-b)^2}{2!}+...$$

which leaves us with nice cancellation of the b's :

$$f(b+\epsilon)=f(b)+f'(b)(\epsilon)+f''(b)\frac{(\epsilon)^2}{2!}+...$$

and $\epsilon$ which was already lees than one vanishes to nothingness on squaring/cubing/... it. And so, the only  $``$legitimate" way for $\epsilon$ to change the input, i.e by adding the term $f'(b)\times \epsilon$, is  $``$snatched away" from our poor guy and thus the function remains at approximately the same in this region around $x=b$. We can say that the function remains $``$stationary"(remember this term)

Phew! a visual would do everyone well here, wouldn't it? So here's one:




You, can, ahem, clearly see that changing the input by a small amount leads to a negligible difference in the output of the function. 

Calculus of Variations 

Now, after a major overview/ detraction, we come back to the main topic, the Lagrangian and the calculus of variations. To be honest, I am still beginning to understand it, so I may start talking strange in some cases. 

Calculus of Variations is actually the $``$calculus of functions" and instead of making small changes in the value of $x$ we make a small change in the $``$value" of $f(x)$, which is another function which makes a small contribution (we actually force it to make a small contribution). So for the analogue of writing $x\rightarrow x+\epsilon$, we write $f(x) \rightarrow f(x)+ \alpha \eta(x)$, where $\alpha$ is the forcing thing I talked about by making this $\alpha$ extremely small. 

Now, what's the point of explaining all this $``$infinitesimal" change in a function? Why can't we simply use the normal calculus to just plugin numbers here and there, to just check it out? Well, we are doing the exact same thing as plugging in numbers, just in a very generalised way by denoting the small change as a function in itself, which to me vaguely feels like the $O(n)$ thing in computer science, but backwards. 


So what is it that we do need to extremise? Well, this is the function of a function, or what can be called a functional, which go with almost the same make-up as functions, except using square brackets. So a functional $J$ which  depends on $f(x)$ is written as $J[f(x)]$, which takes in $f(x)$ and spits out a number which may belong to $\mathbb{R}$ or $\mathbb{C}$.

<rant>
 Now, since they have been bestowed with function-like notation, are there any more similarities (apart from the frankly, most useful) with them? Like, are they behaving like a mapping from some space to some space? I mean, it looks kinda like we're taking an input from a $``$set of functions" $X$ to the real line or complex plane. The part of using a function to denote a small change feels like a little patch up to me. But I am no expert, so maybe you can comment below and help me with a more rigorous definition.
</rant>

The Principle of Stationary Action

Now, let's come to the main meat behind the physics applications. Action is a functional(I wouldn't have ranted about functtionals if it wasn't), which means the action $S=S[f(t),f'(t),...]$. More specifically, 
$$S=\int_{t_1}^{t_2} L(f(t), f'(t), t) dt $$ where L is called the Lagrangian operator and $L=KE-PE=T-V$

And, the principle we say is that the body will take the path defined by that function $f(t)$, which gives a stationary value of S, which occurs at $``$stationary" points (aka maximas, minimas and saddle points), which have no $``$ first order" changes and so, in mathematical notation:

$$\frac{dS}{d\alpha}=0$$

Let's use our Taylorian approach to see this, by substituting $f(t)+\alpha \eta(t)$ instead of $f(t)$, where $\eta$ is a well-defined function that takes on the values $\eta(t_1)=\eta(t_2)=0$ (one of the reasons is obvious, we want the starting and end values for the function to be the same, the other we'll see later)

$$S=\int_{t_1}^{t_2} L(f(t)+\alpha \eta(t), f'(t)+\alpha\eta'(t), t) dt$$
$$\Rightarrow S=\int_{t_1}^{t_2} L(f(t), f'(t), t) dt+\int_{t_1}^{t_2} \bigg(\frac{\partial L}{\partial f} \alpha \eta(t) +\frac{\partial L}{\partial f'}\alpha \eta'(t)\bigg)+O(t^2)$$

$$\delta S \approx \int_{t_1}^{t_2}\bigg( \frac{\partial L}{\partial f} \alpha \eta(t) +\frac{\partial L}{\partial f'}\alpha \eta'(t)\bigg) dt$$

Now, just like the Taylor series, we "snatch" the "right" away from $\alpha$ to "legitimately" influence the outputs

$$I=\int_{t_1}^{t_2}\bigg( \frac{\partial L}{\partial f} \eta(t) +\frac{\partial L}{\partial f'} \eta'(t)\bigg) dt=0$$

Now, this seems tricky stuff, and we use one of the most (in)famous tricks in calculus, the integration by parts method:

$$\text{So using IBP on this term }\frac{\partial L}{\partial f'} \eta'(t), \text{ we get}  $$


$$I=\bigg[\eta(t)\frac{\partial L}{\partial f'}\bigg]\bigg|_{t=t_1}^{t=t_2}-\int_{t_1}^{t_2}\eta(t)\frac{d}{dt}\bigg(\frac{\partial L}{\partial f'}\bigg)dt+\int_{t_1}^{t_2}\eta(t)\frac{\partial L}{\partial f}dt$$

We now finally come to use the fact that $\eta(t_1)=\eta(t_2)=0$ to kill one term up there, which was the evaluation of $\eta\frac{\partial L}{\partial f'}$ from $t_1$ to $t_2$

And so $I$ becomes:

$$I=\int_{t_1}^{t_2} \eta(t)\bigg(\frac{\partial L}{\partial f}-\frac{d}{dt}\bigg(\frac{\partial L}{\partial f'}\bigg)\bigg)dt=0$$

Now since $\eta$ was this arbitrary random function, we can't equate it to zero and hope to get a general solution. Heck, it doesn't even involve the original function! It's obvious that $\eta=0$ isn't a useful solution. Since if you aren't varying the function, it is all that it has and "is in itself the lowest of the lowly and the highest of the divine"(that became a bit too philosophical), moving on!

So we get that the other term, i.e.
$$\bigg(\frac{\partial L}{\partial f}-\frac{d}{dt}\bigg(\frac{\partial L}{\partial f'}\bigg)\bigg)=0$$

This is the Euler-Lagrange equation, which reduces the complexities of Newtonian dynamics into just taking a few derivatives

Now, how is this connected to "ghosts with my name"?

Well, it is in a certain sense, that nature is calculating this path all the time, "not using" mathematics, but actually making the particle (or you) travel through all the feasible paths(the $\eta$ 's) that connect point A(where you are) to point B(where you want to go). Never forget to say hi! to your countless identical friends helping you cross the street from now on! 


Comments

Popular

I love people/I hate people

"Hello World"