Euler-Lagrange Equation

This equation is useful when finding the critical point of the integral equation. Suppose that y(x)y(x) passes through the points (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2) and it is a continuously differentiable function in [x1,x2][x_1, x_2]. We want to find min⁡∫x1x2y(x)dx\min \int_{x_1}^{x_2} y(x) dx or max⁡∫x1x2y(x)dx\max \int_{x_1}^{x_2} y(x) dx.

Step 1. Define the extreme value F(y)F(y).

Introducing a path function ff which consists of y(x)y(x) and y′(x)y'(x), F(y)F(y) can be defined by F(y)=∫x1x2f(y(x),y′(x),x)dx\begin{aligned} F(y) &= \int_{x_1}^{x_2} f(y(x), y'(x), x) dx \end{aligned}

This function FF assumes that yy is the extreme value when it follows the path function ff.

PathFunction

Now, consider F(y+δy)F(y + \delta y) near the extreme value F(y)F(y) with the same start and end points. Then it represents another path function ff which consists of y(x)+δy(x)y(x) + \delta y(x) and y′(x)+δy′(x)y'(x) + \delta y'(x). By Taylor’s Theorem, F(y+δy)=∫x1x2f(y(x)+δy(x),y′(x)+δy′(x),x)dx≈∫x1x2f(y(x),y′(x),x)+fyδy+fy′δy′+fx0dx=F(y)+∫x1x2fyδy+fy′δy′dx\begin{aligned} F(y + \delta y) &= \int_{x_1}^{x_2} f(y(x) + \delta y(x), y'(x) + \delta y'(x), x) dx \\\\ &\approx \int_{x_1}^{x_2} f(y(x), y'(x), x) + f_y \delta y + f_{y'} \delta y' + f_x 0 dx \\\\ &= F(y) + \int_{x_1}^{x_2} f_y \delta y + f_{y'} \delta y'dx \end{aligned}

It yields the following δF\delta F, δF=F(y+δy)−F(y)≈∫x1x2fyδy+fy′δy′dx\begin{aligned} \delta F &= F(y + \delta y) - F(y) \approx \int_{x_1}^{x_2} f_y \delta y + f_{y'} \delta y'dx \end{aligned}

Step 2. Apply the integration by parts to δF\delta F.

The second part of δF\delta F can be modified using the integration by parts. ∫x1x2fy′δy′dx=[fy′δy]x1x2−∫x1x2ddx(fy′)δydx=−∫x1x2ddx(fy′)δydx\begin{aligned} \int_{x_1}^{x_2} f_{y'} \delta y'dx = [f_{y'} \delta y]_{x_1}^{x_2} - \int_{x_1}^{x_2} \frac{d}{dx}(f_{y'}) \delta y dx = - \int_{x_1}^{x_2} \frac{d}{dx}(f_{y'}) \delta y dx \end{aligned}

This is because δy(x1)=δy(x2)=0\delta y(x_1) = \delta y(x_2) = 0 since f(y(x),y′(x),x)f(y(x), y'(x), x) and f(y(x)+δy(x),y′(x)+δy′(x),x)f(y(x) + \delta y(x), y'(x) + \delta y'(x), x) have the same start and end points. Therefore δF\delta F is rewritten as δF≈∫x1x2(fy−ddxfy′)δydx\begin{aligned} \delta F \approx \int_{x_1}^{x_2} \left( f_y - \frac{d}{dx} f_{y'} \right) \delta y dx \end{aligned}

Step 3. Use the fact that δF(y)=0\delta F(y) = 0.

Since F(y)F(y) is the extreme value, δF(y)=0\delta F(y) = 0 for the small enough δy\delta y. Therefore, it leads to δF≈∫x1x2(fy−ddxfy′)δydx=0  ⟹  fy−ddxfy′=0\begin{aligned} \delta F \approx \int_{x_1}^{x_2} \left( f_y - \frac{d}{dx} f_{y'} \right) \delta y dx = 0 \implies \color{red}{f_y - \frac{d}{dx} f_{y'} = 0} \end{aligned}

which is called Euler-Lagrange equation.

Example: Find the smallest distance between (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2) points.

It is to find the smallest path among all the possible paths. From the step 1, min⁡∫x1x2(dx)2+(dy)2=min⁡∫x1x21+y′2dx=F(y)\begin{aligned} \min \int_{x_1}^{x_2} \sqrt{(dx)^2 + (dy)^2} = \min \int_{x_1}^{x_2} \sqrt{1 + y'^2} dx = F(y) \end{aligned}

Now, step 2 and 3 lead to the following Euler-Lagrange equation. fy−ddxfy′=0−ddx(y′1+y′2)=0  ⟹  y′1+y′2=C  ⟹  y′=±C21−C2\begin{aligned} f_y - \frac{d}{dx} f_{y'} &= 0 - \frac{d}{dx} \left( \frac{y'}{\sqrt{1 + y'^2}} \right) = 0 \\\\ &\implies \frac{y'}{\sqrt{1 + y'^2}} = C \\\\ &\implies y' = \pm \sqrt{\frac{C^2}{1 - C^2}} \end{aligned}

where C∈RC \in \mathbb{R}. It means that yy is of form ax+bax + b for aa, b∈Rb \in \mathbb{R}, y′=a=y2−y1x2−x2y' = a = \cfrac{y_2 - y_1}{x_2 - x_2}. Therefore, F(y)=min⁡∫x1x21+y′2dx=∫x1x21+a2dx=1+a2(x2−x1)=1+(y2−y1)2(x2−x1)2(x2−x1)=(x2−x1)2+(y2−y1)2\begin{aligned} F(y) &= \min \int_{x_1}^{x_2} \sqrt{1 + y'^2} dx = \int_{x_1}^{x_2} \sqrt{1 + a^2} dx = \sqrt{1 + a^2} (x_2 - x_1) \\\\ &= \sqrt{1 + \frac{(y_2 - y_1)^2}{(x_2 - x_1)^2}} (x_2 - x_1) = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2} \end{aligned}

This result is right because Euclidean distance is the smallest one between (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2) points.

Reference

[1] Calculus of Variations


© 2026. All rights reserved.