Leibniz Integral Rule
Get Leibniz Integral Rule essential facts below. View Videos or join the Leibniz Integral Rule discussion. Add Leibniz Integral Rule to your PopFlock.com topic list for future reference or share this resource on social media.
Leibniz Integral Rule

In calculus, the Leibniz integral rule for differentiation under the integral sign, named after Gottfried Leibniz, states that for an integral of the form

${\displaystyle \int _{a(x)}^{b(x)}f(x,t)\,dt,}$

where ${\displaystyle -\infty , the derivative of this integral is expressible as

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

where the partial derivative indicates that inside the integral, only the variation of ${\displaystyle f(x,t)}$ with ${\displaystyle x}$ is considered in taking the derivative.[1] Notice that if ${\displaystyle a(x)}$ and ${\displaystyle b(x)}$ are constants rather than functions of ${\displaystyle x}$, we have the special case:

${\displaystyle {\frac {d}{dx}}\left(\int _{a}^{b}f(x,t)\,dt\right)=\int _{a}^{b}{\frac {\partial }{\partial x}}f(x,t)\,dt.}$

Besides, if ${\displaystyle a(x)=a}$ and ${\displaystyle b(x)=x}$, which is a common situation as well (for example, in the proof of Cauchy's repeated integration formula), we have:

${\displaystyle {\frac {d}{dx}}\left(\int _{a}^{x}f(x,t)\,dt\right)=f{\big (}x,x{\big )}+\int _{a}^{x}{\frac {\partial }{\partial x}}f(x,t)\,dt,}$

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.

## Higher dimensions

The Leibniz integral rule can be extended to multidimensional integrals. In two and three dimensions, this rule is better known from the field of fluid dynamics as the Reynolds transport theorem:

${\displaystyle {\frac {d}{dt}}\int _{D(t)}F(\mathbf {x} ,t)\,dV=\int _{D(t)}{\frac {\partial }{\partial t}}F(\mathbf {x} ,t)\,dV+\int _{\partial D(t)}F(\mathbf {x} ,t)\mathbf {v} _{b}\cdot d\mathbf {\Sigma } ,}$

where ${\displaystyle F(\mathbf {x} ,t)}$ is a scalar function, D(t) and ?D(t) denote a time-varying connected region of R3 and its boundary, respectively, ${\displaystyle \mathbf {v} _{b}}$ is the Eulerian velocity of the boundary (see Lagrangian and Eulerian coordinates) and d? = n dS is the unit normal component of the surface element.

The general statement of the Leibniz integral rule requires concepts from differential geometry, specifically differential forms, exterior derivatives, wedge products and interior products. With those tools, the Leibniz integral rule in n dimensions is[2]

${\displaystyle {\frac {d}{dt}}\int _{\Omega (t)}\omega =\int _{\Omega (t)}i_{\mathbf {v} }(d_{x}\omega )+\int _{\partial \Omega (t)}i_{\mathbf {v} }\omega +\int _{\Omega (t)}{\dot {\omega }},}$

where ?(t) is a time-varying domain of integration, ? is a p-form, ${\displaystyle \mathbf {v} ={\frac {\partial \mathbf {x} }{\partial t}}}$ is the vector field of the velocity, ${\displaystyle i_{\mathbf {v} }}$ denotes the interior product with ${\displaystyle \mathbf {v} }$, dx? is the exterior derivative of ? with respect to the space variables only and ${\displaystyle {\dot {\omega }}}$ is the time derivative of ?.

However, all of these identities can be derived from a most general statement about Lie derivatives:

${\displaystyle \left.{\frac {d}{dt}}\right|_{t=0}\int _{\operatorname {im} _{\psi _{t}}(\Omega )}\omega =\int _{\Omega }{\mathcal {L}}_{\Psi }\omega ,}$

Here, the ambient manifold on which the differential form ${\displaystyle \omega }$ lives includes both space and time.

• ${\displaystyle \Omega }$ is the region of integration (a submanifold) at a given instant (it does not depend on ${\displaystyle t}$, since its parametrization as a submanifold defines its position in time),
• ${\displaystyle {\mathcal {L}}}$ is the Lie derivative,
• ${\displaystyle \Psi }$ is the spacetime vector field obtained from adding the unitary vector field in the direction of time to the purely spatial vector field ${\displaystyle \mathbf {v} }$ from the previous formulas (i.e, ${\displaystyle \Psi }$ is the spacetime velocity of ${\displaystyle \Omega }$),
• ${\displaystyle \psi _{t}}$ is a diffeomorphism from the one-parameter group generated by the flow of ${\displaystyle \Psi }$, and
• ${\displaystyle {\text{im}}_{\psi _{t}}(\Omega )}$ is the image of ${\displaystyle \Omega }$ under such diffeomorphism.

Something remarkable about this form, is that it can account for the case when ${\displaystyle \Omega }$ changes its shape and size over time, since such deformations are fully determined by ${\displaystyle \Psi }$.

## Measure theory statement

Let ${\displaystyle X}$ be an open subset of ${\displaystyle \mathbf {R} }$, and ${\displaystyle \Omega }$ be a measure space. Suppose ${\displaystyle f\colon X\times \Omega \to \mathbf {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 \colon \Omega \to \mathbf {R} }$ such that ${\displaystyle |f_{x}(x,\omega )|\leq \theta (\omega )}$ for all ${\displaystyle x\in X}$ and almost every ${\displaystyle \omega \in \Omega }$.

Then, for all ${\displaystyle x\in X}$,

${\displaystyle {\frac {d}{dx}}\int _{\Omega }f(x,\omega )\,d\omega =\int _{\Omega }f_{x}(x,\omega )\,d\omega .}$

The proof relies on the dominated convergence theorem and the mean value theorem (details below).

## Proofs

### Proof of basic form

We first prove the case of constant limits of integration a and b.

We use Fubini's theorem to change the order of integration. For every x and h, such that h>0 and both x and x+h are within [x0,x1], we have:

${\displaystyle \int _{x}^{x+h}\int _{a}^{b}f_{x}(x,t)\,dt\,dx=\int _{a}^{b}\int _{x}^{x+h}f_{x}(x,t)\,dx\,dt=\int _{a}^{b}\left(f(x+h,t)-f(x,t)\right)\,dt=\int _{a}^{b}f(x+h,t)\,dt-\int _{a}^{b}f(x,t)\,dt}$

Note that the integrals at hand are well defined since ${\displaystyle f_{x}(x,t)}$ is continuous at the closed rectangle ${\displaystyle [x_{0},x_{1}]\times [a,b]}$ and thus also uniformly continuous there; thus its integrals by either dt or dx are continuous in the other variable and also integrable by it (essentially this is because for uniformly continuous functions, one may pass the limit through the integration sign, as elaborated below).

Therefore:

${\displaystyle {\frac {\int _{a}^{b}f(x+h,t)\,dt-\int _{a}^{b}f(x,t)\,dt}{h}}={\frac {1}{h}}\int _{x}^{x+h}\int _{a}^{b}f_{x}(x,t)\,dt\,dx={\frac {F(x+h)-F(x)}{h}}}$

Where we have defined:

${\displaystyle F(u)\equiv \int _{x_{0}}^{u}\int _{a}^{b}f_{x}(x,t)\,dt\,dx}$

(we may replace x0 here by any other point between x0 and x)

F is differentiable with derivative ${\textstyle \int _{a}^{b}f_{x}(x,t)\,dt}$, so we can take the limit where h approaches zero. For the left hand side this limit is:

${\displaystyle {\frac {d}{dx}}\int _{a}^{b}f(x,t)\,dt}$

For the right hand side, we get:

${\displaystyle F'(x)=\int _{a}^{b}f_{x}(x,t)\,dt}$

And we thus prove the desired result:

${\displaystyle {\frac {d}{dx}}\int _{a}^{b}f(x,t)\,dt=\int _{a}^{b}f_{x}(x,t)\,dt}$

#### Another proof using the bounded convergence theorem

If the integrals at hand are Lebesgue integrals, we may use the bounded convergence theorem (valid for these integrals, but not for Riemann integrals) in order to show that the limit can be passed through the integral sign.

Note that this proof is weaker in the sense that it only shows that fx(x,t) is Lebesgue integrable, but not that it is Riemann integrable. In the former (stronger) proof, if f(x,t) is Riemann integrable, then so is fx(x,t) (and thus is obviously also Lebesgue integrable).

Let

By the definition of the derivative,

Substitute equation (1) into equation (2). The difference of two integrals equals the integral of the difference, and 1/h is a constant, so

{\displaystyle {\begin{aligned}u'(x)&=\lim _{h\to 0}{\frac {\int _{a}^{b}f(x+h,t)\,dt-\int _{a}^{b}f(x,t)\,dt}{h}}\\&=\lim _{h\to 0}{\frac {\int _{a}^{b}\left(f(x+h,t)-f(x,t)\right)\,dt}{h}}\\&=\lim _{h\to 0}\int _{a}^{b}{\frac {f(x+h,t)-f(x,t)}{h}}\,dt.\end{aligned}}}

We now show that the limit can be passed through the integral sign.

We claim that the passage of the limit under the integral sign is valid by the bounded convergence theorem (a corollary of the dominated convergence theorem). For each ? > 0, consider the difference quotient

${\displaystyle f_{\delta }(x,t)={\frac {f(x+\delta ,t)-f(x,t)}{\delta }}.}$

For t fixed, the mean value theorem implies there exists z in the interval [x, x + ?] such that

${\displaystyle f_{\delta }(x,t)=f_{x}(z,t).}$

Continuity of fx(x, t) and compactness of the domain together imply that fx(x, t) is bounded. The above application of the mean value theorem therefore gives a uniform (independent of ${\displaystyle t}$) bound on ${\displaystyle f_{\delta }(x,t)}$. The difference quotients converge pointwise to the partial derivative fx by the assumption that the partial derivative exists.

The above argument shows that for every sequence {?n} -> 0, the sequence ${\displaystyle \{f_{\delta _{n}}(x,t)\}}$ is uniformly bounded and converges pointwise to fx. The bounded convergence theorem 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. In particular, the limit and integral may be exchanged for every sequence {?n} -> 0. Therefore, the limit as ? -> 0 may be passed through the integral sign.

### Variable limits form

For a continuous real valued function g of one real variable, and real valued differentiable functions ${\displaystyle f_{1}}$ and ${\displaystyle f_{2}}$ of one real variable,

${\displaystyle {\frac {d}{dx}}\left(\int _{f_{1}(x)}^{f_{2}(x)}g(t)\,dt\right)=g\left(f_{2}(x)\right){f_{2}'(x)}-g\left(f_{1}(x)\right){f_{1}'(x)}.}$

This follows from the chain rule and the First Fundamental Theorem of Calculus. Define

${\displaystyle G(x)=\int _{f_{1}(x)}^{f_{2}(x)}g(t)\,dt,}$

and

${\displaystyle \Gamma (x)=\int _{0}^{x}g(t)\,dt.}$ (The lower limit just has to be some number in the domain of ${\displaystyle g}$)

Then, ${\displaystyle G(x)}$ can be written as a composition: ${\displaystyle G(x)=(\Gamma \circ f_{2})(x)-(\Gamma \circ f_{1})(x)}$. The Chain Rule then implies that

${\displaystyle G'(x)=\Gamma '\left(f_{2}(x)\right)f_{2}'(x)-\Gamma '\left(f_{1}(x)\right)f_{1}'(x).}$

By the First Fundamental Theorem of Calculus, ${\displaystyle \Gamma '(x)=g(x)}$. Therefore, substituting this result above, we get the desired equation:

${\displaystyle G'(x)=g\left(f_{2}(x)\right){f_{2}'(x)}-g\left(f_{1}(x)\right){f_{1}'(x)}.}$

Note: This form can be particularly useful if the expression to be differentiated is of the form:

${\displaystyle \int _{f_{1}(x)}^{f_{2}(x)}h(x)g(t)\,dt}$

Because ${\displaystyle h(x)}$ does not depend on the limits of integration, it may be move out from under the integral sign, and the above form may be used with the Product rule, i.e.,

${\displaystyle {\frac {d}{dx}}\left(\int _{f_{1}(x)}^{f_{2}(x)}h(x)g(t)\,dt\right)={\frac {d}{dx}}\left(h(x)\int _{f_{1}(x)}^{f_{2}(x)}g(t)\,dt\right)=h'(x)\int _{f_{1}(x)}^{f_{2}(x)}g(t)\,dt+h(x){\frac {d}{dx}}\left(\int _{f_{1}(x)}^{f_{2}(x)}g(t)\,dt\right)}$

### General form with variable limits

Set

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

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 )\\[4pt]&=\int _{a+\Delta a}^{b+\Delta b}f(x,\alpha +\Delta \alpha )\,dx-\int _{a}^{b}f(x,\alpha )\,dx\\[4pt]&=\int _{a+\Delta a}^{a}f(x,\alpha +\Delta \alpha )\,dx+\int _{a}^{b}f(x,\alpha +\Delta \alpha )\,dx+\int _{b}^{b+\Delta b}f(x,\alpha +\Delta \alpha )\,dx-\int _{a}^{b}f(x,\alpha )\,dx\\[4pt]&=-\int _{a}^{a+\Delta a}f(x,\alpha +\Delta \alpha )\,dx+\int _{a}^{b}[f(x,\alpha +\Delta \alpha )-f(x,\alpha )]\,dx+\int _{b}^{b+\Delta b}f(x,\alpha +\Delta \alpha )\,dx.\end{aligned}}}

A form of the mean value theorem, ${\textstyle \int _{a}^{b}f(x)\,dx=(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 )]\,dx+\Delta bf(\xi _{2},\alpha +\Delta \alpha ).}$

Divide by ?? and let ?? -> 0. Notice ?1 -> a and ?2 -> b. We may pass the limit through the integral sign:

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

again by the bounded convergence theorem. This yields the general form of the Leibniz integral rule,

${\displaystyle {\frac {d\varphi }{d\alpha }}=\int _{a}^{b}{\frac {\partial }{\partial \alpha }}f(x,\alpha )\,dx+f(b,\alpha ){\frac {db}{d\alpha }}-f(a,\alpha ){\frac {da}{d\alpha }}.}$

### Alternative proof of the general form with variable limits, using the chain rule

The general form of Leibniz's Integral Rule with variable limits can be derived as a consequence of the basic form of Leibniz's Integral Rule, the multivariable chain rule, and the First Fundamental Theorem of Calculus. Suppose ${\displaystyle f}$ is defined in a rectangle in the ${\displaystyle x-t}$ plane, for ${\displaystyle x\in [x_{1},x_{2}]}$ and ${\displaystyle t\in [t_{1},t_{2}]}$. Also, assume ${\displaystyle f}$ and the partial derivative ${\textstyle {\frac {\partial f}{\partial x}}}$ are both continuous functions on this rectangle. Suppose ${\displaystyle a,b}$ are differentiable real valued functions defined on ${\displaystyle [x_{1},x_{2}]}$, with values in ${\displaystyle [t_{1},t_{2}]}$ (i.e. for every ${\displaystyle x\in [x_{1},x_{2}],a(x),b(x)\in [t_{1},t_{2}]}$). Now, set

${\displaystyle F(x,y)=\int _{t_{1}}^{y}f(x,t)\,dt,}$   for ${\displaystyle x\in [x_{1},x_{2}]}$ and ${\displaystyle y\in [t_{1},t_{2}]}$

and

${\displaystyle G(x)=\int _{a(x)}^{b(x)}f(x,t)\,dt,}$   for ${\displaystyle x\in [x_{1},x_{2}]}$

Then, by properties of Definite Integrals, we can write

{\displaystyle {\begin{aligned}G(x)&=\int _{t_{1}}^{b(x)}f(x,t)\,dt-\int _{t_{1}}^{a(x)}f(x,t)\,dt\\[4pt]&=F(x,b(x))-F(x,a(x))\end{aligned}}}

Since the functions ${\displaystyle F,a,b}$ are all differentiable (see the remark at the end of the proof), by the Multivariable Chain Rule, it follows that ${\displaystyle G}$ is differentiable, and its derivative is given by the formula:

${\displaystyle G'(x)=\left({\frac {\partial F}{\partial x}}(x,b(x))+{\frac {\partial F}{\partial y}}(x,b(x))b'(x)\right)-\left({\frac {\partial F}{\partial x}}(x,a(x))+{\frac {\partial F}{\partial y}}(x,a(x))a'(x)\right)}$

Now, note that for every ${\displaystyle x\in [x_{1},x_{2}]}$, and for every ${\displaystyle y\in [t_{1},t_{2}]}$, we have that ${\textstyle {\frac {\partial F}{\partial x}}(x,y)=\int _{t_{1}}^{y}{\frac {\partial f}{\partial x}}(x,t)\,dt}$, because when taking the partial derivative with respect to ${\displaystyle x}$ of ${\displaystyle F}$, we are keeping ${\displaystyle y}$ fixed in the expression ${\textstyle \int _{t_{1}}^{y}f(x,t)\,dt}$; thus the basic form of Leibniz's Integral Rule with constant limits of integration applies. Next, by the First Fundamental Theorem of Calculus, we have that ${\textstyle {\dfrac {\partial F}{\partial y}}(x,y)=f(x,y)}$; because when taking the partial derivative with respect to ${\displaystyle y}$ of ${\displaystyle F}$, the first variable ${\displaystyle x}$ is fixed, so the fundamental theorem can indeed be applied.

Substituting these results into the equation for ${\displaystyle G'(x)}$ above gives:

{\displaystyle {\begin{aligned}G'(x)&=\left(\int _{t_{1}}^{b(x)}{\frac {\partial f}{\partial x}}(x,t)\,dt+f(x,b(x))b'(x)\right)-\left(\int _{t_{1}}^{a(x)}{\dfrac {\partial f}{\partial x}}(x,t)\,dt+f(x,a(x))a'(x)\right)\\[2pt]&=f(x,b(x))b'(x)-f(x,a(x))a'(x)+\int _{a(x)}^{b(x)}{\frac {\partial f}{\partial x}}(x,t)\,dt,\end{aligned}}}

as desired.

There is a technical point in the proof above which is worth noting: applying the Chain Rule to ${\displaystyle G}$ requires that ${\displaystyle F}$ already be differentiable. This is where we use our assumptions about ${\displaystyle f}$. As mentioned above, the partial derivatives of ${\displaystyle F}$ are given by the formulas ${\textstyle {\frac {\partial F}{\partial x}}(x,y)=\int _{t_{1}}^{y}{\frac {\partial f}{\partial x}}(x,t)\,dt}$ and ${\textstyle {\frac {\partial F}{\partial y}}(x,y)=f(x,y)}$. Since ${\textstyle {\dfrac {\partial f}{\partial x}}}$ is continuous, its integral is also a continuous function,[3] and since ${\displaystyle f}$ is also continuous, these two results show that both the partial derivatives of ${\displaystyle F}$ are continuous. Since continuity of partial derivatives implies differentiability of the function,[4] ${\displaystyle F}$ is indeed differentiable.

### Three-dimensional, time-dependent form

At time t the surface ? in Figure 1 contains a set of points arranged about a centroid ${\displaystyle \mathbf {C} (t)}$. The function ${\displaystyle \mathbf {F} (\mathbf {r} ,t)}$ can be written as

${\displaystyle \mathbf {F} (\mathbf {C} (t)+\mathbf {r} -\mathbf {C} (t),t)=\mathbf {F} (\mathbf {C} (t)+\mathbf {I} ,t),}$

with ${\displaystyle \mathbf {I} }$ independent of time. Variables are shifted to a new frame of reference attached to the moving surface, with origin at ${\displaystyle \mathbf {C} (t)}$. For a rigidly translating surface, the limits of integration are then independent of time, so:

${\displaystyle {\frac {d}{dt}}\left(\iint _{\Sigma (t)}d\mathbf {A} _{\mathbf {r} }\cdot \mathbf {F} (\mathbf {r} ,t)\right)=\iint _{\Sigma }d\mathbf {A} _{\mathbf {I} }\cdot {\frac {d}{dt}}\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 {d}{dt}}\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 {d}{dt}}\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 \nabla \times \left(\mathbf {v} \times \mathbf {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 equates the surface integral of the curl over ? with a line integral over :

${\displaystyle {\frac {d}{dt}}\left(\iint _{\Sigma (t)}\mathbf {F} (\mathbf {r} ,t)\cdot d\mathbf {A} \right)=\iint _{\Sigma (t)}{\big (}\mathbf {F} _{t}(\mathbf {r} ,t)+\left(\mathbf {F\cdot \nabla } \right)\mathbf {v} +\left(\nabla \cdot \mathbf {F} \right)\mathbf {v} -(\nabla \cdot \mathbf {v} )\mathbf {F} {\big )}\cdot d\mathbf {A} -\oint _{\partial \Sigma (t)}\left(\mathbf {v} \times \mathbf {F} \right)\cdot 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 {d}{dt}}\iint _{\Sigma (t)}\mathbf {F} (\mathbf {r} ,t)\cdot d\mathbf {A} =\iint _{\Sigma (t)}{\big (}\mathbf {F} _{t}(\mathbf {r} ,t)+\left(\nabla \cdot \mathbf {F} \right)\mathbf {v} {\big )}\cdot d\mathbf {A} -\oint _{\partial \Sigma (t)}\left(\mathbf {v} \times \mathbf {F} \right)\cdot \,d\mathbf {s} ,}$

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

### Alternative derivation

Lemma. One has:

${\displaystyle {\frac {\partial }{\partial b}}\left(\int _{a}^{b}f(x)\,dx\right)=f(b),\qquad {\frac {\partial }{\partial a}}\left(\int _{a}^{b}f(x)\,dx\right)=-f(a).}$

Proof. From the proof of the fundamental theorem of calculus,

{\displaystyle {\begin{aligned}{\frac {\partial }{\partial b}}\left(\int _{a}^{b}f(x)\,dx\right)&=\lim _{\Delta b\to 0}{\frac {1}{\Delta b}}\left[\int _{a}^{b+\Delta b}f(x)\,dx-\int _{a}^{b}f(x)\,dx\right]\\[6pt]&=\lim _{\Delta b\to 0}{\frac {1}{\Delta b}}\int _{b}^{b+\Delta b}f(x)\,dx\\[6pt]&=\lim _{\Delta b\to 0}{\frac {1}{\Delta b}}\left[f(b)\Delta b+O\left(\Delta b^{2}\right)\right]\\[6pt]&=f(b),\end{aligned}}}

and

{\displaystyle {\begin{aligned}{\frac {\partial }{\partial a}}\left(\int _{a}^{b}f(x)\,dx\right)&=\lim _{\Delta a\to 0}{\frac {1}{\Delta a}}\left[\int _{a+\Delta a}^{b}f(x)\,dx-\int _{a}^{b}f(x)\,dx\right]\\[6pt]&=\lim _{\Delta a\to 0}{\frac {1}{\Delta a}}\int _{a+\Delta a}^{a}f(x)\,dx\\[6pt]&=\lim _{\Delta a\to 0}{\frac {1}{\Delta a}}\left[-f(a)\Delta a+O\left(\Delta a^{2}\right)\right]\\[6pt]&=-f(a).\end{aligned}}}

Suppose a and b are constant, and that f(x) involves a parameter ? which is constant in the integration but may vary to form different integrals. Assume that f(x, ?) is a continuous function of x and ? in the compact set {(x, ?) : ?0 ? ?1 and a x b}, and that the partial derivative f?(x, ?) exists and is continuous. If one defines:

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

then ${\displaystyle \varphi }$ may be differentiated with respect to ? by differentiating under the integral sign, i.e.,

${\displaystyle {\frac {d\varphi }{d\alpha }}=\int _{a}^{b}{\frac {\partial }{\partial \alpha }}f(x,\alpha )\,dx.}$

By the Heine-Cantor theorem it is uniformly continuous in that set. In other words, for any ? > 0 there exists ?? such that for all values of x in [a, b],

${\displaystyle |f(x,\alpha +\Delta \alpha )-f(x,\alpha )|<\varepsilon .}$

On the other hand,

{\displaystyle {\begin{aligned}\Delta \varphi &=\varphi (\alpha +\Delta \alpha )-\varphi (\alpha )\\[6pt]&=\int _{a}^{b}f(x,\alpha +\Delta \alpha )\,dx-\int _{a}^{b}f(x,\alpha )\,dx\\[6pt]&=\int _{a}^{b}\left(f(x,\alpha +\Delta \alpha )-f(x,\alpha )\right)\,dx\\[6pt]&\leq \varepsilon (b-a).\end{aligned}}}

Hence ?(?) is a continuous function.

Similarly if ${\displaystyle {\frac {\partial }{\partial \alpha }}f(x,\alpha )}$ exists and is continuous, then for all ? > 0 there exists ?? such that:

${\displaystyle \forall x\in [a,b],\quad \left|{\frac {f(x,\alpha +\Delta \alpha )-f(x,\alpha )}{\Delta \alpha }}-{\frac {\partial f}{\partial \alpha }}\right|<\varepsilon .}$

Therefore,

${\displaystyle {\frac {\Delta \varphi }{\Delta \alpha }}=\int _{a}^{b}{\frac {f(x,\alpha +\Delta \alpha )-f(x,\alpha )}{\Delta \alpha }}\,dx=\int _{a}^{b}{\frac {\partial f(x,\alpha )}{\partial \alpha }}\,dx+R,}$

where

${\displaystyle |R|<\int _{a}^{b}\varepsilon \,dx=\varepsilon (b-a).}$

Now, ? -> 0 as ?? -> 0, so

${\displaystyle \lim _{{\Delta \alpha }\to 0}{\frac {\Delta \varphi }{\Delta \alpha }}={\frac {d\varphi }{d\alpha }}=\int _{a}^{b}{\frac {\partial }{\partial \alpha }}f(x,\alpha )\,dx.}$

This is the formula we set out to prove.

Now, suppose

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

where a and b are functions of ? which take increments ?a and ?b, respectively, when ? is increased by ??. Then,

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

A form of the mean value theorem, ${\textstyle \int _{a}^{b}f(x)\,dx=(b-a)f(\xi ),}$ where a < ? < b, can be applied to the first and last integrals of the formula for ?? above, resulting in

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

Dividing by ??, letting ?? -> 0, noticing ?1 -> a and ?2 -> b and using the above derivation for

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

yields

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

This is the general form of the Leibniz integral rule.

## Examples

### Example 1: Fixed limits

Consider the function

${\displaystyle \varphi (\alpha )=\int _{0}^{1}{\frac {\alpha }{x^{2}+\alpha ^{2}}}\,dx.}$

The function under the integral sign is not continuous at the point (x, ?) = (0, 0), and the function ?(?) has a discontinuity at ? = 0 because ?(?) approaches ±?/2 as ? -> 0±.

If we differentiate ?(?) with respect to ? under the integral sign, we get

${\displaystyle {\frac {d}{d\alpha }}\varphi (\alpha )=\int _{0}^{1}{\frac {\partial }{\partial \alpha }}\left({\frac {\alpha }{x^{2}+\alpha ^{2}}}\right)\,dx=\int _{0}^{1}{\frac {x^{2}-\alpha ^{2}}{(x^{2}+\alpha ^{2})^{2}}}dx=\left.-{\frac {x}{x^{2}+\alpha ^{2}}}\right|_{0}^{1}=-{\frac {1}{1+\alpha ^{2}}},}$

which is, of course, true for all values of ? except ? = 0. This may be integrated (with respect to ?) to find

${\displaystyle \varphi (\alpha )={\begin{cases}0,&\alpha =0,\\-\arctan({\alpha })+{\frac {\pi }{2}},&\alpha \neq 0.\end{cases}}}$

### Example 2: Variable limits

An example with variable limits:

{\displaystyle {\begin{aligned}{\frac {d}{dx}}\int _{\sin x}^{\cos x}\cosh t^{2}\,dt&=\cosh \left(\cos ^{2}x\right){\frac {d}{dx}}(\cos x)-\cosh \left(\sin ^{2}x\right){\frac {d}{dx}}(\sin x)+\int _{\sin x}^{\cos x}{\frac {\partial }{\partial x}}(\cosh t^{2})\,dt\\[6pt]&=\cosh(\cos ^{2}x)(-\sin x)-\cosh(\sin ^{2}x)(\cos x)+0\\[6pt]&=-\cosh(\cos ^{2}x)\sin x-\cosh(\sin ^{2}x)\cos x.\end{aligned}}}

## Applications

### Evaluating definite integrals

The formula

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

can be of use when evaluating certain definite integrals. When used in this context, the Leibniz integral rule for differentiating under the integral sign is also known as Feynman's trick for integration.

#### Example 4

${\displaystyle \mathbf {I} =\int _{0}^{\pi /2}{\frac {1}{(a\cos ^{2}x+b\sin ^{2}x)^{2}}}\,dx,\qquad a,b>0.}$

First we calculate:

{\displaystyle {\begin{aligned}\mathbf {J} &=\int _{0}^{\pi /2}{\frac {1}{a\cos ^{2}x+b\sin ^{2}x}}dx\\[6pt]&=\int _{0}^{\pi /2}{\frac {\frac {1}{\cos ^{2}x}}{a+b{\frac {\sin ^{2}x}{\cos ^{2}x}}}}dx\\[6pt]&=\int _{0}^{\pi /2}{\frac {\sec ^{2}x}{a+b\tan ^{2}x}}dx\\[6pt]&={\frac {1}{b}}\int _{0}^{\pi /2}{\frac {1}{\left({\sqrt {\frac {a}{b}}}\right)^{2}+\tan ^{2}x}}\,d(\tan x)\\[6pt]&={\frac {1}{\sqrt {ab}}}\arctan \left({\sqrt {\frac {b}{a}}}\tan x\right){\Bigg |}_{0}^{\pi /2}\\[6pt]&={\frac {\pi }{2{\sqrt {ab}}}}.\end{aligned}}}

The limits of integration being independent of ${\displaystyle a}$, we have:

${\displaystyle {\frac {\partial \mathbf {J} }{\partial a}}=-\int _{0}^{\pi /2}{\frac {\cos ^{2}x}{\left(a\cos ^{2}x+b\sin ^{2}x\right)^{2}}}\,dx}$

On the other hand:

${\displaystyle {\frac {\partial \mathbf {J} }{\partial a}}={\frac {\partial }{\partial a}}\left({\frac {\pi }{2{\sqrt {ab}}}}\right)=-{\frac {\pi }{4{\sqrt {a^{3}b}}}}.}$

Equating these two relations then yields

${\displaystyle \int _{0}^{\pi /2}{\frac {\cos ^{2}x}{\left(a\cos ^{2}x+b\sin ^{2}x\right)^{2}}}\,dx={\frac {\pi }{4{\sqrt {a^{3}b}}}}.}$

In a similar fashion, pursuing ${\displaystyle {\frac {\partial \mathbf {J} }{\partial b}}}$ yields

${\displaystyle \int _{0}^{\pi /2}{\frac {\sin ^{2}x}{\left(a\cos ^{2}x+b\sin ^{2}x\right)^{2}}}\,dx={\frac {\pi }{4{\sqrt {ab^{3}}}}}.}$

Adding the two results then produces

${\displaystyle \mathbf {I} =\int _{0}^{\pi /2}{\frac {1}{\left(a\cos ^{2}x+b\sin ^{2}x\right)^{2}}}\,dx={\frac {\pi }{4{\sqrt {ab}}}}\left({\frac {1}{a}}+{\frac {1}{b}}\right),}$

which computes ${\displaystyle \mathbf {I} }$ as desired.

This derivation may be generalized. Note that if we define

${\displaystyle \mathbf {I} _{n}=\int _{0}^{\pi /2}{\frac {1}{\left(a\cos ^{2}x+b\sin ^{2}x\right)^{n}}}\,dx,}$

it can easily be shown that

${\displaystyle (1-n)\mathbf {I} _{n}={\frac {\partial \mathbf {I} _{n-1}}{\partial a}}+{\frac {\partial \mathbf {I} _{n-1}}{\partial b}}}$

Given ${\displaystyle \mathbf {I} _{1}}$, this integral reduction formula can be used to compute all of the values of ${\displaystyle \mathbf {I} _{n}}$ for ${\displaystyle n>1}$. Integrals like ${\displaystyle \mathbf {I} }$ and ${\displaystyle \mathbf {J} }$ may also be handled using the Weierstrass substitution.

#### Example 5

Here, we consider the integral

${\displaystyle \mathbf {I} (\alpha )=\int _{0}^{\pi /2}{\frac {\ln(1+\cos \alpha \cos x)}{\cos x}}\,dx,\qquad 0<\alpha <\pi .}$

Differentiating under the integral with respect to ${\displaystyle \alpha }$, we have

{\displaystyle {\begin{aligned}{\frac {d}{d\alpha }}\mathbf {I} (\alpha )&=\int _{0}^{\pi /2}{\frac {\partial }{\partial \alpha }}\left({\frac {\ln(1+\cos \alpha \cos x)}{\cos x}}\right)\,dx\\[6pt]&=-\int _{0}^{\pi /2}{\frac {\sin \alpha }{1+\cos \alpha \cos x}}\,dx\\&=-\int _{0}^{\pi /2}{\frac {\sin \alpha }{\left(\cos ^{2}{\frac {x}{2}}+\sin ^{2}{\frac {x}{2}}\right)+\cos \alpha \left(\cos ^{2}{\frac {x}{2}}-\sin ^{2}{\frac {x}{2}}\right)}}\,dx\\[6pt]&=-{\frac {\sin \alpha }{1-\cos \alpha }}\int _{0}^{\pi /2}{\frac {1}{\cos ^{2}{\frac {x}{2}}}}{\frac {1}{{\frac {1+\cos \alpha }{1-\cos \alpha }}+\tan ^{2}{\frac {x}{2}}}}\,dx\\[6pt]&=-{\frac {2\sin \alpha }{1-\cos \alpha }}\int _{0}^{\pi /2}{\frac {{\frac {1}{2}}\sec ^{2}{\frac {x}{2}}}{{\frac {2\cos ^{2}{\frac {\alpha }{2}}}{2\sin ^{2}{\frac {\alpha }{2}}}}+\tan ^{2}{\frac {x}{2}}}}\,dx\\[6pt]&=-{\frac {2\left(2\sin {\frac {\alpha }{2}}\cos {\frac {\alpha }{2}}\right)}{2\sin ^{2}{\frac {\alpha }{2}}}}\int _{0}^{\pi /2}{\frac {1}{\cot ^{2}{\frac {\alpha }{2}}+\tan ^{2}{\frac {x}{2}}}}\,d\left(\tan {\frac {x}{2}}\right)\\[6pt]&=-2\cot {\frac {\alpha }{2}}\int _{0}^{\pi /2}{\frac {1}{\cot ^{2}{\frac {\alpha }{2}}+\tan ^{2}{\frac {x}{2}}}}\,d\left(\tan {\frac {x}{2}}\right)\\[6pt]&=-2\arctan \left(\tan {\frac {\alpha }{2}}\tan {\frac {x}{2}}\right){\bigg |}_{0}^{\pi /2}\\[6pt]&=-\alpha .\end{aligned}}}

Therefore:

${\displaystyle \mathbf {I} (\alpha )=C-{\frac {\alpha ^{2}}{2}}.}$

But ${\textstyle \mathbf {I} \left({\frac {\pi }{2}}\right)=0}$ by definition so ${\textstyle C={\frac {\pi ^{2}}{8}}}$ and

${\displaystyle \mathbf {I} (\alpha )={\frac {\pi ^{2}}{8}}-{\frac {\alpha ^{2}}{2}}.}$

#### Example 6

Here, we consider the integral

${\displaystyle \int _{0}^{2\pi }e^{\cos \theta }\cos(\sin \theta )\,d\theta .}$

We introduce a new variable ? and rewrite the integral as

${\displaystyle f(\varphi )=\int _{0}^{2\pi }e^{\varphi \cos \theta }\cos(\varphi \sin \theta )\,d\theta .}$

When ? = 1 this equals the original integral. However, this more general integral may be differentiated with respect to ${\displaystyle \varphi }$:

{\displaystyle {\begin{aligned}{\frac {df}{d\varphi }}&=\int _{0}^{2\pi }{\frac {\partial }{\partial \varphi }}\left(e^{\varphi \cos \theta }\cos(\varphi \sin \theta )\right)\,d\theta \\[6pt]&=\int _{0}^{2\pi }e^{\varphi \cos \theta }\left(\cos \theta \cos(\varphi \sin \theta )-\sin \theta \sin(\varphi \sin \theta )\right)\,d\theta .\end{aligned}}}

Now, fix ?, and consider the vector field on ${\displaystyle \mathbf {R} ^{2}}$ defined by ${\displaystyle \mathbf {F} (x,y)=(F_{1}(x,y),F_{2}(x,y)):=(e^{\varphi x}\sin(\varphi y),e^{\varphi x}\cos(\varphi y))}$. Further, choose the positive oriented parametrization of the unit circle ${\displaystyle S^{1}}$ given by ${\displaystyle \mathbf {r} \colon [0,2\pi )\to \mathbf {R} ^{2}}$, ${\displaystyle \mathbf {r} (\theta ):=(\cos \theta ,\sin \theta )}$, so that ${\displaystyle \mathbf {r} '(t)=(-\sin \theta ,\cos \theta )}$. Then the final integral above is precisely

{\displaystyle {\begin{aligned}&\int _{0}^{2\pi }e^{\varphi \cos \theta }\left(\cos \theta \cos(\varphi \sin \theta )-\sin \theta \sin(\varphi \sin \theta )\right)\,d\theta \\[6pt]={}&\int _{0}^{2\pi }(e^{\varphi \cos \theta }\sin(\varphi \sin \theta ),e^{\varphi \cos \theta }\cos(\varphi \sin \theta ))\cdot (-\sin \theta ,\cos \theta )\,d\theta \\[6pt]={}&\int _{0}^{2\pi }\mathbf {F} (\mathbf {r} (\theta ))\cdot \mathbf {r} '(\theta )\,d\theta \\[6pt]={}&\oint \limits _{S^{1}}\mathbf {F} (\mathbf {r} )\cdot d\mathbf {r} =\oint \limits _{S^{1}}F_{1}\,dx+F_{2}\,dy,\end{aligned}}}
the line integral of ${\displaystyle \mathbf {F} }$ over ${\displaystyle S^{1}}$. By Green's Theorem, this equals the double integral
${\displaystyle \iint _{D}{\frac {\partial F_{2}}{\partial x}}-{\frac {\partial F_{1}}{\partial y}}\,dA,}$

where ${\displaystyle D}$ is the closed unit disc. Its integrand is identically 0, so ${\displaystyle df/d\varphi }$ is likewise identically zero. This implies that f(?) is constant. The constant may be determined by evaluating ${\displaystyle f}$ at ${\displaystyle \varphi =0}$:

${\displaystyle f(0)=\int _{0}^{2\pi }1\,d\theta =2\pi .}$

Therefore, the original integral also equals ${\displaystyle 2\pi }$.

#### Other problems to solve

There are innumerable other integrals that can be solved using the technique of differentiation under the integral sign. For example, in each of the following cases, the original integral may be replaced by a similar integral having a new parameter ${\displaystyle \alpha }$:

{\displaystyle {\begin{aligned}\int _{0}^{\infty }{\frac {\sin x}{x}}\,dx&\to \int _{0}^{\infty }e^{-\alpha x}{\frac {\sin x}{x}}dx,\\[6pt]\int _{0}^{\pi /2}{\frac {x}{\tan x}}\,dx&\to \int _{0}^{\pi /2}{\frac {\tan ^{-1}(\alpha \tan x)}{\tan x}}dx,\\[6pt]\int _{0}^{\infty }{\frac {\ln(1+x^{2})}{1+x^{2}}}\,dx&\to \int _{0}^{\infty }{\frac {\ln(1+\alpha ^{2}x^{2})}{1+x^{2}}}dx\\[6pt]\int _{0}^{1}{\frac {x-1}{\ln x}}\,dx&\to \int _{0}^{1}{\frac {x^{\alpha }-1}{\ln x}}dx.\end{aligned}}}

The first integral, the Dirichlet integral, is absolutely convergent for positive ? but only conditionally convergent when ${\displaystyle \alpha =0}$. Therefore, differentiation under the integral sign is easy to justify when ${\displaystyle \alpha >0}$, but proving that the resulting formula remains valid when ${\displaystyle \alpha =0}$ requires some careful work.

### Infinite series

The measure-theoretic version of differentiation under the integral sign also applies to summation (finite or infinite) by interpreting summation as counting measure. An example of an application is the fact that power series are differentiable in their radius of convergence.

## In popular culture

Differentiation under the integral sign is mentioned in the late physicist Richard Feynman's best-selling memoir Surely You're Joking, Mr. Feynman! in the chapter "A Different Box of Tools". He describes learning it, while in high school, from an old text, Advanced Calculus (1926), by Frederick S. Woods (who was a professor of mathematics in the Massachusetts Institute of Technology). The technique was not often taught when Feynman later received his formal education in calculus, but using this technique, Feynman was able to solve otherwise difficult integration problems upon his arrival at graduate school at Princeton University:

## References

1. ^ Protter, Murray H.; Morrey, Charles B., Jr. (1985). "Differentiation under the Integral Sign". Intermediate Calculus (Second ed.). New York: Springer. pp. 421-426. ISBN 978-0-387-96058-6.
2. ^ Flanders, Harly (June-July 1973). "Differentiation under the integral sign" (PDF). American Mathematical Monthly. 80 (6): 615-627. doi:10.2307/2319163. JSTOR 2319163.
3. ^ Spivak, Michael (1994). Calculus (3 ed.). Houston, Texas: Publish or Perish, Inc. pp. 267-268. ISBN 978-0-914098-89-8.
4. ^ Spivak, Michael (1965). Calculus on Manifolds. Addison-Wesley Publishing Company. p. 31. ISBN 978-0-8053-9021-6.