Lagrangian Formulation
Lagrangian Formulation
What is a Lagrangian?
{𝑞1 , 𝑞2 , … … … , 𝑞𝑛 }
{𝑞̇ 1 , 𝑞̇ 2 , … … … , 𝑞̇ 𝑛 }
Then the Lagrangian for a simple system without any friction and energy
dissipation, L, is given by
Where
𝒯 is the Kinetic Energy of the system
𝒱 is the Potential Energy of the system
𝐴(𝑡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.
𝜹 ∫ 𝑳 𝒅𝒕 = 𝟎
𝒕𝟏
The above equation can be written as
𝒕𝟐
∫ 𝜹𝑳 𝒅𝒕 = 𝟎
𝒕𝟏
𝜕𝐿 𝜕𝐿
𝛿𝐿 = 𝛿𝑞𝑖 + 𝛿𝑞̇
𝜕𝑞𝑖 𝜕𝑞̇ 𝑖 𝑖
𝒕𝟐
𝝏𝑳 𝝏𝑳
∴ ∫( 𝜹𝒒𝒊 + 𝜹𝒒̇ ) 𝒅𝒕 = 𝟎
𝝏𝒒𝒊 𝝏𝒒̇ 𝒊 𝒊
𝒕𝟏
𝑑𝑞𝑖 𝑑(𝛿𝑞𝑖 )
𝛿𝑞̇ 𝑖 = 𝛿 ( )=
𝑑𝑡 𝑑𝑡
𝒕𝟐
𝒕𝟐
𝝏𝑳 𝒅 𝝏𝑳 𝝏𝑳
∫( − ( )) 𝜹𝒒𝒊 𝒅𝒕 + | 𝜹𝒒 | = 𝟎
𝝏𝒒𝒊 𝒅𝒕 𝝏𝒒̇ 𝒊 𝝏𝒒̇ 𝒊 𝒊 𝒕
𝒕𝟏 𝟏
𝑡2
𝜕𝐿
| 𝛿𝑞 | = 0 (𝑆𝑖𝑛𝑐𝑒 𝑡ℎ𝑒 𝑡𝑒𝑟𝑚 𝛿𝑞𝑖 = 0 𝑎𝑡 𝑡1 𝑎𝑛𝑑 𝑡2
𝜕𝑞̇ 𝑖 𝑖 𝑡
1
𝒕𝟐
𝝏𝑳 𝒅 𝝏𝑳
∴ ∫( − ( )) 𝜹𝒒𝒊 𝒅𝒕 = 𝟎
𝝏𝒒𝒊 𝒅𝒕 𝝏𝒒̇ 𝒊
𝒕𝟏
𝝏𝑳 𝒅 𝝏𝑳
− ( )=𝟎
𝝏𝒒𝒊 𝒅𝒕 𝝏𝒒̇ 𝒊
𝟏
𝓣= 𝒎𝒊 𝒒̇ 𝒊 𝟐
𝟐
𝟏
𝑳(𝒒𝒊 , 𝒒̇ 𝒊 , 𝒕) = 𝒎 𝒒̇ 𝟐 − 𝓥(𝒒𝒊 )
𝟐 𝒊 𝒊
𝟏 𝟐 𝟐
𝓣= 𝒎𝒍 𝜽̇𝒊
𝟐
𝓥 = 𝒎𝒈𝒍(𝟏 − 𝒄𝒐𝒔𝜽)
𝟏 𝟐 𝟐
𝑳(𝜽, 𝜽̇) = 𝓣 − 𝓥 = 𝒎𝒍 𝜽̇𝒊 − 𝒎𝒈𝒍(𝟏 − 𝒄𝒐𝒔𝜽)
𝟐
𝝏𝑳 𝒅 𝝏𝑳
− ( )=𝟎
𝝏𝜽𝒊 𝒅𝒕 𝝏𝜽̇𝒊
𝒈
𝜽̈ = − 𝒔𝒊𝒏𝜽
𝒍
Legendre Transform
𝜕𝑓 𝜕𝑓
𝜕𝑓(𝑥, 𝑦) = 𝑑𝑥 + 𝑑𝑦
𝜕𝑥 𝜕𝑦
𝜕𝑓 𝜕𝑓
= 𝒳 𝑎𝑛𝑑 = 𝒴
𝜕𝑥 𝜕𝑦
Then
𝑑𝑓 = 𝒳𝑑𝑥 + 𝒴𝑑𝑦
𝑔 = 𝑓(𝑥, 𝑦) − 𝑥𝒳
𝑑𝑔 = 𝑑𝑓 − 𝑥𝑑𝒳 − 𝒳dx
𝑑𝑔 = −𝑥𝑑𝒳 + 𝒴dy
𝑑ℎ = 𝑑𝑔 − 𝑦𝑑𝒴 − 𝒴dy
𝑑ℎ = −𝑥𝑑𝒳 − 𝑦𝑑𝒴
𝝏𝑳
𝒑𝒊 =
𝝏𝒒̇ 𝒊
𝑯(𝒒𝒊 , 𝒑𝒊 , 𝒕) = ∑ 𝒒̇ 𝒊 𝒑𝒊 − 𝑳(𝒒𝒊 , 𝒒̇ 𝒊 , 𝒕)
𝒊=𝟏
𝝏𝑯 𝝏𝑯 𝝏𝑯
𝒅𝑯 = 𝒅𝒒𝒊 + 𝒅𝒑𝒊 + 𝒅𝒕
𝝏𝒒𝒊 𝝏𝒑𝒊 𝝏𝒕
𝝏𝑳 𝝏𝑳 𝝏𝑳
𝒅𝑳 = 𝒅𝒒𝒊 + 𝒅𝒒̇ 𝒊 + 𝒅𝒕
𝝏𝒒𝒊 𝝏𝒒̇ 𝒊 𝝏𝒕
𝝏𝑯 𝝏𝑯 𝝏𝑯
𝒅𝒒𝒊 + 𝒅𝒑𝒊 + 𝒅𝒕 = 𝒑𝒊 𝒅𝒒̇ 𝒊 + 𝒒𝒊 𝒅𝒑𝒊 − 𝒅𝑳
𝝏𝒒𝒊 𝝏𝒑𝒊 𝝏𝒕
𝝏𝑯 𝝏𝑯 𝝏𝑯 𝝏𝑳 𝝏𝑳 𝝏𝑳
𝒅𝒒𝒊 + 𝒅𝒑𝒊 + 𝒅𝒕 = 𝒑𝒊 𝒅𝒒̇ 𝒊 + 𝒒𝒊 𝒅𝒑𝒊 − 𝒅𝒒𝒊 − 𝒅𝒒̇ 𝒊 − 𝒅𝒕
𝝏𝒒𝒊 𝝏𝒑𝒊 𝝏𝒕 𝝏𝒒𝒊 𝝏𝒒̇ 𝒊 𝝏𝒕
𝝏𝑳
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
𝒏
𝑯(𝒒𝒊 , 𝒑𝒊 , 𝒕) = ∑ 𝒒̇ 𝒊 𝒑𝒊 − 𝑳(𝒒𝒊 , 𝒒̇ 𝒊 , 𝒕)
𝒊=𝟏
𝑳(𝒒𝒊 , 𝒒̇ 𝒊 , 𝒕) = 𝓣 − 𝓥
𝝏𝑳
𝒑𝒊 =
𝝏𝒒̇ 𝒊
𝑯(𝒒𝒊 , 𝒑𝒊 , 𝒕) = 𝓣 + 𝓥
Thus for simple systems Hamiltonian is the total energy of the system.
𝝏𝑳
𝒑𝒊 = = 𝒎𝒍𝟐 𝜽̇
̇
𝝏𝜽𝒊
𝟐 𝟏 𝟐
𝑯(𝜽, 𝒑𝒊 ) = 𝒎𝒍𝟐 𝜽̇𝒊 − 𝒎𝒍𝟐 𝜽̇𝒊 + 𝒎𝒈𝒍(𝟏 − 𝒄𝒐𝒔𝜽)
𝟐
𝟏 𝟐 𝟐
𝑯(𝜽, 𝒑𝒊 ) = 𝒎𝒍 𝜽̇𝒊 + 𝒎𝒈𝒍(𝟏 − 𝒄𝒐𝒔𝜽) = 𝓣 + 𝓥
𝟐
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.