Integration by parts
There will often be integrals where substitution cannot simplify the integrand into one term. We can use the following as our motivating example
\int x e^{6x} dx
Attempting to use a substitution, such as u = 6x gives us
\int ue^u\,du
which while technically simpler gets us nowhere. We need a new technique to be able to properly separate functions where substitution fails. This is where integration by parts comes in.
It is well known that the derivative of a product f(x)g(x) is
\frac{d}{dx} f(x)g(x) = f(x)\frac{d}{dx}g(x) + g(x)\frac{d}{dx} f(x)
Integrating both sides
f(x)g(x) = \int f(x) g^\prime(x) dx + \int g(x) f^\prime(x) dx
Rearrange
\int f(x) g^\prime(x) dx = f(x)g(x) - \int g(x) f^\prime(x) dx
This gives us a formula to rewrite certain integrals into forms we know how to solve. This formula can be simplified however, with the substitution u = f(x), v = g(x)
\int u dv = uv - \int v du
Note that when deriving v from dv, we do not include a constant, as it will cancel itself out by the end of the final
Lets try to use the formula to solve our example. We can choose u to be either term in our example.
\begin{array}{ll} u = x \hspace{0.5in} & dv = e^{6x}\,dx\\ du = dx \hspace{0.5in} & v = \int e^{6x} = \frac{1}{6}e^{6x} \end{array} \begin{array}{ll} \displaystyle\int x e^{6x} dx & = \displaystyle\frac{x}{6}e^{6x} - \displaystyle\frac{1}{6}\displaystyle\int e^{6x} dx\\ &\\ & = \displaystyle\frac{x}{6}e^{6x} - \displaystyle\frac{1}{36}e^{6x} + C \end{array}And voila, our integral is solved.
Tabular method
An easier (faster) way to do integration by parts is known as the Tabular method. The tabular method can quickly calculate repeated integration by parts.
The following example will show the first ‘stop’ used in tabular integration.
Find the solution to the following integral
\int x^2 \sin(3x) \, dx
This could be solved using our formula for integration by parts, but this results in a messy calculation using repeated integration by parts. In order to solve these problems faster, we will use the Tabular method.
First, choose two terms to work with in the integral. We will choose x^2 and \sin(3x). We want to choose a term that will eventually default to 0 after repeated differention. Place this term under the D in your table, and the other term under the I. Draw a plus to the left of your terms.
\begin{array}{ll} & \hspace{0.25in} D \hspace{0.25in} & I\\ + & \hspace{0.25in} x^2 \hspace{0.25in} & \sin(3x) \end{array}To begin, we will differentiate the term under our D, and integrate the term under our I, then flip the sign.
\begin{array}{ll} & \hspace{0.25in} D \hspace{0.25in} & I\\ + & \hspace{0.25in} x^2 \hspace{0.25in} & \sin(3x)\\ - & \hspace{0.25in} 2x \hspace{0.25in} & \frac{1}{3}\cos(3x) \end{array}Repeating this process eventually gives us a 0 in our D column. This is our first stop, meaning we don’t need any more steps.
\begin{array}{ll} & \hspace{0.25in} D \hspace{0.25in} & I\\ + & \hspace{0.25in} x^2 \hspace{0.25in} & \sin(3x)\\ - & \hspace{0.25in} 2x \hspace{0.25in} & -(1/3)\cos(3x)\\ + & \hspace{0.25in} 2 \hspace{0.25in} & -(1/9)\sin(3x)\\ - & \hspace{0.25in} 0 \hspace{0.25in} & (1/27)\cos(3x)\\ \end{array}Multiply the n^{th} under the D by the (n+1)^{th} term under the I. Then add or subtract the product by the sign the the left of the D column. This is the answer to our integral.
\int x^2 \sin (3x) \,dx = -\frac{1}{3}x^2\cos(3x) + \frac{2}{9}x\sin(3x) - \frac{2}{27}\cos(3x) + C
And we’re done!
The following example will show the second ‘stop’ used in tabular integration.
\int x^4 \ln x \,dx
Although it seems obvious we should put x^4 under the D column, we quickly realize that we cannot integrate \ln x without integration by parts. Because of this, we have no choice but to but \ln x under the D column. Carrying on with our calculations
\begin{array}{ll} & \hspace{0.25in} D \hspace{0.25in} & I\\ + & \hspace{0.25in} \ln x \hspace{0.25in} & x^4\\ - & \hspace{0.25in} x^{-1} \hspace{0.25in} & (1/5)x^5 \end{array}We can quickly notice that 0 will never appear under the D column. This is where our second stop comes in. If we can easily calculate the integral of a rows product (That is, the product of terms under the D and I columns for a singular row) than we stop, and add the integral of that row to our diagonal solution.
\int x^4 \ln x \,dx = \frac{1}{5}x^5\ln x - \frac{1}{5} \int x^{-1}x^5
This is formula for regular integration by parts, so unfortunately this didn’t save us any time, but we still got the right answer!
\int x^4 \ln x \,dx = \frac{1}{5}x^5\ln x - \frac{1}{25} x^5
The following example will show the third ‘stop’ used in tabular integration.
\int e^x \sin x \,dx
Integrating e^x and \sin x are both easy. I’ll choose to integrate e^x for simplicity sake.
\begin{array}{ll} & \hspace{0.25in} D \hspace{0.25in} & I\\ + & \hspace{0.25in} \sin x \hspace{0.25in} & e^x\\ - & \hspace{0.25in} \cos x \hspace{0.25in} & e^x\\ + & \hspace{0.25in} -\sin x \hspace{0.25in} & e^x\\ - & \hspace{0.25in} -\cos x \hspace{0.25in} & e^x \end{array}Clearly this will go on forever without a 0 under our D column, or an easily integrable row. This introduces our third stop. Notice that our first and third rows only differ by a constant coefficient. When this happens, we write our diagonalization and our integral, stopping at the repeated row.
\int e^x \sin x \,dx = e^x \sin x - e^x \cos(x) - \int e^x \sin x \, dx
Notice how this is the same integral on the left and right hand of the equation. Moving the integral over gives us
2\int e^x \sin x \,dx = e^x \sin x - e^x \cos(x)
Diving by 2
\int e^x \sin x \,dx = \frac{e^x \sin x - e^x \cos(x)}{2}
And we have our answer.
Clearly the tabular method is a huge time saver for repeated integration by parts.
Examples
Evaluate the following integral
\int \ln x \, dx
Solving this is a little counter intuitive seeing as it only has one term. If we let 1 be the second term however, we can evaluate with the tabular method. We pretty cleary have the integrate 1, as we can’t integrate \ln x.
\begin{array}{ll} & \hspace{0.25in} D \hspace{0.25in} & I\\ + & \hspace{0.25in} \ln x \hspace{0.25in} & 1\\ - & \hspace{0.25in} \frac{1}{x} \hspace{0.25in} & x \end{array}Because the product of the second row is easy to integrate, we stop using the tabular method and compute.
\int \ln x \, dx = x \ln x - \int 1 \, dx = x \ln x - x + C
Which solves our integral.
Evaluate the following integral
\int 4x \cos \left( {2 - 3x} \right)\,dx
We have two terms, 4x and \cos (2-3x). Its clear that differentiaing 4x will give us 0 quickly, so we begin with the tabular method.
\begin{array}{ll} & \hspace{0.25in} D \hspace{0.25in} & I\\ + & \hspace{0.25in} 4x \hspace{0.25in} & \cos (2-3x)\\ - & \hspace{0.25in} 4 \hspace{0.25in} & -(1/3)\sin (2-3x)\\ + & \hspace{0.25in} 0 \hspace{0.25in} & -(1/9)\cos (2-3x)\\ \end{array}We use the first stop, and get the following solution to the integral
\int 4x \cos \left( {2 - 3x} \right)\,dx = -\frac{4x}{3}\sin (2-3x) - \frac{4}{9} \cos (2-3x) + C
Which solves our integral.
Evaluate the following integral
\int{{e}^{2x}}\cos \left( {\frac{1}{4}x} \right)\,dx
Without any leads on which term to integrate, I choose to integrate cos(\frac{1}{4}x) on a whim. You may integrate either term however, and the answer will be the same.
\begin{array}{ll} & \hspace{0.25in} D \hspace{0.25in} & I\\ + & \hspace{0.25in} e^{2x} \hspace{0.25in} & \cos ((1/4)x)\\ - & \hspace{0.25in} 2e^{2x} \hspace{0.25in} & 4\sin ((1/4)x)\\ + & \hspace{0.25in} 4e^{2x} \hspace{0.25in} & -16\cos ((1/4)x)\\ \end{array}Notice how the product of row three is a multiple of our initial integral. This is the third stop, so we evaluate our table to get.
\int{{e}^{2x}}\cos \left( {\frac{1}{4}x} \right)\,dx = 4e^{2x}\sin(\frac{1}{4}x) + 32e^{2x}\cos(\frac{1}{4}x) - 64\int{{e}^{2x}}\cos \left( {\frac{1}{4}x} \right)\,dx
65 \int{{e}^{2x}}\cos \left( {\frac{1}{4}x} \right)\,dx = 4e^{2x}\sin(\frac{1}{4}x) + 32e^{2x}\cos(\frac{1}{4}x)
\int{{e}^{2x}}\cos \left( {\frac{1}{4}x} \right)\,dx = \frac{4e^{2x}\sin(\frac{1}{4}x) + 32e^{2x}\cos(\frac{1}{4}x)}{65}
Which solves our integral.
Evaluate the following integral
\int 8\arctan\left( 2x \right)\,dx
Because integrating \arctan is the question, we will derive it instead, and integrate the 8.
\begin{array}{ll} & \hspace{0.25in} D \hspace{0.25in} & I\\ + & \hspace{0.25in} \arctan(2x) \hspace{0.25in} & 8\\ - & \hspace{0.25in} 2/(1+4x^2) \hspace{0.25in} & 8x\\ \end{array}Using our third stop and integrating the second row, we get
\int 8\arctan\left(2x\right)\,dx = 8x\arctan(2x) - \int \frac{8x}{1+4x^2}
Applying a substitution u = 4x^2
We get \int 8\arctan\left(2x \right)\,dx = 8x\arctan(2x) - \ln |1+4x^2| + C
Solving our integral.