The Lagrangian & Lagrange's equation
Combine the two energies into one quantity, turn a fixed crank, and the equation of motion drops out — no forces, no free-body diagram.
Source: course notes, Week 2 (the energy method); Spong, Lynch & Park.
Before you start
What you need first
- Kinetic & potential energy \(T\), \(V\) (Topic 10).
- Velocity from position — getting \(\dot q\) into \(T\) (Topic 11).
- Generalized coordinates \(q\) — one per degree of freedom.
What you'll be able to do
- Form the Lagrangian \(\mathcal{L}=T-V\).
- Apply Lagrange's equation — the master formula.
- Run the partial-derivative and \(d/dt\) steps, and re-derive the spring.
A note on the symbol \(\mathcal{L}\)
Step 1 · combine the energies
The Lagrangian: \(\mathcal{L} = T - V\)
| Symbol | Meaning | SI unit |
|---|---|---|
| \(\mathcal{L}\) | the Lagrangian | J |
| T | kinetic energy (of motion) | J |
| V | potential energy (of position) | J |
Step 2 · the master formula
Lagrange's equation
| Symbol | Meaning | SI unit |
|---|---|---|
| q | a generalized coordinate | m or rad |
| \(\dot q\) | its velocity | m/s or rad/s |
| Q | generalized force (applied push/torque, damping) | N or N·m |
Reading the master formula
| Piece | What it does |
|---|---|
| \(\dfrac{\partial \mathcal{L}}{\partial \dot q}\) | differentiate \(\mathcal{L}\) treating the velocity \(\dot q\) as the variable → the "momentum" term |
| \(\dfrac{d}{dt}(\ \cdot\ )\) | then differentiate that in time → produces the acceleration \(\ddot q\) |
| \(\dfrac{\partial \mathcal{L}}{\partial q}\) | differentiate \(\mathcal{L}\) treating the position \(q\) as the variable → the spring/gravity term |
| \(Q\) | applied forces / torques / damping (else \(0\)) |
Quick refresher: partial derivatives
A partial derivative differentiates with respect to one variable, holding the others fixed. The key trick here: treat the position \(q\) and the velocity \(\dot q\) as two separate, independent symbols. For \(\mathcal{L}=\tfrac12 m\dot x^{2}-\tfrac12 k x^{2}\):
Hold \(x\) fixed, differentiate by \(\dot x\)
Hold \(\dot x\) fixed, differentiate by \(x\)
Quick refresher: the \(d/dt\) step
After the partial \(\partial\mathcal{L}/\partial\dot q\), the \(d/dt\) lets everything depend on time again and differentiates in time — turning a velocity into an acceleration:
The energy recipe (replaces the free-body diagram)
Re-derive the spring by Lagrange
The block-and-spring of Theme 2: mass \(m\), stiffness \(k\), coordinate \(x\) from rest, on a frictionless table. Let us get \(m\ddot x + kx = 0\) again — this time from energy, with no free-body diagram.
✏️ Try it yourself
A mass \(m\) falls freely under gravity. With \(y\) measured upward, \(T=\tfrac12 m\dot y^2\) and \(V=mgy\). Apply Lagrange's equation (with \(Q=0\)) and find the acceleration \(\ddot y\).
Common mistakes to avoid
| Mistake | Fix |
|---|---|
| Writing \(\mathcal{L}=T+V\) | It is \(T-V\) — always a minus. |
| Mixing \(\partial/\partial q\) and \(\partial/\partial\dot q\) | Treat \(q\) and \(\dot q\) as separate symbols when taking partials. |
| Skipping the \(d/dt\) step | That step makes the acceleration \(\ddot q\) appear. |
| Forgetting the minus on \(-\partial\mathcal{L}/\partial q\) | The formula subtracts the position term; a sign slip flips the spring/gravity term. |
| Applying it once for a 2-DOF system | Apply the formula once per coordinate. |
Recap — the whole topic on one screen
| Idea | What you own now |
|---|---|
| The Lagrangian | \(\mathcal{L}=T-V\) (minus, and \(\mathcal{L}\) not \(L\)) |
| The master formula | The crank, applied once per coordinate |
| The two steps | Partial by \(\dot q\) then \(d/dt\); partial by \(q\) |
| The pay-off | Spring re-derived from energy, no forces drawn |