# Differentiation Under the Integral Sign

**Differentiation under the integral sign** is an operation in calculus used to evaluate certain integrals. Under fairly loose conditions on the function being integrated, differentiation under the integral sign allows one to interchange the order of integration and differentiation. In its simplest form, called the **Leibniz integral rule**, differentiation under the integral sign makes the following equation valid under light assumptions on \(f\): \[\frac{d}{dx} \int_{a}^{b} f(x,t) \,dt = \int_{a}^{b} \frac{\partial}{\partial x} f(x,t) \, dt .\]

#### Contents

## General Form

The most general form of differentiation under the integral sign states that: if \(f(x,t)\) is a *continuous* and *continuously differentiable* (i.e., partial derivatives exist and are themselves continuous) function and the limits of integration \(a(x)\) and \(b(x)\) are *continuous* and *continuously differentiable* functions of \(x\), then \[\frac{d}{dx} \int_{a(x)}^{b(x)} f(x,t) \, dt =f(x,b(x)) \cdot b'(x) - f(x,a(x))\cdot a'(x) + \int_{a(x)}^{b(x)} \frac{\partial}{\partial x} f(x,t) \, dt.\]

In the case where \(a(x)\) and \(b(x)\) are constant functions, this formula reduces to the simpler form \[\frac{d}{dx} \int_{a}^{b} f(x,t) \,dt = \int_{a}^{b} \frac{\partial}{\partial x} f(x,t) \, dt .\] This simpler statement is known as **Leibniz integral rule**.

## Examples

Generally, one uses differentiation under the integral sign to evaluate integrals that can be thought of as belonging to some family of integrals parameterized by a real variable. To better understand this statement, consider the following example:

Compute the definite integral \[\int_{0}^{1} \frac{t^{3} - 1}{\ln t} \, dt.\]

This integral appears resistant to standard integration techniques such as integration by parts, u-substitution, etc. We would like to use differentiation under the integral sign to compute it.

How can we choose a function to differentiate under the integral sign? The appearance of \(\ln t\) in the denominator of the integrand is quite unwelcome, and we would like to get rid of it. Thankfully, we know \[\frac{d}{dx} t^x = t^x \ln t,\] so differentiating the numerator with respect to the exponent seems to be what we'd like to do.

Accordingly, we define a function \[g(x) = \int_{0}^{1} \frac{t^x - 1}{\ln t} \, dt .\] In this notation, the integral we wish to evaluate is \(g(3)\). Observe that the given integral has been recast as member of a family of definite integrals \(g(x)\) indexed by the variable \(x\).

By Leibniz integral rule, we compute \[g'(x) = \int_{0}^{1} \frac{\partial}{\partial x} \frac{t^x - 1}{\ln t} \, dt = \int_{0}^{1} \frac{t^x \ln t}{\ln t} \, dt = \frac{t^{x+1}}{x+1} \Bigg\vert_{0}^{1} = \frac{1}{x+1}.\] It follows that \(g(x) = \ln|x+1| + C\) for some constant \(C\).

To determine \(C\), note that \(g(0) = 0\), so \(0 = g(0) = \ln 1 + C = C\). Hence, \(g(x) = \ln|x+1|\) for all \(x\) such that the integral exists. In particular, \(g(3) = \ln 4 = 2\ln 2\). \(_\square\)

In the example, part of the integrand was replaced with a variable and the resultant function was studied using differentiation under the integral sign. This is a good illustration of the problem-solving principle: if stuck on a specific problem, try solving a more general problem.

Another example illustrates the power of this technique in its general form, as one may use it to compute the Gaussian integral.

Compute the definite integral \[\int_{0}^{\infty} e^{-x^2/2} \, dx.\]

Define a function \[g(t) = \left(\int_{0}^{t} e^{-x^2/2} \, dx \right)^2.\] Our goal is to compute \(g(\infty)\) and then take its square root.

Differentiating with respect to \(t\) gives \[g'(t) = 2 \cdot \left(\int_{0}^{t} e^{-x^2/2} \, dx \right) \cdot \left(\frac{d}{dt} \int_{0}^{t} e^{-x^2/2} \, dx \right) = 2e^{-t^2 / 2} \int_{0}^{t} e^{-x^2 / 2} \, dx = 2\int_{0}^{t} e^{-(t^2 + x^2)/2} \, dx.\]

Make the change of variables \(u = x/t\), so that the integral transforms to \[g'(t) = 2 \int_{0}^{1}te^{-(1+u^2)t^2/2}\, du. \] Now, the integrand has a closed-form antiderivative with respect to \(t\): \[g'(t) = -2\int_{0}^{1} \frac{\partial }{\partial t} \frac{e^{-(1+u^2)t^2/2}}{1+u^2} \, du = -2 \frac{d}{dt} \int_{0}^{1} \frac{e^{-(1+u^2)t^2/2}}{1+u^2} \, du.\]

Set \[h(t) = \int_{0}^{1} \frac{e^{-(1+x^2)t^2/2}}{1+x^2} \, dx. \] Then by the above calculation, \(g'(t) = -2h'(t)\), so \(g(t) = -2h(t) + C\). To determine \(C\), take \(t\to 0\) in the equation; since \(g(0) = 0\) and \[h(0) = \int_{0}^{1} \frac{1}{1+x^2} \, dx = \tan^{-1} x\Bigg\vert_{0}^{1} = \frac{\pi}{4},\] it follows that \(0 = -\pi/2 + C \implies C = \pi/2\).

Finally, taking \(t\to\infty\), we conclude \(g(\infty) = -2h(\infty) + \pi/2 = \pi/2\). Thus, \[\int_{0}^{\infty} e^{-x^2/2} \, dx = \sqrt{\frac{\pi}{2} }. \ _\square\]

One should also note *counterexamples*, for which this technique does not work. For instance, suppose one attempts to evaluate \[\int_{0}^{\infty} \frac{\sin x}{x} \, dx\] by making the variable change \(u = x/t\) for some \(t\neq 0\). Then, \[\int_{0}^{\infty} \frac{\sin x}{x} \, dx = \int_{0}^{\infty} \frac{\sin tu}{u} \, du = g(t).\] Differentiating under the integral sign yields \[0 = g'(t) = \int_{0}^{\infty} \cos tu \, du,\] which is absurd. The problem is that the function \(f(x,t) = \sin tx/x\) is not continuously differentiable (consider \(\partial f/\partial t\) when \(x=0\)), which was required in the assumptions set forth above.

**Cite as:**Differentiation Under the Integral Sign.

*Brilliant.org*. Retrieved from https://brilliant.org/wiki/differentiate-through-the-integral/