Lagrange's identity (boundary value problem)

In the study of ordinary differential equations and their associated boundary value problems, Lagrange's identity, named after Joseph Louis Lagrange, gives the boundary terms arising from integration by parts of a self-adjoint linear differential operator. Lagrange's identity is fundamental in Sturm–Liouville theory. In more than one independent variable, Lagrange's identity is generalized by Green's second identity.

Statement
In general terms, Lagrange's identity for any pair of functions u and v in function space C2 (that is, twice differentiable) in n dimensions is: $$vL[u]-uL^*[v]=\nabla \cdot \boldsymbol M, $$ where: $$M_i = \sum_{j=1}^n a_{ij}\left( v \frac{\partial u}{\partial x_j} -u \frac{\partial v}{\partial x_j} \right ) + uv \left( b_i - \sum_{j=1}^{n} \frac{\partial a_{ij}}{\partial x_j} \right ), $$ and $$\nabla \cdot \boldsymbol M = \sum_{i=1}^n \frac{\partial}{\partial x_i} M_i, $$

The operator L and its adjoint operator L* are given by: $$L[u] = \sum_{i,\ j =1}^n a_{i,j} \frac {\partial ^2 u }{\partial x_i \partial x_j} + \sum_{i=1}^n b_i \frac {\partial u}{\partial x_i} +c u $$ and $$L^*[v] = \sum_{i,\ j =1}^n \frac {\partial ^2 (a_{i,j} v) }{\partial x_i \partial x_j} - \sum_{i=1}^n \frac {\partial (b_i  v)}{\partial x_i} + cv. $$

If Lagrange's identity is integrated over a bounded region, then the divergence theorem can be used to form Green's second identity in the form: $$\int_\Omega v L[u] \, d\Omega = \int_{\Omega} u L^*[v]\ d\Omega +\int_S \boldsymbol{M \cdot n } \, dS, $$

where S is the surface bounding the volume Ω and n is the unit outward normal to the surface S.

Ordinary differential equations
Any second order ordinary differential equation of the form: $$a(x)\frac{d^2y}{dx^2} + b(x)\frac {dy}{dx} +c(x)y +\lambda w(x) y =0, $$ can be put in the form: $$\frac {d}{dx} \left( p(x) \frac {dy}{dx} \right ) +\left( q(x)+ \lambda w(x) \right) y(x) = 0. $$

This general form motivates introduction of the Sturm–Liouville operator L, defined as an operation upon a function f such that: $$L f = \frac {d}{dx} \left( p(x) \frac {df}{dx} \right) + q(x) f. $$

It can be shown that for any u and v for which the various derivatives exist, Lagrange's identity for ordinary differential equations holds: $$ uLv - vLu = - \frac{d}{dx} \left[ p(x) \left(v\frac{du}{dx} -u \frac{dv}{dx} \right ) \right]. $$

For ordinary differential equations defined in the interval [0, 1], Lagrange's identity can be integrated to obtain an integral form (also known as Green's formula): $$\int_0^1 dx \ ( u L v - v L u) = \left[p(x)\left(u \frac {dv}{dx}- v \frac {du}{dx} \right)\right]_0^1, $$

where $$ p=P(x)$$, $$ q=Q(x)$$, $$ u=U(x)$$ and $$ v=V(x)$$ are functions of $$ x$$. $$ u$$ and $$ v$$ having continuous second derivatives on the interval $ [0,1] $.

Proof of form for ordinary differential equations
We have: $$uLv = u \left[\frac {d}{dx} \left( p(x) \frac {dv}{dx} \right) + q(x) v \right], $$ and $$vLu = v \left[\frac {d}{dx} \left( p(x) \frac {du}{dx} \right) + q(x) u \right]. $$

Subtracting: $$uLv-vLu = u \frac {d}{dx} \left( p(x) \frac {dv}{dx} \right)-v \frac {d}{dx} \left( p(x) \frac {du}{dx} \right). $$

The leading multiplied u and v can be moved inside the differentiation, because the extra differentiated terms in u and v are the same in the two subtracted terms and simply cancel each other. Thus, $$\begin{align} uLv-vLu &= \frac {d}{dx} \left( p(x)u \frac {dv}{dx} \right)-\frac {d}{dx} \left( v p(x) \frac {du}{dx} \right), \\ &=\frac {d}{dx}\left[p(x)\left(u \frac {dv}{dx}- v \frac {du}{dx} \right)\right], \end{align}$$ which is Lagrange's identity. Integrating from zero to one: $$\int_0^1 dx \ ( uLv-vLu) = \left[p(x)\left(u \frac {dv}{dx}- v \frac {du}{dx} \right)\right]_0^1, $$ as was to be shown.