The Action Principle

Recall that physical trajectories in conservative systems obey a principle of least action where the classical trajectory is the one that minimizes the action.  Let us explore this for the simple harmonic oscillator.  Here we know the solution is sinusoids, but let’s add another function that doesn’t change the boundary condition x(t=0) = 0, and x(t=2 π/ω)=0:

x[a_,b_,c_,ω_,t_]=a Sin[ω t]+b Sin[2 ω t]+c Sin[3 ω t];

Here is the Lagrangian, T-U for the SHO:

L[m_,a_,b_,c_,ω_,t_]=1/2 m D[x[a,b,c,ω,t],t]^2-1/2 m ω^2 x[a,b,c,ω,t]^2;

Let us now calculate the action:

S[m_,ω_,a_,b_,c_]=Integrate[L[m,a,b,c,ω,t],{t,0,2 π/ω}]

Clearly the action is minimized when both of b = 0 and c = 0, or, in other words, we pick the *right* function!