Back to Blog
University Physics15 min read

A Gentle Introduction to Lagrangian Mechanics

February 12, 2026

Imagine if there was a magical recipe that could solve ANY physics problem โ€” pendulums, planets, roller coasters, even atoms. Good news: there is! It's called Lagrangian mechanics, and once you learn it, you'll wonder why we bother with forces at all.

๐ŸŽฏ The Big Idea in One Sentence

Instead of asking "what forces act on this object?" (Newton), we ask "how does energy slosh back and forth?" (Lagrange). Same physics, easier math.

Step 1: Know Your Energies

You already know kinetic and potential energy from school:

โšก

Kinetic Energy

T=12mv2T = \frac{1}{2}mv^2
๐Ÿ“

Potential Energy (gravity)

V=mghV = mgh

The Lagrangian is simply their difference:

The Lagrangian

L=Tโˆ’V\mathcal{L} = T - V

Kinetic Energy minus Potential Energy

That's it. The Lagrangian L\mathcal{L} is just kinetic minus potential. Why subtraction instead of addition? It turns out nature "likes" to minimize a certain quantity over time, and that quantity involves Tโˆ’VT - V.

Step 2: The Magic Equation

Here's where the magic happens. Once you have your Lagrangian, you plug it into this equation (called the Euler-Lagrange equation):

The Euler-Lagrange Equation

ddt(โˆ‚Lโˆ‚qห™)โˆ’โˆ‚Lโˆ‚q=0\frac{d}{dt}\left(\frac{\partial \mathcal{L}}{\partial \dot{q}}\right) - \frac{\partial \mathcal{L}}{\partial q} = 0

This single equation replaces F = ma for complex problems!

Where qq is position and qห™\dot{q} (q-dot) is velocity.

Don't panic! Let's see it in action with two simple examples.

Example 1: A Falling Ball ๐Ÿ€

Let's drop a ball from height h. We want to find how it moves.

Step 1: Write the energies

Kinetic:T=12myห™2T = \frac{1}{2}m\dot{y}^2(yห™\dot{y} = velocity)

Potential:V=mgyV = mgy(yy = height)

Step 2: Form the Lagrangian
L=Tโˆ’V=12myห™2โˆ’mgy\mathcal{L} = T - V = \frac{1}{2}m\dot{y}^2 - mgy
Step 3: Apply Euler-Lagrange

Derivative w.r.t. velocity:

โˆ‚Lโˆ‚yห™=myห™\frac{\partial \mathcal{L}}{\partial \dot{y}} = m\dot{y}

Time derivative:

ddt(myห™)=myยจ\frac{d}{dt}(m\dot{y}) = m\ddot{y}

Derivative w.r.t. position:

โˆ‚Lโˆ‚y=โˆ’mg\frac{\partial \mathcal{L}}{\partial y} = -mg

Euler-Lagrange equation:

myยจโˆ’(โˆ’mg)=0m\ddot{y} - (-mg) = 0
Result:yยจ=โˆ’g\boxed{\ddot{y} = -g}โœ“ acceleration = gravity!

We got yยจ=โˆ’g\ddot{y} = -g, meaning acceleration equals negative g (downward). That's exactly what Newton would give us โ€” but we never drew a free body diagram or talked about forces!

Example 2: A Simple Pendulum ๐ŸŽฏ

This is where Lagrangian mechanics really shines. A pendulum of lengthโ„“\ell swings back and forth. The natural coordinate is the angle ฮธ\theta.

Step 1: Position in terms of angle ฮธ
x=โ„“sinโกฮธy=โˆ’โ„“cosโกฮธx = \ell \sin\theta \quad\quad y = -\ell \cos\theta

(measuring y downward from the pivot)

Step 2: Find the speed
v2=xห™2+yห™2=โ„“2ฮธห™2v^2 = \dot{x}^2 + \dot{y}^2 = \ell^2 \dot{\theta}^2

(ฮธห™\dot{\theta} is angular velocity)

Step 3: Write the Lagrangian

Kinetic:

T=12mโ„“2ฮธห™2T = \frac{1}{2}m\ell^2 \dot{\theta}^2

Potential:

V=โˆ’mgโ„“cosโกฮธV = -mg\ell\cos\theta

Lagrangian:

L=12mโ„“2ฮธห™2+mgโ„“cosโกฮธ\mathcal{L} = \frac{1}{2}m\ell^2 \dot{\theta}^2 + mg\ell\cos\theta
Step 4: Apply Euler-Lagrange
โˆ‚Lโˆ‚ฮธห™=mโ„“2ฮธห™โ‡’ddt(...)=mโ„“2ฮธยจ\frac{\partial \mathcal{L}}{\partial \dot{\theta}} = m\ell^2 \dot{\theta} \quad\Rightarrow\quad \frac{d}{dt}(...) = m\ell^2 \ddot{\theta}โˆ‚Lโˆ‚ฮธ=โˆ’mgโ„“sinโกฮธ\frac{\partial \mathcal{L}}{\partial \theta} = -mg\ell\sin\theta
mโ„“2ฮธยจโˆ’(โˆ’mgโ„“sinโกฮธ)=0m\ell^2 \ddot{\theta} - (-mg\ell\sin\theta) = 0
Result:ฮธยจ=โˆ’gโ„“sinโกฮธ\boxed{\ddot{\theta} = -\frac{g}{\ell}\sin\theta}

This is the famous pendulum equation! For small angles (sinโกฮธโ‰ˆฮธ\sin\theta \approx \theta), it becomes simple harmonic motion:

Pendulum Period

T=2ฯ€โ„“gT = 2\pi\sqrt{\frac{\ell}{g}}

๐Ÿคฏ Why This Is Amazing

Notice we never mentioned tension in the string or resolved forces into components. The constraint (fixed length โ„“\ell) was handled automatically by using ฮธ\theta as our variable. That's the superpower of Lagrangian mechanics: constraints disappear!

When Should You Use This?

Use Newtonian mechanics (F=maF = ma) when:

  • The problem involves simple straight-line motion
  • You need to find forces (like tension, normal force)
  • The geometry is simple (blocks, inclines)

Use Lagrangian mechanics when:

  • There are constraints (pendulums, particles on tracks)
  • The system has multiple moving parts
  • Curved coordinates are natural (angles, polar coords)
  • You're doing advanced physics (quantum, relativity)

๐Ÿ“š What You Need to Know

Prerequisites: Basic calculus (derivatives) and understanding of kinetic/potential energy. If you've done AP Physics or equivalent, you're ready!

Next steps: Try applying this to a mass on a spring, or two connected pendulums. The power becomes obvious with practice.

Want personalized help with university physics? Book a free consultation to discuss your learning goals.

Dinesh Kandel | Physics Tutor โ€” IPhO Medalist & Stanford PhD