Lagrangian mechanics is a method for deriving equations of motion from a quantity called the Lagrangian, and using it is a short, repeatable routine: choose a coordinate, write the energies, form L=TVL = T - V, apply the Euler-Lagrange equation, and check. For many introductory problems with conservative forces, that routine turns energy expressions into the same equations of motion you could get from Newton's laws, often with less messy algebra.

ddt(Lq˙i)Lqi=0\frac{d}{dt}\left(\frac{\partial L}{\partial \dot{q}_i}\right) - \frac{\partial L}{\partial q_i} = 0

When To Use This Method

Newton's laws usually start with forces; Lagrangian mechanics usually starts with coordinates and energies. The method shines when constraints and coordinates do most of the work for you: pendulums, rolling systems, oscillations, orbital motion, and problems written in polar or spherical coordinates. If the problem is a simple one-dimensional force balance, Newton's second law can be more direct. Lagrangian mechanics becomes more attractive when coordinates are awkward or constraints are doing most of the work.

A note on scope before the routine: in many first courses the Lagrangian is written as L=TVL = T - V, where TT is kinetic energy and VV is potential energy. That form is especially useful for conservative systems, where the forces can be described by a potential energy. It is not a universal law for every mechanical problem; if friction, driving forces, or more general constraints matter, extra terms or a broader setup may be needed.

The Procedure, Step By Step

Step 1: Choose the coordinate

Pick a generalized coordinate that matches the motion. A pendulum is easier to describe with one angle θ\theta than with separate xx and yy coordinates plus a constraint that the string length stays fixed. Generalized coordinates do not have to be ordinary Cartesian positions; they are simply coordinates that describe the system efficiently.

Step 2: Write the energies

Express the kinetic energy TT and, if the forces are conservative, the potential energy VV in that coordinate.

Step 3: Form the Lagrangian

For many introductory systems, use L=TVL = T - V.

Step 4: Apply the Euler-Lagrange equation

For one coordinate qq,

ddt(Lq˙)Lq=0\frac{d}{dt}\left(\frac{\partial L}{\partial \dot{q}}\right) - \frac{\partial L}{\partial q} = 0

Here q˙\dot{q} is the time derivative of qq. Apply it once for each coordinate.

Step 5: Check the result

Simplify the equation of motion and test whether limiting cases make physical sense.

Worked Example: The Whole Procedure On A Simple Pendulum

Take a pendulum with bob mass mm and string length ll. Let the angle from the downward vertical be θ\theta. This example shows why generalized coordinates help: the string length stays fixed, so one coordinate θ\theta already captures the whole motion.

Step 1 and 2 — kinetic energy. The bob moves along a circle of radius ll, so its speed is v=lθ˙v = l\dot{\theta}, giving

T=12ml2θ˙2T = \frac{1}{2} m l^2 \dot{\theta}^2

Potential energy. Choosing the lowest point as zero,

V=mgl(1cosθ)V = mgl(1 - \cos\theta)

Step 3 — the Lagrangian.

L=TV=12ml2θ˙2mgl(1cosθ)L = T - V = \frac{1}{2} m l^2 \dot{\theta}^2 - mgl(1 - \cos\theta)

Step 4 — Euler-Lagrange. Differentiate:

Lθ˙=ml2θ˙,ddt(Lθ˙)=ml2θ¨,Lθ=mglsinθ\frac{\partial L}{\partial \dot{\theta}} = ml^2\dot{\theta}, \qquad \frac{d}{dt}\left(\frac{\partial L}{\partial \dot{\theta}}\right) = ml^2\ddot{\theta}, \qquad \frac{\partial L}{\partial \theta} = -mgl\sin\theta

Substitute:

ml2θ¨(mglsinθ)=0ml2θ¨+mglsinθ=0ml^2\ddot{\theta} - (-mgl\sin\theta) = 0 \quad\Rightarrow\quad ml^2\ddot{\theta} + mgl\sin\theta = 0

Dividing by mlml,

lθ¨+gsinθ=0θ¨+glsinθ=0l\ddot{\theta} + g\sin\theta = 0 \quad\Rightarrow\quad \ddot{\theta} + \frac{g}{l}\sin\theta = 0

That is the exact equation for an ideal simple pendulum. Step 5 — check. If the angle is small enough that sinθθ\sin\theta \approx \theta, it becomes

θ¨+glθ=0\ddot{\theta} + \frac{g}{l}\theta = 0

which is the simple harmonic motion approximation. The condition matters: this last step is only valid for small angles.

Where Each Step Tends To Break, And How To Check

Assuming L=TVL = T - V works for every problem (Step 3)

That form is standard for many conservative systems, not all systems. If friction or other non-conservative effects matter, you may need generalized forces or a different model.

Choosing too many coordinates (Step 1)

If a constraint already ties variables together, extra coordinates make the problem harder. A pendulum angle is usually better than separate Cartesian coordinates.

Mixing ordinary and partial derivatives (Step 4)

In the Euler-Lagrange equation, L/q\partial L / \partial q and L/q˙\partial L / \partial \dot{q} are partial derivatives. Only afterward do you take a time derivative of L/q˙\partial L / \partial \dot{q}.

Losing track of the potential-energy reference (Step 2)

You can choose different zero points for VV, but stay consistent. Changing VV by a constant does not change the equation of motion.

Where Lagrangian Mechanics Is Useful

The same framework appears in more advanced classical mechanics and in later subjects such as field theory, although the details become more sophisticated. Once the five-step routine is familiar, those harder settings reuse the same logic.

Run The Procedure Yourself

Use the same workflow for a horizontal mass-spring system. Write T=12mx˙2T = \frac{1}{2}m\dot{x}^2 and V=12kx2V = \frac{1}{2}kx^2, then apply Euler-Lagrange and check that you recover the oscillator equation x¨+(k/m)x=0\ddot{x} + (k/m)x = 0.

Frequently Asked Questions

What is Lagrangian mechanics in simple terms?
Lagrangian mechanics finds equations of motion from a coordinate choice and a Lagrangian instead of starting with force components. In many introductory conservative systems, that Lagrangian is $L = T - V$.
Is the Lagrangian always $L = T - V$?
No. $L = T - V$ is a standard form for many classical systems with conservative forces, but it is not the most general case.
Why use Lagrangian mechanics instead of Newton's laws?
It is often easier when constraints or curved coordinates matter, because you can work with a small set of generalized coordinates instead of many force components.

Need help with a problem?

Upload your question and get a verified, step-by-step solution in seconds.

Open GPAI Solver →