Euler–Lagrange Equation Explained with Worked Examples

A function that makes the integral stationary satisfies the Euler–Lagrange equation .

Write 2x or 2*x to multiply, ^ for powers, and ; between simultaneous equations. You can also type factor, expand, derivative of, integrate … from a to b, limit … as x->0 or 15% of 80.

Try an example

Before you start

This page is easier if you are comfortable with:

What Euler–Lagrange equation means

Perturb by a small amount that vanishes at the ends, differentiate with respect to at 0, and integrate by parts. For this to vanish for every , the expression multiplying must be zero, giving the equation. It is the function-space version of setting a derivative to zero to find stationary points, using the chain rule and partial derivatives.

Example: for the equation is , so and is a straight line. Between and the line gives , while gives , which is larger. For the equation is , and with , the solution is with ; see the hyperbolic functions and solving linear equations.

If does not depend on the equation simplifies to the Beltrami identity. With constraints, use isoperimetric problems. In mechanics, with kinetic minus potential energy, the equation is Newton's second law and leads to Hamilton's equations; the shortest path problem uses arc length.

What is it used for?

The Euler–Lagrange equation finds the function that makes an integral as small or large as possible, such as the shortest path.

How to use euler–lagrange equation

  1. Write the functional .
  2. Compute and .
  3. Form and solve the differential equation.
  4. Fit the boundary conditions and evaluate .

Graph

The line y = x gives ∫y'² dx = 1; the curve y = x² gives 4/3straight line is optimal00.10.20.30.40.50.60.70.80.9100.20.40.60.81The line y = x gives ∫y'² dx = 1; the curve y = x² gives 4/3xyy = x: J = 1y = x²: J = 4/3Graph with x from 0 to 1 and y from 0 to 1.1. Shows the curve y = x: J = 1; the curve y = x²: J = 4/3; point straight line is optimal at (0.5, 0.5).

Among curves joining (0, 0) to (1, 1), the straight line minimises the integral of the squared gradient.

Worked examples

These examples are worked by hand, step by step, so you can compare your own working.

Example 1: minimise the integral of y'²

Find the function from to that minimises , and the minimum.

Worked example
Answer
y=x, J=1y=x,\ J=1
  1. E–L
  2. Value

Example 2: compare with a curve

Evaluate for and compare.

Worked example
Answer
43\dfrac43
  1. y' = 2x
  2. Larger than 1

Example 3: y² + y'²

Minimise with , .

Worked example
Answer
coth⁡1≈1.3130\coth1\approx1.3130
  1. E–L
  2. Value

Special cases

A few situations come up again and again. Knowing them saves time and helps you spot answers that cannot be right.

F = √(1 + y′²)

E–L gives y″ = 0

Straight line.

Line from (0, 0) to (3, 4)

length

5.

F = y′², y = x on [0, 1]

J = ∫1 dx

1.

F = y² + y′²

y″ = y, y = sinh x/sinh 1

y(0.5) = 0.4434.

Word problems

A function making J = ∫F(x, y, y′)dx stationary satisfies ∂F/∂y − d/dx(∂F/∂y′) = 0. For F = √(1 + y′²) the extremals are straight lines.

Shortest path

F = √(1 + y′²) gives y″ = 0. Find y″.

  1. 0
  2. Check: straight line ✓0

Length

Length of the line from (0, 0) to (3, 4).

  1. √25
  2. Check: ✓5

Value of J Higher

F = y′², y = x on [0, 1].

  1. 1²·1
  2. Check: ✓1

Another extremal Higher

F = y² + y′²: y = sinh x/sinh 1. Find y(0.5).

  1. 0.5211/1.1752
  2. Check: ✓0.4434

Common mistakes

Forgetting d/dx

∂F/∂y − ∂F/∂y′ ✗

∂F/∂y − d/dx(∂F/∂y′) ✓

Total derivative.

Stationary = minimum

always ✗

stationary only ✓

Check second variation.

Ignoring boundary values

any solution ✗

fit y(a), y(b) ✓

Constants.

y′ as y/x

wrong ✗

dy/dx ✓

Derivative.

Exam tips

  1. ∂F/∂y − d/dx ∂F/∂y′ = 0.
  2. Differentiate ∂F/∂y′ in x.
  3. Fit boundary values.
  4. Straight lines for √(1 + y′²).
  5. Stationary ≠ minimum.

Practice questions

Try each one on paper, then open the answer. Use the solver above to see the full working.

1. Length of the line from (0, 0) to (6, 8) Foundation

10

2. J for F = y′², y = 2x on [0, 1] Foundation

4

3. y(0.5) for y = sinh x/sinh 1 to 4 d.p. Foundation

0.4434

4. J for F = y′², y = x on [0, 3] Higher

3

5. d/dx(2y′) for y = x² Higher

4

6. ∂F/∂y for F = y² at y = 3 Higher

6

Practice generator

Unlimited fresh questions with instant marking. Choose a level, work it out on paper, then type your answer.

Solve: …

Key terms

Euler–Lagrange equation
Condition for stationary J.
Functional
Integral of F.
Extremal
Stationary function.
Lagrangian
F.
Boundary conditions
y(a), y(b).
Calculus of variations
Optimising functionals.

Frequently asked questions

What is the Euler–Lagrange equation?

∂F/∂y − d/dx(∂F/∂y′) = 0.

What are the extremals of arc length?

Straight lines.

Does it find minima?

It finds stationary functions.

What is a functional?

A map from functions to numbers.

Which page covers the Beltrami identity?

Beltrami identity.

Which page covers Hamilton’s equations?

Hamilton’s equations.

More in Analysis, algebra and topology and the formula sheets.