In the study of ordinary differential equations and their associated boundary value problems, Lagrange's identity 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 C 2 (that is, twice differentiable) in n dimensions is:[1]
![{\displaystyle vL[u]-uL^{*}[v]=\nabla \cdot {\boldsymbol {M}}\ ,}](/media/api/rest_v1/media/math/render/svg/9f30ac2610a4c8ac314c51a24e932f278245b2c5)
where:

and

The operator L and and its adjoint operator L* are given by:
![{\displaystyle L[u]=\Sigma _{i,\ j=1}^{n}a_{i,j}{\frac {\partial ^{2}u}{\partial x_{i}\partial x_{j}}}+\Sigma _{i=1}{n}b_{i}{\frac {\partial u}{\partial x_{i}}}+cu}](/media/api/rest_v1/media/math/render/svg/d6d4ff6547be884897653c3dc6a4486247de5475)
and
![{\displaystyle L^{*}[v]=\Sigma _{i,\ j=1}^{n}{\frac {\partial ^{2}(a_{i,j}v)}{\partial x_{i}\partial x_{j}}}-\Sigma _{i=1}{n}{\frac {\partial (b_{i}v)}{\partial x_{i}}}+cv\ .}](/media/api/rest_v1/media/math/render/svg/24a798134960983937d5121e9b6fbec7119f5463)
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:
![{\displaystyle \int _{\Omega }vL[u]\ d\Omega =\int _{\Omega }uL^{*}[v]\ d\Omega +\int _{S}{\boldsymbol {M\cdot n}}\ dS\ ,}](/media/api/rest_v1/media/math/render/svg/69550fcedaf21c335679db84ba51c4f5e94a0dc0)
where S is the surface bounding the volume Ω and n is the unit outward normal to the surface S.
Ordinary differential equations
For ordinary differential equations defined in the interval [0, 1], Lagrange's identity can be written: [2]
- (1)

where
,
,
and
are functions of
.
and
having continuous second derivatives on the interval
. The notation ‘ ' ’ represents differentiation:
. The symbol L is the Sturm–Liouville differential operator defined by:
- (2)

Proof
Replace
,
,
and
into the rule of integration by parts
- (3)

we have:
- (4)

Replace
,
,
and
into the rule ('3') again, we have:

- (5)

Replace ('5') into ('4'), we get:

- (6)

From the definition ('2'), we can get:
- (7)
![{\displaystyle \ \int _{0}^{1}(Lu)v\,dx=\int _{0}^{1}[-(pu')'+qu]v\,dx=-\int _{0}^{1}(pu')'v\,dx+\int _{0}^{1}uqv\,dx.}](/media/api/rest_v1/media/math/render/svg/4283ca6b5e2b1fca27d7f4c42aabf724e01094dc)
Replace ('6') into ('7'), we have:

- (8)

Rearrange terms of ('8') then ('1') is obtained. Q.E.D..
References