# Fundamental lemma of calculus of variations

In mathematics, specifically in the calculus of variations, the fundamental lemma of the calculus of variations states that if the definite integral of the product of a continuous function f(x) and h(x) is zero, for all continuous functions h(x) that vanish at the endpoints of the domain of integration and have their first two derivatives continuous, then f(x)=0. This lemma is used in deriving the Euler–Lagrange equation of the calculus of variations.[1] It is a lemma that is typically used to transform a problem from its weak formulation (variational form) into its strong formulation (differential equation).

## Statement

Let f be of class Ck (meaning, k times continuously differentiable) on the interval [a,b]. Assume further that

$\int_a^b f(x) \, h(x) \, \mathrm{d}x = 0$

for every function h that is of class Ck on [a,b] with h(a) = h(b) = 0. Then the fundamental lemma of the calculus of variations states that f(x) is identically zero on [a, b].

In other words, the test functions h (Ck functions vanishing at the endpoints) separate Ck functions. That is, Ck[a, b] is a Hausdorff space in the weak topology of pairing against Ck functions that vanish at the endpoints.

## Proof

Let f satisfy the hypotheses. Let r be any smooth function that is 0 at a and b and positive on the open interval (a, b); for example, let r = -(x - a) (x - b). Let h = r f. Then h is of class Ck on [a,b], and h(a) = h(b) = 0. By the hypotheses,

$0 = \int_a^b f(x) h(x) \; \mathrm{d}x = \int_a^b r(x) f(x)^2 \; \mathrm{d}x.$

The integrand is nonnegative, but it integrates to zero. Thus the integrand must be zero, except perhaps on a subset of [a, b] of measure 0. By continuity, if there is a point where the integrand is non-zero, there is also some interval around that point where the integrand is non-zero, which has non-zero measure. Thus the integrand must be identically zero over the entire interval. Because r> 0 on (a, b), f = 0 on (a, b) and hence on all of [a, b].

## The du Bois-Reymond lemma

The du Bois-Reymond lemma (named after Paul du Bois-Reymond) is a more general version of the above lemma. It defines a sufficient condition to guarantee that a function vanishes almost everywhere. Suppose that $f$ is a locally integrable function defined on an open set $\Omega \subset \mathbb{R}^n$. If

$\int_\Omega f(x) h(x) \, \mathrm{d}x = 0\,$

for all $h \in C^\infty_0(\Omega),$ then f(x) = 0 for almost all x in Ω. Here, $C^\infty_0(\Omega)$ is the space of all infinitely differentiable functions defined on Ω whose support is a compact set contained in Ω.

## Applications

This lemma is used to prove that extrema of the functional

$J[y] = \int_{x_0}^{x_1} L(t,y(t),\dot y(t)) \, \mathrm{d}t$

are weak solutions $y:[x_0,x_1]\to V$ (for an appropriate vector space $V$) of the Euler–Lagrange equation

${\partial L(t,y(t),\dot y(t)) \over \partial y} = {\mathrm{d} \over \mathrm{d}t} {\partial L(t,y(t),\dot y(t)) \over \partial \dot y} .$

The Euler–Lagrange equation plays a prominent role in classical mechanics and differential geometry.

## Footnotes

1. ^ Courant, R.; Hilbert, D. (1953). Methods of Mathematical Physics. Vol. 1. New York: Interscience Publishers, Inc. p. 185. ISBN 978-0470179529.