Functionals, First Variation and the Euler–Lagrange Equation
CSIR NET calculus of variations: functionals, the first variation, the fundamental lemma, the Euler–Lagrange equation, Beltrami identity and classic extremals.
- 22 min
On this page · 15 sections
- Prerequisites
- The Hook: A Bead, a Wire and the Fastest Path
- Functionals
- The Variation of a Functional
- The Euler–Lagrange Equation
- Special Cases: First Integrals
- Classic Extremals
- Free End Points: Natural Boundary Conditions
- Memory Tricks
- Don’t Confuse
- Common Mistakes
- Practice
- Quick Revision Table
- Key Takeaways
- What’s Next
Prerequisites
- Continuity, Differentiability and Bounded Variation: Taylor’s theorem and the mean value theorem, which the first variation generalises.
- Riemann, Improper and Lebesgue Integration: integration by parts and differentiation under the integral sign.
- Metric Spaces and Several Variables: norms on function spaces, and the “gradient is zero at an extremum” idea in \( \mathbb{R}^n \).
- Linear ODEs and Variation of Parameters: every Euler–Lagrange equation on this page is solved as a linear ODE, constant-coefficient or Euler–Cauchy.
The Hook: A Bead, a Wire and the Fastest Path
Functionals
A functional is a map from a class of functions to \( \mathbb{R} \). The basic problem of the subject is about functionals of the form
$$J[y] = \int_a^b F\big(x, y(x), y'(x)\big)\, dx,$$where \( F(x, y, p) \) is a given function, at least twice continuously differentiable in all three arguments, and \( y \) runs over the admissible class
$$\mathcal{A} = \{\, y \in C^1[a, b] : y(a) = A,\ y(b) = B \,\}.$$| Functional | What it measures |
|---|---|
| \( \displaystyle\int_a^b \sqrt{1 + y'^2}\, dx \) | arc length of the graph |
| \( \displaystyle 2\pi \int_a^b y\sqrt{1 + y'^2}\, dx \) | area of the surface obtained by rotating the graph about the \( x \)-axis |
| \( \displaystyle\int_0^{x_1} \frac{\sqrt{1 + y'^2}}{\sqrt{2gy}}\, dx \) | time of descent along \( y(x) \), with \( y \) measured downwards from the start |
| \( \displaystyle\int_{t_0}^{t_1} (T - V)\, dt \) | the action of a mechanical system (Hamilton’s principle) |
| \( \displaystyle\iint_D (u_x^2 + u_y^2)\, dx\, dy \) | the Dirichlet energy of a membrane |
To talk about “nearby” functions we need a norm. Two are used:
| Norm on \( C^1[a, b] \) | Closeness means | Extremum it defines |
|---|---|---|
| \( \lVert h \rVert_0 = \max \lvert h(x) \rvert \) | graphs close | strong extremum |
| \( \lVert h \rVert_1 = \max \lvert h(x) \rvert + \max \lvert h'(x) \rvert \) | graphs and slopes close | weak extremum |
\( J \) has a weak minimum at \( y_0 \) if \( J[y] \ge J[y_0] \) for every admissible \( y \) with \( \lVert y - y_0 \rVert_1 \) small; a strong minimum if the same holds for every admissible \( y \) with \( \lVert y - y_0 \rVert_0 \) small. A \( \lVert \cdot \rVert_0 \)-neighbourhood contains more competitors, so every strong minimum is a weak minimum. The difference matters only for sufficient conditions, which are on Conditions for Extrema. Every necessary condition on this page holds for both.
The Variation of a Functional
Fix an admissible \( y \) and a variation \( \eta \in C^1[a, b] \) with \( \eta(a) = \eta(b) = 0 \), so that \( y + \varepsilon\eta \) is still admissible for every real \( \varepsilon \). Then \( \Phi(\varepsilon) = J[y + \varepsilon\eta] \) is an ordinary function of one real variable.
Necessary condition (Euler’s principle). If \( J \) has an extremum (weak or strong) at \( y \), then \( \Phi \) has an extremum at \( \varepsilon = 0 \), so
$$\boxed{\delta J[y; \eta] = 0 \quad \text{for every admissible } \eta.}$$This is exactly “\( f'(x_0) = 0 \) at an interior extremum”, applied along every line \( \varepsilon \mapsto y + \varepsilon\eta \) through \( y \).
Computing the first variation
Differentiate under the integral sign (allowed since \( F \in C^2 \)):
$$\delta J = \int_a^b \big( F_y\, \eta + F_{y'}\, \eta' \big)\, dx,$$where \( F_y \) and \( F_{y'} \) mean \( \frac{\partial F}{\partial y} \) and \( \frac{\partial F}{\partial p} \) evaluated at \( (x, y(x), y'(x)) \). If \( y \in C^2 \), integrate the second term by parts:
$$\delta J = \int_a^b \Big( F_y - \frac{d}{dx}F_{y'} \Big)\eta\, dx + \Big[ F_{y'}\,\eta \Big]_a^b.$$The boundary term vanishes because \( \eta(a) = \eta(b) = 0 \). Keep this formula: when an endpoint is free, the boundary term does not vanish, and it gives the natural boundary condition below.
The fundamental lemma
Proof sketch. If \( M(x_0) > 0 \), then \( M > 0 \) on some \( (x_1, x_2) \ni x_0 \). Take \( \eta = (x - x_1)^2(x_2 - x)^2 \) on \( (x_1, x_2) \) and 0 elsewhere. It is \( C^1 \), vanishes at the ends, and \( \int M\eta > 0 \), a contradiction.
A second version, the du Bois-Reymond lemma, says: if \( \int_a^b M(x)\eta'(x)\, dx = 0 \) for all such \( \eta \), then \( M \) is constant. It lets you derive the Euler–Lagrange equation without assuming in advance that \( y \in C^2 \).
The Euler–Lagrange Equation
Applying the fundamental lemma to \( \delta J = 0 \):
$$\boxed{F_y - \frac{d}{dx}F_{y'} = 0}$$A solution is called an extremal (whether or not it actually gives an extremum). Expanding the total derivative,
$$F_y - F_{xy'} - y' F_{yy'} - y'' F_{y'y'} = 0.$$So when \( F_{y'y'} \ne 0 \), the Euler–Lagrange (E–L) equation is a second-order ODE in \( y \). Its general solution has two arbitrary constants, fixed by the two boundary conditions \( y(a) = A \), \( y(b) = B \). This boundary value problem may have exactly one, several, or no solution.
The method in four steps
graph TD
A["Read off F of x, y, p"] --> B{"Is a variable missing?"}
B -->|F has no y| C["F_p = constant"]
B -->|F has no x| D["Beltrami: F minus p times F_p = constant"]
B -->|general case| E["F_y minus d/dx of F_p = 0"]
C --> F["Solve the ODE: two constants"]
D --> F
E --> F
F --> G["Fit the two boundary values"]
G --> H["Evaluate J along the extremal if asked"]Special Cases: First Integrals
The E–L equation is second order, but when \( F \) lacks one of its arguments you can integrate once immediately.
| \( F \) depends on | Reduction | Reason |
|---|---|---|
| \( x, y' \) only (no \( y \)) | \( F_{y'} = C \) | \( F_y = 0 \), so \( \frac{d}{dx}F_{y'} = 0 \) |
| \( y, y' \) only (no \( x \)) | \( F - y' F_{y'} = C \) (Beltrami identity) | \( \frac{d}{dx}(F - y'F_{y'}) = y'\big(F_y - \frac{d}{dx}F_{y'}\big) \) when \( F_x = 0 \) |
| \( y' \) only | extremals are straight lines (when \( F_{y'y'} \ne 0 \)) | \( F_{y'y'}\, y'' = 0 \) |
| \( x, y \) only (no \( y' \)) | \( F_y(x, y) = 0 \): an algebraic equation | its solution generally misses the boundary values, so no extremal exists |
| linear in \( y' \): \( M(x, y) + N(x, y)y' \) | \( M_y - N_x = 0 \): not a differential equation | if \( M_y \equiv N_x \), the integral is path-independent and \( J \) is the same for every admissible curve |
Classic Extremals
Shortest path in the plane
\( F = \sqrt{1 + y'^2} \) depends only on \( y' \), and \( F_{y'y'} = (1 + y'^2)^{-3/2} > 0 \). So \( y'' = 0 \) and the extremal through two points is the straight line joining them.
The brachistochrone
Measure \( y \) downwards from the starting point. Energy conservation gives speed \( v = \sqrt{2gy} \), so the time is \( T = \int \frac{ds}{v} = \frac{1}{\sqrt{2g}}\int \frac{\sqrt{1 + y'^2}}{\sqrt{y}}\, dx \). \( F \) has no \( x \), so by Beltrami
$$\frac{\sqrt{1 + y'^2}}{\sqrt{y}} - \frac{y'^2}{\sqrt{y}\sqrt{1 + y'^2}} = \frac{1}{\sqrt{y}\sqrt{1 + y'^2}} = C \quad\Longrightarrow\quad y\,(1 + y'^2) = 2a.$$Substituting \( y' = \cot\frac{\theta}{2} \) and integrating gives the cycloid
$$x = a(\theta - \sin\theta) + x_0, \qquad y = a(1 - \cos\theta).$$Through the starting point \( x_0 = 0 \); the constant \( a \) is fixed by the end point.
Minimal surface of revolution
\( F = y\sqrt{1 + y'^2} \) (dropping the constant \( 2\pi \)). Beltrami:
$$y\sqrt{1 + y'^2} - \frac{y\,y'^2}{\sqrt{1 + y'^2}} = \frac{y}{\sqrt{1 + y'^2}} = c \quad\Longrightarrow\quad y = c\cosh\frac{x - x_0}{c}.$$The extremals are catenaries; rotating one gives a catenoid. With two end circles far apart, no catenary fits the boundary values; then no smooth extremal exists (the infimum is approached by two discs joined by a segment of the axis, the Goldschmidt configuration). With the circles close together there are two catenaries, and only one of them gives a minimum. “The E–L boundary value problem can have zero, one or two solutions” is a favourite Part C point.
Quadratic functionals
These are the bread and butter of Part B: the E–L equation is a linear ODE.
| \( F \) | E–L equation | General extremal |
|---|---|---|
| \( y'^2 \) | \( y'' = 0 \) | \( c_1 x + c_2 \) |
| \( y'^2 + y^2 \) | \( y'' - y = 0 \) | \( c_1 \cosh x + c_2 \sinh x \) |
| \( y'^2 - y^2 \) | \( y'' + y = 0 \) | \( c_1\cos x + c_2 \sin x \) |
| \( y'^2 + 2f(x)y \) | \( y'' = f(x) \) | integrate twice |
| \( y'^2 - y^2 - 2xy \) | \( y'' + y = -x \) | \( c_1\cos x + c_2\sin x - x \) |
| \( p(x)y'^2 + q(x)y^2 - 2f(x)y \) | \( -(py')' + qy = f \) | Sturm–Liouville form |
| \( x^2y'^2 + k\,y^2 \) | \( x^2y'' + 2xy' - ky = 0 \) | Euler–Cauchy: \( x^r \), \( r^2 + r - k = 0 \) |
A quick sign check: for \( F = y'^2 + Q(x)y^2 \), \( F_y = 2Qy \) and \( \frac{d}{dx}F_{y'} = 2y'' \), so E–L is \( y'' = Qy \). The coefficient of \( y \) keeps the sign it has in \( F \).
Free End Points: Natural Boundary Conditions
Suppose \( y(a) = A \) is prescribed but \( y(b) \) is free. Now admissible variations need only \( \eta(a) = 0 \). Choosing first the \( \eta \) with \( \eta(b) = 0 \) still forces the E–L equation, so the integral term in \( \delta J \) vanishes and what is left is
$$F_{y'}\big|_{x = b}\,\eta(b) = 0 \text{ for all } \eta(b) \quad\Longrightarrow\quad \boxed{F_{y'}\big|_{x = b} = 0.}$$This natural boundary condition replaces the missing prescribed value, so you still have two conditions for two constants. If both ends are free, \( F_{y'} = 0 \) at both.
Free ends that must lie on a given curve (transversality), and extensions to higher derivatives, several functions and constraints, are on Extensions of the Euler–Lagrange Equation.
Memory Tricks
Don’t Confuse
| This | vs | That |
|---|---|---|
| extremal (solves E–L) | extremum (actually gives a max or min) | |
| weak extremum (\( y \) and \( y' \) close) | strong extremum (only \( y \) close; harder to be) | |
| \( \frac{\partial}{\partial x}F_{y'} \) (partial, \( y, y' \) frozen) | \( \frac{d}{dx}F_{y'} \) (total, along the curve) | |
| prescribed end: \( y(b) = B \) | free end: \( F_{y'}(b) = 0 \) (natural condition) | |
| \( F \) has no \( y \): \( F_{y'} = C \) | \( F \) has no \( x \): \( F - y'F_{y'} = C \) | |
| \( F \) linear in \( y' \) with \( M_y = N_x \): \( J \) constant | \( F = F(x, y) \): algebraic equation, usually no extremal |
Common Mistakes
Practice
All questions below are original practice questions written for this page. They are not from any CSIR NET paper. In Level 3, as in Part C, one or more options may be correct.
Level 1: Foundation
- Write the Euler–Lagrange equation of \( J[y] = \int (y'^2 + y^2 + 2ye^x)\, dx \).
- Which expression is constant along extremals when \( F = F(y, y') \)?
- Compute the first variation of \( J[y] = \int_0^1 y'^2\, dx \) at \( y \) in the direction \( \eta \).
Answers
- \( F_y = 2y + 2e^x \), \( F_{y'} = 2y' \). E–L: \( 2y + 2e^x - 2y'' = 0 \), i.e. \( y'' - y = e^x \).
- \( F - y'F_{y'} \) (the Beltrami identity).
- \( \frac{d}{d\varepsilon}\int_0^1 (y' + \varepsilon\eta')^2\, dx \big|_{\varepsilon = 0} = 2\int_0^1 y'\eta'\, dx \). After integrating by parts with \( \eta(0) = \eta(1) = 0 \): \( -2\int_0^1 y''\eta\, dx \).
Level 2: Part B Style
Practice Q1. The extremal of \( J[y] = \int_0^1 (y'^2 + 12xy)\, dx \) with \( y(0) = 0 \), \( y(1) = 1 \) is:
(a) \( x^2 \) (b) \( x^3 \) (c) \( x^4 \) (d) \( \frac{x + x^3}{2} \)
Answer: (b)
E–L: \( 12x - 2y'' = 0 \Rightarrow y'' = 6x \Rightarrow y = x^3 + c_1x + c_2 \). The boundary values give \( c_1 = c_2 = 0 \). Note that (d) satisfies the boundary values but \( y'' = 3x \ne 6x \).
Practice Q2. The extremals of \( \int \frac{\sqrt{1 + y'^2}}{y}\, dx \), \( y > 0 \), are:
(a) straight lines (b) circles with centres on the \( x \)-axis (c) catenaries (d) cycloids
Answer: (b)
Beltrami gives \( y\sqrt{1 + y'^2} = R \), i.e. \( y^2 + y^2y'^2 = R^2 \), which is satisfied by \( (x - x_0)^2 + y^2 = R^2 \) (differentiate: \( yy' = -(x - x_0) \)).
Practice Q3. The extremal of \( J[y] = \int_0^1 (xy' + y'^2)\, dx \), \( y(0) = 0 \), \( y(1) = 1 \), is:
(a) \( \frac{5x - x^2}{4} \) (b) \( x^2 \) (c) \( \frac{x + x^2}{2} \) (d) \( \frac{3x + x^2}{4} \)
Answer: (a)
\( F \) has no \( y \), so \( F_{y'} = x + 2y' = C \), \( y' = \frac{C - x}{2} \), \( y = \frac{Cx}{2} - \frac{x^2}{4} + D \). \( y(0) = 0 \Rightarrow D = 0 \); \( y(1) = 1 \Rightarrow \frac{C}{2} - \frac{1}{4} = 1 \Rightarrow C = \frac{5}{2} \). So \( y = \frac{5x}{4} - \frac{x^2}{4} \).
Practice Q4. For \( J[y] = \int_0^1 (y^2 + 2xyy')\, dx \) with \( y(0) = 0 \), \( y(1) = 1 \), which statement is correct?
(a) The unique extremal is \( y = x \). (b) No admissible curve satisfies the Euler–Lagrange equation. (c) Every admissible curve satisfies the Euler–Lagrange equation, and \( J = 1 \) on each. (d) The unique extremal is \( y = x^2 \).
Answer: (c)
\( F = M + Ny' \) with \( M = y^2 \), \( N = 2xy \), and \( M_y = 2y = N_x \): the E–L equation \( M_y - N_x = 0 \) holds identically. Indeed \( y^2 + 2xyy' = \frac{d}{dx}(xy^2) \), so \( J = [xy^2]_0^1 = y(1)^2 = 1 \) for every admissible \( y \).
Level 3: Part C Style
Practice Q5. Let \( J[y] = \int_1^2 (x^2y'^2 + 12y^2)\, dx \) with \( y(1) = 1 \), \( y(2) = 8 \). Which of the following are true?
(a) The Euler–Lagrange equation is \( x^2y'' + 2xy' - 12y = 0 \). (b) The extremal is \( y = x^3 \). (c) The value of \( J \) along the extremal is 127. (d) No extremal satisfies both boundary conditions.
Answer: (a) and (b)
- (a) True. \( F_y = 24y \), \( \frac{d}{dx}(2x^2y') = 4xy' + 2x^2y'' \). E–L: \( 24y - 4xy' - 2x^2y'' = 0 \), i.e. \( x^2y'' + 2xy' - 12y = 0 \).
- (b) True. Try \( y = x^r \): \( r(r - 1) + 2r - 12 = r^2 + r - 12 = (r + 4)(r - 3) \). So \( y = c_1x^3 + c_2x^{-4} \). \( c_1 + c_2 = 1 \) and \( 8c_1 + \frac{c_2}{16} = 8 \) give \( c_1 = 1 \), \( c_2 = 0 \).
- (c) False. \( J = \int_1^2 (9x^6 + 12x^6)\, dx = 21 \cdot \frac{2^7 - 1}{7} = 3 \cdot 127 = 381 \). The distractor forgets the factor 21.
- (d) False. (b) gives one.
Practice Q6. Which of the following statements are true?
(a) If \( F = F(y, y') \), then \( F - y'F_{y'} \) is constant along every \( C^2 \) extremal. (b) The extremals of \( \int y\sqrt{1 + y'^2}\, dx \) (\( y > 0 \)) are catenaries \( y = c\cosh\frac{x - x_0}{c} \). (c) The extremals of \( \int \frac{\sqrt{1 + y'^2}}{\sqrt{y}}\, dx \) (\( y > 0 \)) are cycloids. (d) Along the extremals of \( \int (y'^2 + y^2)\, dx \), the quantity \( y'^2 + y^2 \) is constant.
Answer: (a), (b) and (c)
- (a) True. \( \frac{d}{dx}(F - y'F_{y'}) = y'(F_y - \frac{d}{dx}F_{y'}) = 0 \) on an extremal.
- (b) True. Beltrami gives \( \frac{y}{\sqrt{1 + y'^2}} = c \), solved by \( c\cosh\frac{x - x_0}{c} \).
- (c) True. Beltrami gives \( y(1 + y'^2) = 2a \): the brachistochrone cycloid.
- (d) False. Beltrami gives \( F - y'F_{y'} = y'^2 + y^2 - 2y'^2 = y^2 - y'^2 \) constant. Check with \( y = \cosh x \): \( y^2 - y'^2 = 1 \) but \( y^2 + y'^2 = \cosh 2x \).
Practice Q7. Consider \( J[y] = \int_0^1 (y'^2 + 2y)\, dx \) with \( y(0) = 0 \) and \( y(1) \) free. Which of the following are true?
(a) The extremal satisfies \( y'(1) = 0 \). (b) The extremal is \( y = \frac{x^2}{2} - x \). (c) The extremal has \( y(1) = \frac{1}{2} \). (d) The value of \( J \) along the extremal is \( -\frac{1}{3} \).
Answer: (a), (b) and (d)
- (a) True. Natural boundary condition: \( F_{y'} = 2y' = 0 \) at \( x = 1 \).
- (b) True. E–L: \( 2 - 2y'' = 0 \Rightarrow y = \frac{x^2}{2} + c_1x + c_2 \). \( y(0) = 0 \Rightarrow c_2 = 0 \); \( y'(1) = 1 + c_1 = 0 \Rightarrow c_1 = -1 \).
- (c) False. \( y(1) = \frac{1}{2} - 1 = -\frac{1}{2} \).
- (d) True. \( y' = x - 1 \), so \( J = \int_0^1 \big( (x - 1)^2 + x^2 - 2x \big)\, dx = \int_0^1 (2x^2 - 4x + 1)\, dx = \frac{2}{3} - 2 + 1 = -\frac{1}{3} \).
Quick Revision Table
| Idea | Fact |
|---|---|
| Functional | \( J[y] = \int_a^b F(x, y, y')\, dx \) on \( C^1 \) curves with fixed ends |
| First variation | \( \delta J = \frac{d}{d\varepsilon}J[y + \varepsilon\eta]\big\rvert_{0} = \int (F_y\eta + F_{y'}\eta')\, dx \) |
| Necessary condition | \( \delta J = 0 \) for all \( \eta \) with \( \eta(a) = \eta(b) = 0 \) |
| Fundamental lemma | \( \int M\eta = 0 \) for all such \( \eta \) \( \Rightarrow M \equiv 0 \) |
| Euler–Lagrange | \( F_y - \frac{d}{dx}F_{y'} = 0 \); second order if \( F_{y'y'} \ne 0 \) |
| No \( y \) | \( F_{y'} = C \) |
| No \( x \) | \( F - y'F_{y'} = C \) (Beltrami) |
| Linear in \( y' \), \( M_y = N_x \) | \( J \) path-independent |
| Free end at \( b \) | \( F_{y'}(b) = 0 \) |
| \( ds \), \( y\,ds \), \( ds/\sqrt{y} \), \( ds/y \) | line, catenary, cycloid, circle centred on axis |
Key Takeaways
What’s Next
- Extensions of the Euler–Lagrange Equation: higher derivatives, several functions, several independent variables, isoperimetric constraints and transversality.
- Conditions for Extrema: Legendre, Jacobi and Weierstrass conditions, and when convexity settles everything.
- Variational Methods for Boundary Value Problems: turning ODE and PDE problems into minimisation problems.
- Calculus of Variations: Quick Revision.