Leibniz’s rule

Leibniz’s rule is a powerful tool for solving otherwise impossible integrals. Here is one of these:

\displaystyle \int^{\infty}_{-\infty}\frac{\sin(x)}{x}\,dx

Substitution, by parts, partial fractions, try it for yourself, all of these methods will fail to give you an antiderivative. We even had to introduce a special function, named Si(x), just to give it an antiderivative. But our method focuses on solving definite integrals, rather than antiderivatives. “Differentiation under the integral sign”, as we call it, is a direct consequence of Leibniz’s rule, which states

\displaystyle \frac{d}{dt} \left(\int_a^{b}f(x,t)\,dx\right)=\int_a^{b}\frac{\partial}{\partial t} f(x,t)\,dx

The variable t only serves as a parameter, which hopefully helps us integrate when we take its partial derivative. But this rule basically states that–under certain lenient conditions– one may interchange the derivative operator and the integral. But how does that help us with anything?, you ask. Well here is an example: say you want to calculate this definite integral

\displaystyle \int^{1}_{0} \frac{x^2 - 1}{\ln(x)}\,dx

Here again, the usual methods will fail us. And we can’t apply our new rule if we don’t have a parameter t. So let’s introduce a new parameter that, when differentiated, will make it simpler to integrate. Ideally, we would want to get rid of that \ln(x) in the denominator. What if we set t=2 in the exponent of our integrand? Than our whole expression would be a function of t, let’s call it I(t), that we would later evaluate at 2:

\displaystyle I(t)=\int^{1}_{0} \frac{x^t - 1}{\ln(x)}\,dx

Differentiating with respect to t:

\displaystyle I'(t)=\frac{d}{dt}\int^{0}_{1} \frac{x^t - 1}{\ln(x)}\,dx

\displaystyle=\int^{1}_{0} \frac{\partial}{\partial t}\left(\frac{x^t - 1}{\ln(x)}\right)\,dx

\displaystyle=\int^{1}_{0}\frac{x^t \ln(x)}{\ln(x)}\,dx

\displaystyle=\int^{1}_{0} x^t\,dx

Well this is easier to integrate! The most difficult part is finding the right parameter, and, admittedly, there sometimes won’t be any. But a lot of times, it works nicely just like in our example. We can continue, treating t as a constant in our integration:

\displaystyle I'(t)=\int^{1}_{0} x^t\,dx

\displaystyle=\frac{x^{t+1}}{t+1} \Big|^1_0

\displaystyle= \frac{1}{t+1}

Now, remember, this is the derivative of I(t), not I(t). But that’s not what we want. So to get our original expression, we need to integrate our result with respect to t:

\displaystyle I'(t)=\frac{1}{t+1}

\displaystyle I(t)=\int \frac{1}{t+1}\,dt

\displaystyle I(t)=\ln|t+1|+C

But what is C? Well let’s see if we can find an “initial” condition from our original integrand.

\displaystyle I(t)=\int^{1}_{0} \frac{x^t - 1}{\ln(x)}\,dx

What happens if we set t=0? Then the whole integral equals zero, so I(0)=0:

\displaystyle I(0)=\int^{1}_{0} \frac{x^0 - 1}{\ln(x)}\,dx

\displaystyle I(0)=\int^{1}_{0} \frac{0}{\ln(x)}\,dx

\displaystyle I(0)=\int^{1}_{0} 0 dx

\displaystyle I(0)=0

Knowing these conditions, let’s see what our constant is:

\displaystyle I(0)=\ln|0+1|+C

\displaystyle 0=\ln|1|+C

\displaystyle 0=0+C

\displaystyle C=0

Okay, so we don’t have to worry about the constant since it equals zero. So anyways, we want to evaluate our new expression for I(t) at t=2, because that’s what we substituted t for in the original integrand. We then get:

\displaystyle I(2)=\ln|2+1|

\displaystyle I(2)=\ln|3|

\displaystyle \int^{1}_{0} \frac{x^2 - 1}{\ln(x)}\,dx=\ln(3)

And there is our exact result! Interestingly, we had to solve a more general problem, to then apply it specifically to our problem. What we did allows us to generalize:

\displaystyle \int^{1}_{0} \frac{x^t - 1}{\ln(x)}\,dx=\ln|t+1|

This technique of integration not only allows us to solve some otherwise resisting integrals, but also to generalize to other parameters! Sometimes, we need to actually add a parameter inside the integrand to be able to evaluate it. This technique was actually popularized by Richard Feynman himself, and this is what he said (well wrote) about it in his book Surely, You’re Joking, Mr. Feynman! :

“I had learned to do integrals by various methods shown in a book that my high school physics teacher Mr. Bader had given me. [It] showed how to differentiate parameters under the integral sign – it’s a certain operation. It turns out that’s not taught very much in the universities; they don’t emphasize it. But I caught on how to use that method, and I used that one damn tool again and again. [If] guys at MIT or Princeton had trouble doing a certain integral, [then] I come along and try differentiating under the integral sign, and often it worked. So I got a great reputation for doing integrals, only because my box of tools was different from everybody else’s, and they had tried all their tools on it before giving the problem to me.”

Leave a comment