# Leibniz integral rule

Template:Single source {{ safesubst:#invoke:Unsubst||$N=Merge |date=__DATE__ |$B= Template:MboxTemplate:DMCTemplate:Merge partner }}

In calculus, Leibniz's rule for differentiation under the integral sign, named after Gottfried Leibniz, tells us that if we have an integral of the form

${\displaystyle \int _{y_{0}}^{y_{1}}f(x,y)\,\mathrm {d} y}$

then for x in (x0, x1) the derivative of this integral is thus expressible

${\displaystyle {\mathrm {d} \over \mathrm {d} x}\left(\int _{y_{0}}^{y_{1}}f(x,y)\,\mathrm {d} y\right)=\int _{y_{0}}^{y_{1}}f_{x}(x,y)\,\mathrm {d} y}$

provided that f and its partial derivative fx are both continuous over a region in the form [x0, x1] × [y0, y1].

Thus under certain conditions, one may interchange the integral and partial differential operators. This important result is particularly useful in the differentiation of integral transforms. An example of such is the moment generating function in probability theory, a variation of the Laplace transform, which can be differentiated to generate the moments of a random variable. Whether Leibniz's integral rule applies is essentially a question about the interchange of limits.

## Formal statement

Let f(x, θ) be a function such that fθ(x, θ) exists, and is continuous. Then,

${\displaystyle {\frac {\mathrm {d} }{\mathrm {d} \theta }}\left(\int _{a(\theta )}^{b(\theta )}f(x,\theta )\,\mathrm {d} x\right)=\int _{a(\theta )}^{b(\theta )}\partial _{\theta }f(x,\theta )\,\mathrm {d} x\,+\,f{\big (}b(\theta ),\theta {\big )}\cdot b'(\theta )\,-\,f{\big (}a(\theta ),\theta {\big )}\cdot a'(\theta )}$

where the partial derivative of f indicates that inside the integral only the variation of f(x, θ) with θ is considered in taking the derivative.

## Three-dimensional, time-dependent case

Figure 1: A vector field F(r, t) defined throughout space, and a surface Σ bounded by curve ∂Σ moving with velocity v over which the field is integrated.

A Leibniz integral rule for three dimensions is:[1]

${\displaystyle {\frac {\mathrm {d} }{\mathrm {d} t}}\iint _{\Sigma (t)}\mathbf {F} (\mathbf {r} ,t)\cdot \mathrm {d} \mathbf {A} =\iint _{\Sigma (t)}\left(\mathbf {F} _{t}(\mathbf {r} ,t)+\left[\mathrm {\nabla } \cdot \mathbf {F} (\mathbf {r} ,t)\right]\mathbf {v} \right)\cdot \mathrm {d} \mathbf {A} \,-\,\oint _{\partial \Sigma (t)}\left[\mathbf {v} \times \mathbf {F} (\mathbf {r} ,t)\right]\cdot \mathrm {d} \mathbf {s} }$

where:

F(r, t) is a vector field at the spatial position r at time t
Σ is a moving surface in three-space bounded by the closed curve ∂Σ
dA is a vector element of the surface Σ
ds is a vector element of the curve ∂Σ
v is the velocity of movement of the region Σ
∇⋅ is the vector divergence
× is the vector cross product
The double integrals are surface integrals over the surface Σ, and the line integral is over the bounding curve ∂Σ.

## Measure theory statement

Let ${\displaystyle X}$ be an open subset of ${\displaystyle \mathbb {R} }$ , and ${\displaystyle \Omega }$ be a measure space. Suppose ${\displaystyle f:X\times \Omega \rightarrow \mathbb {R} }$ satisfies the following conditions:

(1) ${\displaystyle f(x,\omega )}$ is a Lebesgue-integrable function of ${\displaystyle \omega }$ for each ${\displaystyle x\in X}$
(2) For almost all ${\displaystyle \omega \in \Omega }$ , the derivative ${\displaystyle f_{x}}$ exists for all ${\displaystyle x\in X}$
(3) There is an integrable function ${\displaystyle \theta :\Omega \rightarrow \mathbb {R} }$ such that ${\displaystyle |f_{x}(x,\omega )|\leq \theta (\omega )}$ for all ${\displaystyle x\in X}$ and almost every ${\displaystyle \omega \in \Omega }$
${\displaystyle {\frac {\mathrm {d} }{\mathrm {d} x}}\int _{\Omega }\,f(x,\omega )\mathrm {d} \omega =\int _{\Omega }\,f_{x}(x,\omega )\mathrm {d} \omega }$

## Proofs

### Proof of basic form

Let:

${\displaystyle u(x)=\int _{y_{0}}^{y_{1}}f(x,y)\,\mathrm {d} y\qquad (1)}$

So that, using difference quotients

${\displaystyle u'(x)=\lim _{h\rightarrow 0}{\frac {u(x+h)-u(x)}{h}}\qquad (2)}$

Substitute equation (1) into equation (2), combine the integrals (since the difference of two integrals equals the integral of the difference) and use the fact that 1/h is a constant:

{\displaystyle {\begin{aligned}u'(x)&=\lim _{h\rightarrow 0}{\frac {\int _{y_{0}}^{y_{1}}f(x+h,y)\,\mathrm {d} y-\int _{y_{0}}^{y_{1}}f(x,y)\,\mathrm {d} y}{h}}\\&=\lim _{h\rightarrow 0}{\frac {\int _{y_{0}}^{y_{1}}\left(f(x+h,y)-f(x,y)\right)\,\mathrm {d} y}{h}}\\&=\lim _{h\rightarrow 0}\int _{y_{0}}^{y_{1}}{\frac {f(x+h,y)-f(x,y)}{h}}\,\mathrm {d} y\end{aligned}}}

Provided that the limit can be passed under the integral sign, we obtain

${\displaystyle u'(x)=\int _{y_{0}}^{y_{1}}f_{x}(x,y)\,\mathrm {d} y}$

We claim that the passage of the limit under the integral sign is valid. Indeed, the bounded convergence theorem (a corollary of the dominated convergence theorem) of real analysis states that if a sequence of functions on a set of finite measure is uniformly bounded and converges pointwise, then passage of the limit under the integral is valid. To complete the proof, we show that these hypotheses are satisfied by the family of difference quotients

${\displaystyle f_{n}(y)={\frac {f(x+{\tfrac {1}{n}},y)-f(x,y)}{\tfrac {1}{n}}}.}$

Continuity of fx(x, y) and compactness implies that fx(x, y) is uniformly bounded. Uniform boundedness of the difference quotients follows from uniform boundedness of fx(x, y) and the mean value theorem, since for all y and n, there exists z in the interval [x, x + 1/n] such that

${\displaystyle f_{x}(z,y)={\frac {f(x+{\tfrac {1}{n}},y)-f(x,y)}{\tfrac {1}{n}}}.}$

The difference quotients converge pointwise to fx(x, y) since fx(x, y) exists. This completes the proof.

For a simpler proof using Fubini's theorem, see the references.

### Variable limits form

For a monovariant function g:

${\displaystyle {\mathrm {d} \over \mathrm {d} x}\left(\int _{f_{1}(x)}^{f_{2}(x)}g(t)\,\mathrm {d} t\right)=g[f_{2}(x)]{f_{2}'(x)}-g[f_{1}(x)]{f_{1}'(x)}}$

This follows from the chain rule.

### General form with variable limits

Now, set

${\displaystyle \varphi (\alpha )=\int _{a}^{b}f(x,\alpha )\,\mathrm {d} x,}$

where a and b are functions of α that exhibit increments Δa and Δb, respectively, when α is increased by Δα. Then,

{\displaystyle {\begin{aligned}\Delta \varphi &=\varphi (\alpha +\Delta \alpha )-\varphi (\alpha )\\&=\int _{a+\Delta a}^{b+\Delta b}f(x,\alpha +\Delta \alpha )\,\mathrm {d} x-\int _{a}^{b}f(x,\alpha )\,\mathrm {d} x\\&=\int _{a+\Delta a}^{a}f(x,\alpha +\Delta \alpha )\,\mathrm {d} x+\int _{a}^{b}f(x,\alpha +\Delta \alpha )\,\mathrm {d} x+\int _{b}^{b+\Delta b}f(x,\alpha +\Delta \alpha )\,\mathrm {d} x-\int _{a}^{b}f(x,\alpha )\,\mathrm {d} x\\&=-\int _{a}^{a+\Delta a}f(x,\alpha +\Delta \alpha )\,\mathrm {d} x+\int _{a}^{b}[f(x,\alpha +\Delta \alpha )-f(x,\alpha )]\,\mathrm {d} x+\int _{b}^{b+\Delta b}f(x,\alpha +\Delta \alpha )\,\mathrm {d} x\end{aligned}}}

A form of the mean value theorem, ${\displaystyle \int _{a}^{b}f(x)\,\mathrm {d} x=(b-a)f(\xi )}$, where a < ξ < b, may be applied to the first and last integrals of the formula for Δφ above, resulting in

${\displaystyle \Delta \varphi =-\Delta af(\xi _{1},\alpha +\Delta \alpha )+\int _{a}^{b}[f(x,\alpha +\Delta \alpha )-f(x,\alpha )]\,\mathrm {d} x+\Delta bf(\xi _{2},\alpha +\Delta \alpha )}$

Dividing by Δα, and letting Δα → 0, and noticing ξ1a and ξ2b and using the result

${\displaystyle \lim _{\Delta \alpha \to 0}\int _{a}^{b}{\frac {f(x,\alpha +\Delta \alpha )-f(x,\alpha )}{\Delta \alpha }}\,\mathrm {d} x=\int _{a}^{b}f_{\alpha }(x,\alpha )\,\mathrm {d} x}$

yields the general form of the Leibniz integral rule below:

${\displaystyle {\frac {\mathrm {d} \varphi }{\mathrm {d} \alpha }}=\int _{a}^{b}f_{\alpha }(x,\alpha )\,\mathrm {d} x+f(b,\alpha ){\frac {\mathrm {d} b}{\mathrm {d} \alpha }}-f(a,\alpha ){\frac {\mathrm {d} a}{\mathrm {d} \alpha }}}$

### Three-dimensional, time-dependent form

At time t the surface Σ in Figure 1 contains a set of points arranged about a centroid C(t) and function F(r, t) can be written as F(C(t) + rC(t), t) = F(C(t) + I, t), with I independent of time. Variables are shifted to a new frame of reference attached to the moving surface, with origin at C(t). For a rigidly translating surface, the limits of integration are then independent of time, so:

${\displaystyle {\frac {\mathrm {d} }{\mathrm {d} t}}\left(\iint _{\Sigma (t)}\mathrm {d} \mathbf {A} _{\mathbf {r} }\cdot \mathbf {F} (\mathbf {r} ,t)\right)=\iint _{\Sigma }\mathrm {d} \mathbf {A} _{\mathbf {I} }\cdot {\frac {\mathrm {d} }{\mathrm {d} t}}\mathbf {F} (\mathbf {C} (t)+\mathbf {I} ,t)}$

where the limits of integration confining the integral to the region Σ no longer are time dependent so differentiation passes through the integration to act on the integrand only:

${\displaystyle {\frac {\mathrm {d} }{\mathrm {d} t}}\mathbf {F} (\mathbf {C} (t)+\mathbf {I} ,t)=\mathbf {F} _{t}(\mathbf {C} (t)+\mathbf {I} ,t)+\mathbf {v\cdot \nabla F} (\mathbf {C} (t)+\mathbf {I} ,t)=\mathbf {F} _{t}(\mathbf {r} ,t)+\mathbf {v} \cdot \nabla \mathbf {F} (\mathbf {r} ,t)}$

with the velocity of motion of the surface defined by:

${\displaystyle \mathbf {v} ={\frac {\mathrm {d} }{\mathrm {d} t}}\mathbf {C} (t)}$

This equation expresses the material derivative of the field, that is, the derivative with respect to a coordinate system attached to the moving surface. Having found the derivative, variables can be switched back to the original frame of reference. We notice that (see article on curl ):

${\displaystyle \mathbf {\nabla \times } \left(\mathbf {v\times F} \right)=(\nabla \cdot \mathbf {F} +\mathbf {F} \cdot \nabla )\mathbf {v} -(\nabla \cdot \mathbf {v} +\mathbf {v} \cdot \nabla )\mathbf {F} }$

and that Stokes theorem allows the surface integral of the curl over Σ to be made a line integral over ∂Σ:

${\displaystyle {\frac {\mathrm {d} }{\mathrm {d} t}}\left(\iint _{\Sigma (t)}\mathbf {F} (\mathbf {r} ,t)\cdot \mathrm {d} \mathbf {A} \right)=\iint _{\Sigma (t)}{\big (}\mathbf {F} _{t}(\mathbf {r} ,t)+\left(\mathbf {F\cdot \nabla } \right)\mathbf {v} +\left(\mathbf {\nabla \cdot F} \right)\mathbf {v} -(\nabla \cdot \mathbf {v} )\mathbf {F} {\big )}\,\cdot \,\mathrm {d} \mathbf {A} \,-\,\oint _{\partial \Sigma (t)}\left(\mathbf {\mathbf {v} \times F} \right)\mathbf {\cdot } \,\mathrm {d} \mathbf {s} .}$

The sign of the line integral is based on the right-hand rule for the choice of direction of line element ds. To establish this sign, for example, suppose the field F points in the positive z-direction, and the surface Σ is a portion of the xy-plane with perimeter ∂Σ. We adopt the normal to Σ to be in the positive z-direction. Positive traversal of ∂Σ is then counterclockwise (right-hand rule with thumb along z-axis). Then the integral on the left-hand side determines a positive flux of F through Σ. Suppose Σ translates in the positive x-direction at velocity v. An element of the boundary of Σ parallel to the y-axis, say ds, sweeps out an area vt × ds in time t. If we integrate around the boundary ∂Σ in a counterclockwise sense, vt × ds points in the negative z-direction on the left side of ∂Σ (where ds points downward), and in the positive z-direction on the right side of ∂Σ (where ds points upward), which makes sense because Σ is moving to the right, adding area on the right and losing it on the left. On that basis, the flux of F is increasing on the right of ∂Σ and decreasing on the left. However, the dot-product v × F • ds = −F × v • ds = −F • v × ds. Consequently, the sign of the line integral is taken as negative.

If v is a constant,

${\displaystyle {\frac {\mathrm {d} }{\mathrm {d} t}}\iint _{\Sigma (t)}\mathbf {F} (\mathbf {r} ,t)\cdot \mathrm {d} \mathbf {A} =\iint _{\Sigma (t)}{\big (}\mathbf {F} _{t}(\mathbf {r} ,t)+\left(\mathbf {\nabla \cdot F} \right)\mathbf {v} {\big )}\cdot \mathrm {d} \mathbf {A} -\oint _{\partial \Sigma (t)}\left(\mathbf {\mathbf {v} \times F} \right)\mathbf {\cdot } \,\mathrm {d} \mathbf {s} }$

which is the quoted result. This proof does not consider the possibility of the surface deforming as it moves.