12
Dec 21

## Leibniz integral rule

This rule is about differentiating an integral that has a parameter in three places: the lower and upper limits of integration and in the integrand.

Let $l(z),u(z)$ be the lower and upper limits of integration and

$\Phi \left( z\right) =\int_{l\left( z\right) }^{u\left( z\right) }f\left(z,t\right) dt.$

Then

$\Phi ^{\prime }\left( z\right) =f\left( z,u\left( z\right) \right)u^{\prime }\left( z\right) -f\left( z,l\left( z\right) \right) l^{\prime}\left( z\right) +\int_{l\left( z\right) }^{u\left( z\right) }\frac{\partial f\left( z,t\right) }{\partial z}dt.$

## Special cases

In fact, these special cases allow one to see how the Leibniz rule is obtained.

### Case 1

$l(z)=a,\ u\left( z\right) =z,\ f$ depends only on $t.$ Then

$\frac{d}{dz}\int_{a}^{z}f\left( t\right) dt=f\left( z\right)$

(the upper limit goes into the argument of $f$).

Chart 1. Slope of tangent (violet) is limit of slopes of secants (green). Source http://faculty.wlc.edu/buelow/CALC/nt2-6.html

Intuition. By definition, $f^{\prime }\left( z\right)$ is the limit of $\frac{f\left( z+h\right) -f\left( z\right) }{h}$ when $h\rightarrow 0.$ (From Chart 1, in which $a=z$, it is seen that this ratio is almost a slope at point $z$.) Hence,

$\frac{d}{dz}\int_{a}^{z}f\left( t\right) dt$

is the limit of

$\left[ \int_{a}^{z+h}f\left( t\right) dt-\int_{a}^{z}f\left( t\right) dt\right] /h=\int_{z}^{z+h}f\left( t\right) dt/h$ $\approx f\left( z\right)\int_{z}^{z+h}dt/h=f\left( z\right) \left[ z+h-z\right] /h=f\left( z\right) .$

When $h\rightarrow 0,$ this approximation becomes better and better and in the limit

$\frac{d}{dz}\int_{a}^{z}f\left( t\right) dt=f\left( z\right) .$

### Case 2

$l(z)=z,$ $u\left( z\right) =b,$ $f$ depends only on $t.$

Then

$\frac{d}{dz}\int_{z}^{b}f\left( t\right) dt=-f\left( z\right)$

(the sign is opposite to Case 1).

Intuition. One of the properties of integral is that $\int_{z}^{b}f\left( t\right) dt=-\int_{b}^{z}f\left( t\right) dt.$

To the last integral we can apply the intuition for Case 1.

### Case 3

$l\left( z\right) =a,\ u\left( z\right) =b,\ f$ depends on $(z,t)$.

Then

$\frac{d}{dz}\int_{a}^{b}f\left( z,t\right) dt=\int_{a}^{b}\frac{\partial f\left( z,t\right) }{\partial z}dt$

(only the integrand is differentiated).

Intuition.

$\left[ \int_{a}^{b}f\left( z+h,t\right) dt-\int_{a}^{b}f\left( z,t\right) dt\right] /h=\int_{a}^{b}\frac{f\left( z+h,t\right) -f\left( z,t\right) }{h}dt$

which leads to differentiation under the integral sign.

### Putting it all together

In the general case we can denote

$\Psi \left( a,b,z\right)=\int_{a}^{b}f\left( z,t\right) dt$

so that

$\Phi \left( z\right)=\int_{l\left( z\right) }^{u\left( z\right) }f\left( z,t\right) dt=\Psi\left( l\left( z\right) ,u\left( z\right) ,z\right) .$

By the chain rule

$\Phi ^{\prime }\left( z\right) =\frac{\partial \Psi \left( l\left( z\right),u\left( z\right) ,z\right) }{\partial a}l^{\prime }\left( z\right) +\frac{\partial \Psi \left( l\left( z\right) ,u\left( z\right) ,z\right) }{\partial b}u^{\prime }\left( z\right) +\frac{\partial \Psi \left( l\left( z\right),u\left( z\right) ,z\right) }{\partial z}$

giving us the general Leibniz rule.

Note that Case 1 implies

$f_{X}\left( x\right) =\frac{d}{dx}\int_{-\infty}^{x}f(t)dt=F_{X}^{\prime }\left( x\right)$

(the density is found from the distribution function).