# Tabular Integration

Let's say you have an integral like $\displaystyle \int x^{3} \cos x \text{ d}x$. We could use integration by parts to solve it.

First let $u = x^{3}; \dfrac{du}{dx} = 3x^2; dv=\cos x \text{ d}x ; v = \sin x$.
Then, using the formula for integration by parts, we get $x^{3} \sin x - \displaystyle \int 3x^{2} \sin x \text{ d}x .$

But that integral is still nasty to deal with, so we have to do integration by parts again.

Let $u = 3x^{2}; \dfrac{du}{dx} = 6x; dv = \sin x \text{ d}x; v = -\cos x$.
Then, using integration by parts, we get $x^{3} \sin x - \left( -3x^{2} \cos x - \displaystyle \int -6x \cos x \text{ d}x \right) .$

But again, that integral is still not something easy to be dealt with. So we have to do integration by parts again.

Let $u= 6x; \dfrac{du}{dx} = 6; dv=\cos x \text{ d}x; v = \sin x$.
Using integration by parts, we get $x^{3} \sin x - \left( -3x^{2} \cos x - \left( 6x \sin x - \displaystyle \int 6 \sin x \text{ d}x \right) \right).$

Finally we have an integral we can deal with, the answer of which comes out to be $x^3 \sin x + 3x^2 \cos x - 6x \sin x + 6 \cos x + C,$ where $C$ is the constant of integration.

Think back to elementary school. There's addition, then there's multiplication. In this case, there's integration by parts, then there's tabular integration. Sometimes it's okay to use integration by parts; other times, when multiple iterations of integration by parts are required, then you use **tabular integration**. For example, if the example problem had $x^{10}$ instead of $x^{3}$, would you really want to integrate by parts 10 times? Of course not.

**Tabular integration** goes like this. Say you are integrating and you have $u =f(x)$ and $dv = g(x) dx$.

Then by integration by parts, we can write $\displaystyle f(x) \int g(x) - \int \left( f'(x) \int g(x) \right).$ (I'm leaving out the $dx$ for simplicity purposes.)

Say we want to simplify the integral in that expression by parts. Then we can write $\displaystyle f(x) \int g(x) - \left(\displaystyle f'(x) \int \int g(x) - \int \left[ f''(x) \int \int g(x) \right]\right).$

See a pattern?

If we want to write more iterations, why don't we make a table:

a | b | |

1 | $f(x)$ | $g(x)$ |

2 | $f'(x)$ | $\int g(x)$ |

3 | $f''(x)$ | $\int \int g(x)$ |

4 | $f'''(x)$ | $\int \int \int g(x)$ |

Notice how we multiply A1 by B2, multiply A2 by B3, A3 by B4, etc. and the signs alternate (A1B2 - A2B3 + A3B4 - etc.). This is the essence of tabular integration.

For the problem we had before, we could have written:

a | b | |

1 | $x^{3}$ | $\cos x$ |

2 | $3x^{2}$ | $\sin x$ |

3 | $6x$ | $-\cos x$ |

4 | $6$ | $- \sin x$ |

5 | $0$ | $\cos x$ |

So, using tabular integration, we can straight off write:

$x^{3} \sin x - 3x^{2} \cos x - 6x \sin x + 6 \cos x + C.$

Then consider the following question: When do we know when we've made enough "iterations" of our table?

Evaluate $\displaystyle \int x^{3} 3^{-x} \, dx$.

Solution:

a b 1 $x^3$ $3^{-x}$ 2 $3x^2$ $-3^{-x}\ln(3)$ 3 $6x$ $3^{-x} \ln^2(3)$ 4 $6$ $-3^{-x} \ln^3(3)$ 5 $0$ $3^{-x} \ln^4(3)$ So, using tabular integration, we can write:

$-x^3 \cdot 3^{-x}\ln(3) + 3x^2 \cdot 3^{-x} \ln^2(3) - 6x \cdot 3^{-x} \ln^3(3) + 6 \cdot 3^{-x} \ln^4(3) + C$

$\int_0^{\pi/2} x^{10} \cos x \, dx$

If the value of the integral above can be represented in the incredibly long form of

$-a + b \pi^{2} - c \pi^{4} + \dfrac{d}{e} \pi^{6} - \dfrac{f}{g} \pi^{8} + \dfrac{\pi^{10}}{h} ,$

where $a,b,c,d,e,f,g,h$ are positive integers with $\gcd(d,e) = \gcd(f,g) = 1$, find $a+b+c+d+e+f+g+h$.

If you evaluate $\displaystyle \int_{0}^{\pi/2} x^{2016} \sin x \, dx$, you'll get a sum of different powers of $\pi$'s multiplied by different coefficients.

What is the highest exponent of $\pi$ you will encounter in the evaluation of the integral, assuming the evaluation you get is in exact form, and that you leave everything expanded with no factoring of any kind done? Enter this exponent as your answer.

**Bonus question**: How could this be generalized? What happens if you do this with cosine? Why does this work?

**In progress**

**Cite as:**Tabular Integration.

*Brilliant.org*. Retrieved from https://brilliant.org/wiki/tabular-integration/