You are on page 1of 7

Lagrangian Formulation

What is a Lagrangian?

Let’s assume a system with general set of coordinates as given below

{𝑞1 , 𝑞2 , … … … , 𝑞𝑛 }

With corresponding generalized velocities

{𝑞̇ 1 , 𝑞̇ 2 , … … … , 𝑞̇ 𝑛 }

Then the Lagrangian for a simple system without any friction and energy
dissipation, L, is given by

𝐿(𝑞1 , 𝑞2 , … … … , 𝑞𝑛 , 𝑞̇ 1 , 𝑞̇ 2 , … … … , 𝑞̇ 𝑛, 𝑡) = 𝐿(𝑞𝑖 , 𝑞̇ 𝑖 , 𝑡) = 𝒯 − 𝒱 𝑓𝑜𝑟 1 ≤ 𝑖 ≤ 𝑛

Where
𝒯 is the Kinetic Energy of the system
𝒱 is the Potential Energy of the system

What is the significance of the Lagrangian?


In order to understand the significance of the Lagrangian and Euler –
Lagrangian equation, it is important to define the Action of a system, the Extremal
Principle and the Principle of Least Action.

Euler - Lagrangian Equation


Action of a system
All equations of nature both classical and quantum mechanical equations can
be obtained from fundamental principles called the action principles. The action of a
system is defined as
𝑡2

𝐴(𝑡1 , 𝑡2 ) = ∫ 𝐿 𝑑𝑡
𝑡1
Where A is the action of the system and L is the Lagrangian.

Extremal Principle
If a system is in static equilibrium, then by extremal principle, the position of
the static equilibrium is determined by the minimum of the potential energy.

Principle of Least Action


Principle of least action states that when a particle is moving from point A to
B, its trajectory is such that the corresponding action of the system has the
minimum possible value. Therefore,
𝒕𝟐

𝜹 ∫ 𝑳 𝒅𝒕 = 𝟎
𝒕𝟏
The above equation can be written as
𝒕𝟐

∫ 𝜹𝑳 𝒅𝒕 = 𝟎
𝒕𝟏

𝜕𝐿 𝜕𝐿
𝛿𝐿 = 𝛿𝑞𝑖 + 𝛿𝑞̇
𝜕𝑞𝑖 𝜕𝑞̇ 𝑖 𝑖
𝒕𝟐
𝝏𝑳 𝝏𝑳
∴ ∫( 𝜹𝒒𝒊 + 𝜹𝒒̇ ) 𝒅𝒕 = 𝟎
𝝏𝒒𝒊 𝝏𝒒̇ 𝒊 𝒊
𝒕𝟏

𝑑𝑞𝑖 𝑑(𝛿𝑞𝑖 )
𝛿𝑞̇ 𝑖 = 𝛿 ( )=
𝑑𝑡 𝑑𝑡

Substituting 𝛿𝑞̇ 𝑖 in the above equation, we get


𝒕𝟐
𝝏𝑳 𝝏𝑳 𝒅(𝜹𝒒𝒊 )
∫( 𝜹𝒒𝒊 + ) 𝒅𝒕 = 𝟎
𝝏𝒒𝒊 𝝏𝒒̇ 𝒊 𝒅𝒕
𝒕𝟏

𝒕𝟐
𝒕𝟐
𝝏𝑳 𝒅 𝝏𝑳 𝝏𝑳
∫( − ( )) 𝜹𝒒𝒊 𝒅𝒕 + | 𝜹𝒒 | = 𝟎
𝝏𝒒𝒊 𝒅𝒕 𝝏𝒒̇ 𝒊 𝝏𝒒̇ 𝒊 𝒊 𝒕
𝒕𝟏 𝟏

𝑡2
𝜕𝐿
| 𝛿𝑞 | = 0 (𝑆𝑖𝑛𝑐𝑒 𝑡ℎ𝑒 𝑡𝑒𝑟𝑚 𝛿𝑞𝑖 = 0 𝑎𝑡 𝑡1 𝑎𝑛𝑑 𝑡2
𝜕𝑞̇ 𝑖 𝑖 𝑡
1

𝒕𝟐
𝝏𝑳 𝒅 𝝏𝑳
∴ ∫( − ( )) 𝜹𝒒𝒊 𝒅𝒕 = 𝟎
𝝏𝒒𝒊 𝒅𝒕 𝝏𝒒̇ 𝒊
𝒕𝟏

The above equation yields

𝝏𝑳 𝒅 𝝏𝑳
− ( )=𝟎
𝝏𝒒𝒊 𝒅𝒕 𝝏𝒒̇ 𝒊

The above equation is called the Euler- Lagrange Equation.


We know that
𝑳(𝒒𝒊 , 𝒒̇ 𝒊 , 𝒕) = 𝓣 − 𝓥

𝟏
𝓣= 𝒎𝒊 𝒒̇ 𝒊 𝟐
𝟐
𝟏
𝑳(𝒒𝒊 , 𝒒̇ 𝒊 , 𝒕) = 𝒎 𝒒̇ 𝟐 − 𝓥(𝒒𝒊 )
𝟐 𝒊 𝒊

Example:- Simple Pendulum


Lets assume a light massless rod of length, l, carrying a load of mass, m. The
pendulum is oscillating due to an angular displacement of 

The Kinetic energy of the system is given by

𝟏 𝟐 𝟐
𝓣= 𝒎𝒍 𝜽̇𝒊
𝟐

The Potential Energy of the system is given by

𝓥 = 𝒎𝒈𝒍(𝟏 − 𝒄𝒐𝒔𝜽)

Therefore, Lagrangian of the simple pendulum system is given by

𝟏 𝟐 𝟐
𝑳(𝜽, 𝜽̇) = 𝓣 − 𝓥 = 𝒎𝒍 𝜽̇𝒊 − 𝒎𝒈𝒍(𝟏 − 𝒄𝒐𝒔𝜽)
𝟐

The Euler – Lagrange Equation is given by

𝝏𝑳 𝒅 𝝏𝑳
− ( )=𝟎
𝝏𝜽𝒊 𝒅𝒕 𝝏𝜽̇𝒊

Substituting the Lagrangian to the Euler – Lagrange Equation, we get

𝒎𝒍𝟐 𝜽̈ + 𝒎𝒈𝒍 𝒔𝒊𝒏𝜽 = 𝟎

𝒈
𝜽̈ = − 𝒔𝒊𝒏𝜽
𝒍

The above equation is the nonlinear harmonic oscillator equation.


Harmonic Formulation
While we defined the Lagrangian as a function of generalized coordinates,
generalized velocity and time, we define Hamiltonian function as the Legendre
Transform of the Lagrangian equation.

Legendre Transform

Lets consider a variable f as a function of independent variable x and y. Then,

𝜕𝑓 𝜕𝑓
𝜕𝑓(𝑥, 𝑦) = 𝑑𝑥 + 𝑑𝑦
𝜕𝑥 𝜕𝑦

𝜕𝑓 𝜕𝑓
= 𝒳 𝑎𝑛𝑑 = 𝒴
𝜕𝑥 𝜕𝑦

Then

𝑑𝑓 = 𝒳𝑑𝑥 + 𝒴𝑑𝑦

Instead of considering x and y as the independent variables, we consider 𝒳


and 𝒴 as the independent variable. In order to obtain this, we need to construct a
function g such that

𝑔 = 𝑓(𝑥, 𝑦) − 𝑥𝒳

𝑑𝑔 = 𝑑𝑓 − 𝑥𝑑𝒳 − 𝒳dx

𝑑𝑔 = −𝑥𝑑𝒳 + 𝒴dy

Now consider a function h such that


ℎ = 𝑔 − 𝑦𝒴

𝑑ℎ = 𝑑𝑔 − 𝑦𝑑𝒴 − 𝒴dy

𝑑ℎ = −𝑥𝑑𝒳 − 𝑦𝑑𝒴

Now we have a variable h, only as a function of 𝒳 and 𝒴. This is the basis of


the Legendre Transform.

Hamilton’s equations of motion


From Lagrange’s equation of motion we can deduce the Hamiltonian
equations of motion, using the definitions for the generalized momenta and
Hamiltonian,
𝑳(𝒒𝒊 , 𝒒̇ 𝒊 , 𝒕) = 𝓣 − 𝓥

𝝏𝑳
𝒑𝒊 =
𝝏𝒒̇ 𝒊

where 𝑝𝑖 is the generalized momentum conjugate to the generalized coordinate. We


define Hamiltonian H as
𝒏

𝑯(𝒒𝒊 , 𝒑𝒊 , 𝒕) = ∑ 𝒒̇ 𝒊 𝒑𝒊 − 𝑳(𝒒𝒊 , 𝒒̇ 𝒊 , 𝒕)
𝒊=𝟏

𝝏𝑯 𝝏𝑯 𝝏𝑯
𝒅𝑯 = 𝒅𝒒𝒊 + 𝒅𝒑𝒊 + 𝒅𝒕
𝝏𝒒𝒊 𝝏𝒑𝒊 𝝏𝒕

𝝏𝑳 𝝏𝑳 𝝏𝑳
𝒅𝑳 = 𝒅𝒒𝒊 + 𝒅𝒒̇ 𝒊 + 𝒅𝒕
𝝏𝒒𝒊 𝝏𝒒̇ 𝒊 𝝏𝒕

𝝏𝑯 𝝏𝑯 𝝏𝑯
𝒅𝒒𝒊 + 𝒅𝒑𝒊 + 𝒅𝒕 = 𝒑𝒊 𝒅𝒒̇ 𝒊 + 𝒒𝒊 𝒅𝒑𝒊 − 𝒅𝑳
𝝏𝒒𝒊 𝝏𝒑𝒊 𝝏𝒕

𝝏𝑯 𝝏𝑯 𝝏𝑯 𝝏𝑳 𝝏𝑳 𝝏𝑳
𝒅𝒒𝒊 + 𝒅𝒑𝒊 + 𝒅𝒕 = 𝒑𝒊 𝒅𝒒̇ 𝒊 + 𝒒𝒊 𝒅𝒑𝒊 − 𝒅𝒒𝒊 − 𝒅𝒒̇ 𝒊 − 𝒅𝒕
𝝏𝒒𝒊 𝝏𝒑𝒊 𝝏𝒕 𝝏𝒒𝒊 𝝏𝒒̇ 𝒊 𝝏𝒕

𝝏𝑳
We have already defined 𝒑𝒊 = 𝝏𝒒̇ , so the above equation reduces to
𝒊

𝝏𝑯 𝝏𝑯 𝝏𝑯 𝝏𝑳 𝝏𝑳
𝒅𝒒𝒊 + 𝒅𝒑𝒊 + 𝒅𝒕 = 𝒒𝒊 𝒅𝒑𝒊 − 𝒅𝒒𝒊 − 𝒅𝒕
𝝏𝒒𝒊 𝝏𝒑𝒊 𝝏𝒕 𝝏𝒒𝒊 𝝏𝒕

Hence we have

𝝏𝑯 𝝏𝑳
=− = −𝒑̇ 𝒊
𝝏𝒒𝒊 𝝏𝒒𝒊

𝝏𝑯
= 𝒒𝒊
𝝏𝒑𝒊

𝝏𝑯 𝝏𝑳
= −
𝝏𝒕 𝝏𝒕

The above equations are the Hamiltonian equations of motion. If the Hamiltonian H
does not explicitly depend on time, then
𝐶𝑜𝑛𝑠𝑡𝑎𝑛𝑡 𝑜𝑓 𝑡ℎ𝑒 𝑚𝑜𝑡𝑖𝑜𝑛
𝐻 𝑖𝑠 𝑎 { 𝐶𝑜𝑛𝑠𝑒𝑟𝑣𝑒𝑑 𝑞𝑢𝑎𝑛𝑡𝑖𝑡𝑦
𝑖𝑛𝑡𝑒𝑟𝑔𝑟𝑎𝑙 𝑜𝑓 𝑡ℎ𝑒 𝑚𝑜𝑡𝑖𝑜𝑛

For a simple system with no friction and energy dissipation, Hamiltonian is given by
𝒏

𝑯(𝒒𝒊 , 𝒑𝒊 , 𝒕) = ∑ 𝒒̇ 𝒊 𝒑𝒊 − 𝑳(𝒒𝒊 , 𝒒̇ 𝒊 , 𝒕)
𝒊=𝟏

𝑳(𝒒𝒊 , 𝒒̇ 𝒊 , 𝒕) = 𝓣 − 𝓥

𝝏𝑳
𝒑𝒊 =
𝝏𝒒̇ 𝒊

The solution of the system will yield

𝑯(𝒒𝒊 , 𝒑𝒊 , 𝒕) = 𝓣 + 𝓥

Thus for simple systems Hamiltonian is the total energy of the system.

Example:- Simple Pendulum


Lets consider the simple pendulum from the Lagrangian formulation. We
have
𝟏 𝟐
𝑳(𝜽, 𝜽̇) = 𝓣 − 𝓥 = 𝒎𝒍𝟐 𝜽̇𝒊 − 𝒎𝒈𝒍(𝟏 − 𝒄𝒐𝒔𝜽)
𝟐

𝝏𝑳
𝒑𝒊 = = 𝒎𝒍𝟐 𝜽̇
̇
𝝏𝜽𝒊

𝑯(𝜽, 𝒑𝒊 ) = 𝒑𝒊 𝜽̇ − 𝑳(𝜽, 𝜽̇)

𝟐 𝟏 𝟐
𝑯(𝜽, 𝒑𝒊 ) = 𝒎𝒍𝟐 𝜽̇𝒊 − 𝒎𝒍𝟐 𝜽̇𝒊 + 𝒎𝒈𝒍(𝟏 − 𝒄𝒐𝒔𝜽)
𝟐
𝟏 𝟐 𝟐
𝑯(𝜽, 𝒑𝒊 ) = 𝒎𝒍 𝜽̇𝒊 + 𝒎𝒈𝒍(𝟏 − 𝒄𝒐𝒔𝜽) = 𝓣 + 𝓥
𝟐

The above equation of Hamilton gives the total energy of the system.

𝒑𝒊
𝜽̇ =
𝒎𝒍𝟐

𝟏
𝑯(𝜽, 𝒑𝒊 ) = 𝒑 𝟐 + 𝒎𝒈𝒍(𝟏 − 𝒄𝒐𝒔𝜽)
𝟐𝒎𝒍𝟐 𝒊
From the Hamiltonian equations of motion

𝝏𝑳
= 𝒑̇ 𝒊 = −𝒎𝒈𝒍 𝒔𝒊𝒏𝜽
𝝏𝜽𝒊

𝒑𝒊
𝜽̇ =
𝒎𝒍𝟐

𝒅
𝒑̇ 𝒊 = −𝒎𝒈𝒍 𝒔𝒊𝒏𝜽 = (𝒎𝒍𝟐 𝜽̇)
𝒅𝒕
𝒈
𝜽̈ = − 𝒔𝒊𝒏𝜽
𝒍

Thus the Hamiltonian formulation also yields the equations of motion just
like the Lagrangian formulation. These set of equations tell you that you can always
go from Hamiltonian formulation to the Lagrangian formulation with the Legendre’s
transformation.
The advantage of the Hamiltonian formulation over the Lagrangian
formulation is that the Hamiltonian is an explicitly first order equation with 2n
dynamic variables. Thus we have reduced a 2nd order set of equations to a first order
set of equations by using Hamiltonian formulation.

You might also like