## Integration by parts

I was watching one of Leonard Susskind’s lectures on Satistical Mechanics and he mentioned an interesting way to integrate. He was deriving Stirling’s approximation for $n!$ and had to evaluate

$\int_1^{N} \ln xdx$

You can do it by parts of course letting $u=\ln x$ and $dv=dx$. Susskind observed that since the logarithm doesn’t vary much (not flat, but not much of a hike either) that for large values of $x$ you could treat it as a constant. The resulting integral is easy to do and you end up with $x\ln x$ as your anti derivative. But this isn’t quite correct as when you differentiate you obtain $\ln x -1$. But now its clear that if we had just added an $x$ to our anti derivative it would have come out okay, $x\ln x -1$ works.

Okay, can we try this on something else? What other functions do we know that are slowing changing for larger values of $x$? The inverse tangent function comes to mind. Again you can evaluate the following integral by parts,

$\int \arctan x dx$

but let’s just treat $\arctan x$ as a constant and then integrate. We’d obtain $x\arctan x$ which upon differentiating gives

$\arctan x + \frac{x}{1+x^2}$

which isn’t quite right, but we can see how to correct it by subtracting the term $\frac{1}{2}\ln(1+x^2)$.

How often is this useful? I’m not sure. What’s nice is that it makes use of the behavior of the function and the corrections (at least in these two examples) are easier to figure out than the original integral. In the case where we’re doing very general integration perhaps this could be of help?

NOTE: After a bit more thinking this does boil down to integration by parts. Consider an integral like

$\int f(x) dx$

That you don’t know the antiderivative to but suppose $f(x)$ is relatively slow changing over a large chunk of its domain (I know rigorous isn’t it). Then

$\int f(x) dx\approx f(x)\int dx=xf(x)+C$

To check, differentiate,

$\frac{d}{dx}xf(x)=f(x)+xf'(x)$

So you would need to adjust the initial ‘guess’ to

$xf(x)+\int xf'(x)dx+C$

Which is exactly integration by parts. Though integration by parts works in cases where you don’t need to assume such things about the function.