Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

In this chapter, we will introduce the Lagrangian and the Euler-Lagrange method to solving physics problems. This technique represents another tool in your physics toolkit, much like how we can use energy conservation, momentum conservation, and Newton’s laws to solve physics problems.

12.1 Introduction to the Lagrangian Method

Consider the case of a single particle being acted on by a conservative force in 1-D (x(x-axis). From the energy equations, we can say that:

F=UxF = - \frac{\partial U}{\partial x}

But from Newton’s laws, we can also write the force as

F=dpdt=mdvdt=mdx˙dtF = \frac{\mathrm{d}p}{\mathrm{d}t} = m \frac{\mathrm{d}v}{\mathrm{d}t} = m \frac{\mathrm{d}\dot{x}}{\mathrm{d}t}

for constant mass. We can therefore relate the force to the kinetic energy, because the kinetic energy depends on the velocity, K=12mx˙2K = \frac{1}{2} m\dot{x}^{2}.

dKdx˙=mx˙,ddt(dKdx˙)=mdx˙dt=F.\frac{\mathrm{d}K}{\mathrm{d}\dot{x}}=m\dot{x}, \qquad \frac{\mathrm{d}}{\mathrm{d}t}\left(\frac{\mathrm{d}K}{\mathrm{d}\dot{x}}\right) =m\frac{\mathrm{d}\dot{x}}{\mathrm{d}t}=F.

We can combine these two force equations to say that:

ddt(dKdx˙)=dUdx\frac{\mathrm{d}}{\mathrm{d}t} \Bigg(\frac{\mathrm{d}K}{\mathrm{d}\dot{x}} \Bigg) = - \frac{\mathrm{d}U}{\mathrm{d}x}

The above equation is a function of the kinetic and potential energies. So we define the Lagrangian as:

L=KUL = K - U

where LL is the Lagrangian, and we will use the symbol LL for the Lagrangian to make it distinct from the angular momentum (defined as LL in this text).

LL is a function of position and velocity. That is, L=L(x,x˙L = L(x,\dot{x} ) in 1-D, because K=K(x˙K = K(\dot{x} ) and U=U(x)U = U(x). In this case, KK is not a function of position and UU is not a function of velocity. As such,

Lx=Ux\frac{\partial L}{\partial x} = - \frac{\partial U}{\partial x}
Lx˙=Kx˙\frac{\partial L}{\partial \dot{x}} = \frac{\partial K}{\partial \dot{x}}

where \partial indicates a partial derivative. For a partial derivative, you hold all other variables constant and only take the derivative with respect to the one variable.

Therefore, we can rewrite ddt(dKdx˙)=dUdx\frac{\mathrm{d}}{\mathrm{d}t}\left(\frac{\mathrm{d}K}{\mathrm{d}\dot{x}}\right)=-\frac{\mathrm{d}U}{\mathrm{d}x}, which we had before as:

ddt(Lx˙)=Lx\frac{\mathrm{d}}{\mathrm{d}t} \Bigg(\frac{\partial L}{\partial \dot{x}} \Bigg) = \frac{\partial L}{\partial x}

This is the Euler-Lagrange equation. The above example is for 1-D motion in the xx-axis, but in practice, you can apply the arguments to represent the Euler-Lagrange equations in other (independent) coordinates. In its general form, the Euler-Lagrange equation is:

ddt(Lx˙i)=Lxi\frac{\mathrm{d}}{\mathrm{d}t} \Bigg(\frac{\partial L}{\partial \dot{x}_{i}} \Bigg) = \frac{\partial L}{\partial x_{i}}

where xix_{i} represents a coordinate axis (e.g., could be x,y,rx, y, r, etc.). For multi-dimensional problems, you need to solve the Euler-Lagrange equations for each dimension (each axis) separately.

The Lagrangian method represents yet another way you can solve problems in physics. For the rest of the chapter, we will look at a few examples.

12.2 Application to 1-D Problems

(does not stretch) and has a constant length. If the length of the rope is AA (a constant), then y1+y2=Ay_{1}+ y_{2}= A. We can then express y2y_{2} and y˙2\dot{y}_{2} with respect to y1y_{1}.

y2=Ay1y_{2}= A - y_{1}
y˙2=y˙1\dot{y}_{2}= -\dot{y}_{1}

Moreover, since this is an ideal pulley, it rotates without slipping so we can also use y˙1=Rω|\dot{y}_{1}| = R\omega. Thus, we can re-write the energy equations as:

U=m1gy1m2g(Ay1)U = -m_{1}gy_{1}- m_{2}g(A - y_{1})
K=12(m1+m2)(y˙1)2+12I(y˙1R)2=12(m1+m2+12M)y˙12=subinI=12MR2\begin{aligned} K &= \frac{1}{2} (m_{1}+ m_{2})(\dot{y}_{1})^{2}+ \frac{1}{2} I \bigg(\frac{\dot{y}_{1}}{R} \bigg)^{2} \\ &= \frac{1}{2} \bigg(m_{1}+ m_{2}+ \frac{1}{2} M\bigg)\dot{y}_{1}^{2}=\Rightarrow \mathrm{sub} \mathrm{in} I = \frac{1}{2} MR^{2} \end{aligned}

The Lagrangian (in terms of y1y_{1} and y˙1\dot{y}_{1} only) is then:

L=12(m1+m2+12M)y˙12+m1gy1+m2g(Ay1)=12(m1+m2+12M)y˙12+(m1m2)gy1+m2gA\begin{aligned} L &= \frac{1}{2} \bigg(m_{1}+ m_{2}+ \frac{1}{2} M\bigg)\dot{y}_{1}^{2}+ m_{1}gy_{1}+ m_{2}g(A - y_{1}) \\ &= \frac{1}{2} \bigg(m_{1}+ m_{2}+ \frac{1}{2} M\bigg)\dot{y}_{1}^{2}+ (m_{1}- m_{2})gy_{1}+ m_{2}gA \end{aligned}

Note that this Lagrangian contains a constant term (m2gA)(m_{2}gA). This term does not factor into the Euler-Lagrange equations because it has no dependence on position or velocity. You can essentially ignore any constant terms in the Lagrangian method.

The terms of the Euler-Lagrange equation are:

Ly1=y1[(m1m2)gy1]=(m1m2)g\frac{\partial L}{\partial y_{1}} = \frac{\partial}{\partial y_{1}} [(m_{1}- m_{2})gy_{1}] = (m_{1}- m_{2})g
ddt(Ly˙1)=ddt(y˙1[12(m1+m2+12M)y˙12])\frac{\mathrm{d}}{\mathrm{d}t} \Bigg(\frac{\partial L}{\partial \dot{y}_{1}} \Bigg) = \frac{\mathrm{d}}{\mathrm{d}t} \Bigg(\frac{\partial}{\partial \dot{y}_{1}} \bigg[\frac{1}{2} \bigg(m_{1}+ m_{2}+ \frac{1}{2} M\bigg)\dot{y}_{1}^{2}\bigg]\Bigg)
=ddt[(m1+m2+12M)y˙1]=(m1+m2+12M)y¨1\begin{aligned} &= \frac{\mathrm{d}}{\mathrm{d}t} \bigg[\bigg(m_{1}+ m_{2}+ \frac{1}{2} M\bigg)\dot{y}_{1}\bigg] \\ &= \bigg(m_{1}+ m_{2}+ \frac{1}{2} M\bigg)\ddot{y}_{1} \end{aligned}

And the Euler-Lagrange equation is:

12.3 Application in 2-D

U=GMmrK=12m(r˙2+r2θ˙2)\begin{aligned} U &= - \frac{GMm}{r} \\ K &= \frac{1}{2} m(\dot{r}^{2}+ r^{2}\dot{\theta}^{2}) \end{aligned}

And the Lagrangian is:

L=12m(r˙2+r2θ˙2)+GMmrL = \frac{1}{2} m(\dot{r}^{2}+ r^{2}\dot{\theta}^{2}) + \frac{GMm}{r}

So the Lagrangian is really L=L(r,r˙,θ,θ˙L = L(r,\dot{r},\theta,\dot{\theta} ) and each dimension must be solved separately.

Lr=ddt(Lr˙)\frac{\partial L}{\partial r} = \frac{\mathrm{d}}{\mathrm{d}t} \Bigg(\frac{\partial L}{\partial \dot{r}} \Bigg)
Lθ=ddt(Lθ˙)\frac{\partial L}{\partial \theta} = \frac{\mathrm{d}}{\mathrm{d}t} \Bigg(\frac{\partial L}{\partial \dot{\theta}} \Bigg)

Note, however, that the Lagrangian does not have any θ\theta dependence. That’s because gravity is a radial force. As a consequence, we can say that:

Lθ=0\frac{\partial L}{\partial \theta} = 0

Thus, from the Euler-Lagrange equation:

Lθ=ddt(Lθ˙)\frac{\partial L}{\partial \theta} = \frac{\mathrm{d}}{\mathrm{d}t} \Bigg(\frac{\partial L}{\partial \dot{\theta}} \Bigg)
0=ddt(Lθ˙)0 = \frac{\mathrm{d}}{\mathrm{d}t} \Bigg(\frac{\partial L}{\partial \dot{\theta}} \Bigg)

So the derivative of the Lagrangian with angular velocity (Lθ˙(\frac{\partial L}{\partial \dot{\theta}} ) is constant with time.

Lθ˙=θ˙(12mr2θ˙2)=mr2θ˙=constant\frac{\partial L}{\partial \dot{\theta}} = \frac{\partial}{\partial \dot{\theta}} \bigg(\frac{1}{2} mr^{2}\dot{\theta}^{2}\bigg) = mr^{2}\dot{\theta} = \mathrm{constant}

The term mr2θ˙mr^{2}\dot{\theta} is the angular momentum of the system (see Chapter 6) and we recover the condition that angular momentum is constant (as expected for a central force; Chapter 10) directly from the Lagrangian and Euler-Lagrange equations.

12.4 Example Problem: Sphere on an Incline

The following problem includes rolling and translation motion.

Figure shows a sphere rolling down an inclined plane.

Figure 12.4:A sphere of radius RR rolls down an incline of angle θ\theta.

Solution

First, we need the potential and kinetic energies. The only source of potential energy is the change in gravitational potential energy as the sphere rolls down. For kinetic energy, we have the translation and rotation of the sphere.

Since the motion is along the incline only, we will define x^\hat{x} to be pointing down along the incline, where UU = 0 at xx = 0 (the top of the incline). Figure 12.5 shows our coordinate system in terms of xx. With this definition, the height of the sphere from the top of the incline as a function of xx is xsinθx\sin \theta:

Figure shows a right triangle defining the height as a function of distance down the incline.

Figure 12.5:Using Pythagorean theorem we can determine the change in height of the sphere.

The potential energy is therefore:

U=MgΔhU = -Mg\Delta h
U=MgxsinθU = -Mgx\sin \theta

The potential energy is negative because UU decreases as the sphere rolls down and we have defined xx as positive pointing down the incline (how we defined the coordinate system).

For the kinetic energy, we have the translation and rotation motion of the sphere, which we defined in Chapter 8. The kinetic energy is:

K=12Mx˙2+12Iω2K = \frac{1}{2} M\dot{x}^{2}+ \frac{1}{2} I\omega ^{2}

12.5 Challenging Problem: Particle on a Wire

For this problem, the solution is not a simple differential equation. Consider whether you would try to solve this problem using Newton’s Laws or energy conservation.

so let’s find our kinetic and potential energies. We only have translation kinetic energy from the motion of the particle,

K=12mv2K = \frac{1}{2} mv^{2}

where,

v2=vvv^{2}= \vec{v} \cdot \vec{v}
v2=x˙2+y˙2v^{2}= \dot{x}^{2}+ \dot{y}^{2}
v2=x˙2+(4ax3x˙)2v^{2}= \dot{x}^{2}+ (4ax^{3}\dot{x})^{2}
v2=x˙2+16a2x6x˙2v^{2}= \dot{x}^{2}+ 16a^{2}x^{6}\dot{x}^{2}
v2=x˙2(1+16a2x6)v^{2}= \dot{x}^{2}(1 + 16a^{2}x^{6})

Therefore, we can solve for the kinetic energy in terms of xx and x˙\dot{x} only.

K=12mx˙2(1+16a2x6)K = \frac{1}{2} m\dot{x}^{2}(1 + 16a^{2}x^{6})

The only source of potential energy is gravity,

U=mghwhere h=yU = mgh \qquad \mathrm{where}\ h = y
U=mgywhere U=0 when y=0U = mgy \qquad \mathrm{where}\ U = 0\ \mathrm{when}\ y = 0
U=mgax4U = mgax^{4}

Note that UU is positive since the particle is above the yy = 0 point, so U>0U > 0. We can now solve our Lagrangian:

L=KUL=12mx˙2(1+16a2x6)mgax4\begin{aligned} L &= K - U \\ L &= \frac{1}{2} m\dot{x}^{2}(1 + 16a^{2}x^{6}) - mgax^{4} \end{aligned}

c) Find the differential equation of motion of the bead.

To do this let’s solve the Euler-Lagrange equation:

ddt(Lx˙)=Lx\frac{\mathrm{d}}{\mathrm{d}t} \Bigg(\frac{\partial L}{\partial \dot{x}} \Bigg) = \frac{\partial L}{\partial x}

12.6 Real-World Applications

Initially, it might seem like the Euler-Lagrange Method is unnecessarily complicated, but we’re really just touching the edge of what it can be used for. Remember that this textbooks is still mostly focusing on simple, idealized problems. The real world of experimentation and research is much more complex, and many physics problems don’t have simple, analytical solutions and can only be probed numerically using computers.

Lagrangian mechanics help simplify the calculations for complex or even chaotic systems where forces are hard to define or the initial conditions can drastically change the outcome (e.g., consider the motion of a double pendulum). In terms of physics research, solving problems with the Euler-Lagrange method is often more efficient when mapping the motion of stars in galactic mergers or near supermassive black holes, tracing particle collisions in accelerators, solving problems in fluid mechanics, or tracking systems of particles in thermodynamics or quantum mechanics. The Euler-Lagrange equations are a tool to break down big problems into smaller calculations.

One common application of Lagrangian mechanics is with magnetohydrodynamics (MHD), which is the study of fluids that conduct electrically. MHD is used in many branches of physics, but one example is nuclear fusion experimentation, where many experiments seek to produce energy by magnetically confining a fast-moving plasma in a torus. MHD research must solving various equations such as the equation of state, mass continuity, Faraday’s law, and Ohm’s law simultaneously for the entire system, and these equations are usually non-linear with time. As such, Lagrangian mechanics are often employed to simplify the problem.

For more information: Wikipedia webpage on MHD, listing various forms and equations. Science article on some recent nuclear fusion experiment designs.

12.7 Summary on the Lagrange Method

12.8 Practice Problems

See Appendix C for answers to the practice problems.