Leibniz rule general case

Leibniz Rule: Differentiating under the integral (general case)


Evaluating integrals has over time become one of my favourite activities. Whether it is by parts or by substitution or by partial fractions or reduction – there are many cool integrals to be found in the world of applied maths. Two especially cool methods for solving definite integrals are the Leibniz Rule (or what some call Feynman integration) and the Bracket Method. In this post I will focus on the former, particularly its general case.

Admittedly, when I first learned Leibniz’s Rule I was enthralled. It opened up a new world of integrals, which, otherwise, would seem impossible to evaluate. Consider evaluating, for example, such integrals as those listed below using basic methods:

int_{-infty}^{infty}frac{sin(x)}{x} mathrm{d}x



or something like

int_{-infty}^{infty}frac{cos{x}}{x^2 +1}mathrm{d}x

This is where the Leibniz Rule comes into play.

There are two cases of the Leibniz Rule, a general and a special case. The difference can be simplified. In the latter, the limits of integration are constants, where in the former the limits of integration are differentiable functions. In the general case (derivation), the rule states that if

I(x)=int_{u(x)}^{v(x)} f(t,x)mathrm{d}t


I^{prime}(x)=int_{u(x)}^{v(x)}frac{partial f}{partial x}(t,x)mathrm{d}t + f(v(x),x)v'(x) – f(u(x), x)u'(x)

So this is the rule, in its general case, but what to make of it?

One of the best summations of the Leibniz Rule that I have read states how: “for constant limits of integration the order of integration and differentiation are reversible” (Riley, Hobson & Bence, 2016, pp.189-179). In other words, we can use the Leibniz Rule to interchange the integral sign and the differential. Another way to word this is that by using the Leibniz Rule, we’re integrating by way of differentiation under the integral sign.

The key idea to remember is to insert the differential into the integral, which then makes it a partial differential (as seen on line 3 below). From there, you want to work out the partial with the hope that the integral simplifies. Finally, it is primarily a matter of using basic integration techniques and algebra to complete the evaluation.

Here’s an example:


[F^{prime}(x)=frac{d}{dx}int_{sqrt{x}}^{x}frac{sin(tx)}{t}mathrm{d}t ]

[F^{prime}(x)=int_{sqrt{x}}^{x}frac{partial}{partial x}[frac{sin(tx)}{t}]mathrm{d}t + frac{sin(x cdot x)}{x}(1) – frac{sin(sqrt{x} cdot x)}{sqrt{x}}(frac{1)}{2sqrt{x}}) ]

Notice on line 3 that for the part $f(v(x),x)v'(x) – f(u(x), x)u'(x)$, we’re simply replacing t with x, then multiplying by the differential of the limit.

[implies F^{prime}(x)=int_{sqrt{x}}^{x}frac{tcos(tx)}{t}mathrm{d}t + frac{sin(x^2)}{x} – frac{sin(x^{frac{3}{2}})}{2x} ]

Note, we still have to integrate $int_{sqrt{x}}^{x}frac{tcos(tx)}{t}$ with respect to t. For this, use substitution. You then end up with what follows:

[=left[frac{sin(tx)}{x}right]_{t=sqrt{x}}^{t=x} + frac{sin(x^2)}{x} – frac{sin(x^{frac{3}{2}})}{2x} ]

[=left[(frac{sin(x cdot x)}{x})-(frac{sin(sqrt{x} cdot x)}{x})right] + frac{sin(x^2)}{x} – frac{sin(x^{frac{3}{2}})}{2x} ]

[=frac{2sin(x^2)}{x} – frac{3sin(x^{frac{3}{2}})}{2x} ]

Why is Leibniz’s Rule such a powerful and useful tool? In that it allows us to solve otherwise challenging integrals – integrals that we regularly come across that cannot be evaluated in terms of simple functions (of finite sum) – one of the things I like most about this technique is that it is really quite simple for what it does. Once you get the hang of it, and it becomes as basic as integrating by parts or something similar, it is a very useful tool to have in one’s toolbox.

Leibniz was of course one of the fathers of calculus, along with Newton. But this integration technique was made famous by Feynman, who offers a lovely story in Surely, You’re Joking, Mr. Feynman! about how he first came across the method and how he later used it on a regular basis (contributing to his reputation for doing integrals!).


Riley, K.F., Hobson, M.P., & Bence, S.J., (2016), “Mathematical Methods for Physics and Engineering”. Cambridge, UK: Cambridge University Press, pp.189-179