I came up with this roughly 20 years ago and I didn’t see it listed in any Calculus textbook appendix and nobody that I asked had seen it before, so maybe it really is new. I’ll amend that last clause to “so it’s new to me” if someone can cite an earlier source.
The New Integrals
If P(x) is a polynomial of degree n with non-negative integral exponents, then
1. P(x)sin x dx = -P(x)cos x + P'(x)sin x + P”(x)cos x – P”'(x)sin x – P””(x)cos x + . . . + C
2. P(x)cos x dx = P(x)sin x + P'(x)cos x – P”(x)sin x – P”'(x)cos x + P””(x)sin x + . . . + C
The algorithm that produces these terms in both integrals is
1. The first term of the function resulting from taking the integral of the given function is the product of the given polynomial and the integral of the given trigonometric function.
2. Each successive term is the product of the derivative of the polynomial factor in the previous term and the derivative of the trigonometric function in the previous term.
The final step taken in each of the following three examples is a simplification and not an essential part of the integration.
1. y = ()sin x dx = –()cos x + ()sin x + (6x + 4)cos x – 6sin x + C = (3 + 4x – 6)sin x – ()cos x + C
Check: y’ = (3 + 4x – 6)cos x + (6x + 4)sin x + ()sin x – (3 + 4x – 6)cos x = ()sin x
2. y = cos x dx = sin x + cos x – sin x – cos x + sin x + (720x – 240)cos x – 720sin x + C = sin x + cos x + C
Check: y’ = cos x + sin x – sin x + cos x = cos x
3. y = = – + + – – + + – – + + + C = – + C
Check: y’ = + + – =
Derivation of the Integrals
I started with several examples of the form M(x)sin x and M(x)cos x, where M(x) is a monomial, such as , and asked myself, “What expression has a derivative equal to ?” From the product rule, we know that the derivative of is + , so to we must add an expression whose derivative is in order to get rid of the extraneous . Again, from the product rule, we know that the derivative of is + , so to + , we must add an expression whose derivative is to get rid of the extraneous . That expression is , whose derivative is + [the extraneous] , which we can get rid of by adding to + + the expression , whose derivative is + [the extraneous] , which we can eliminate by adding to + + + the expression , whose derivative is + [the extraneous] , which we can eliminate by adding to what we have so far the expression , whose derivative is , exactly what we needed. Therefore, = + + – – + + C.
This can be confirmed by taking the derivative of our final result, which I leave as an exercise for the reader. If you do enough of these, the pattern of the final result becomes obvious, and you’ll notice that if my algorithm is used, you get exactly the same result.
When I decided to write about this, I couldn’t find my notes from 20 years ago and all I could remember was that used the product rule. My first attempt to recreate the etiology of the integrals resulted in the following:
Since [ ] = +
[ ] dx = dx + dx
+ = sin x dx + dx
sin x dx = + – dx
and we just have to find dx , the integral of an expression of lower degree. Clearly, if we use the product rule again and do the same thing with dx as we did with sin x dx , we will get an expression involving non-integrals and an integral of an expression of even lower degree. If we do this a sufficient number of times, we will eventually get a standard integral that we can find without using the product rule, and all that will be left to do is to paste all those non-integral terms together by substitution, thereby producing exactly the same result as we got before.
I next realized that doing this is equivalent to a repeated application of integration by parts, u dv = uv – v du , where in the first application, u = and dv = sin x dx (and in the second application, u = and dv = – cos x dx , etc.).
The benefit of using these two new integrals, however, is that it saves all the work of assigning expressions to u and dv however many times you would need to apply integration by parts and all the writing of the intermediate results that you get. Try the repeated integration by parts method to find and compare the amount of work you have to do with the work shown in Example 3 above. This is pretty much the same reason for using any formula; why bother to reinvent the wheel over and over, when you can make a mold that you can use to mass-produce wheels?