Supposed method of integration: “long dividing” by $d$
I came across this seemingly interesting, but poorly exemplified, method of integrating:
Since integration is the inverse of differentiation, you can think of integration as “dividing” by $d$.
J. P. Ballantine [1] shows that you can formally divide by $d$ and get the correct integral. For example, he arrives at $$\int x^2 \sin x\,dx=(2-x^2)\cos x + 2x\sin x + C$$ using long division!
[1] J. P. Ballantine. Integration by Long Division. The American Mathematical Monthly, Vol. 58, No. 2 (Feb., 1951), pp. 104-105
Surely the claim that this is rigorous is questionable. However, it would be fascinating to understand how to follow this method and maybe even understand why it works; the example has no explanation, and I can’t put the steps together via reverse engineering.
Could someone shed some light on this technique?
addendum: An additional example would really complete the perfect response $\ddot\smile$
Solution 1:
I managed to "reverse engineer" the steps and I am going to go through them for you!
First, write the function you wish to integrate on the left
$$x^2 \sin x\ dx$$
Now find a function such that, when you differentiate it, the $x^2 \sin x$ comes up. Ah! When you differentiate $-x^2 \cos x$ you get $x^2 \sin x - 2x \cos x$, so it has the bit you want and the other bit seems "smaller" in the sense of "degree" or something. Just write that $-x^2 \cos x$ on the side, differentiate it and subtract the derivative, getting:
Now it's like we found an anti-derivative for the function we want to integrate, but in doing so we got the extra term $2x \cos x$ that we need to cancel... Think of something that, when differentiated, arrives at $-2x \cos x$... Ah! When you differentiate $2x \sin x$, you get the $2x \cos x$ and an extra $2 \sin x$. Write the $2x \sin x$ on the right, differentiate it, and subtract from whatever you had, getting:
and you keep going. The point being, you are always trying to come up with something (in some sense, smaller) that counters the leftovers you have from finding the anti-derivatives of the other terms!
Was I clear enough?
Let us integrate $x \log x$ just for the fun of it. Can you come up with something that, when differentiated, gives $x \log x + $ something? Of course you can, just notice that $(\frac12x^2\log x)' = x\log x + \frac12 x$
So we now have to deal with the extra $-\frac12 x$.
Can you come up with something that cancels that $-\frac12 x$? Of course you can, because $-\frac14 x^2$ does it! We now get
$$0$$
meaning we are done and
$$\int x \log x = \frac12 x^2 \log x - \frac14 x^2 + C$$