Section 1.18 Integration by parts
The integration by parts technique is yet another instance of our
Dictum 1.5.3. In this case we take the familiar product rule of differentiation
\begin{equation}
(fg)' =f'g+fg'\text{,}\tag{1.18.1}
\end{equation}
reexpress it algebraically as
\begin{align}
f'g \amp = (fg)'-fg'\text{,}\tag{1.18.2}
\end{align}
and then integrate both sides to conclude
\begin{align}
\int f(x)g'(x)\, dx \amp = \int (f(x)g(x))'\, dx- \int f'(x)g(x)\, dx\tag{1.18.3}\\
\amp = f(x)g(x)-\int f(x)g'(x)\, dx\text{.}\tag{1.18.4}
\end{align}
Theorem 1.18.1. Integration by parts.
Let \(u\) and \(v\) be continuously differentiable functions on an interval \(I\) containing the interval \([a,b]\text{.}\)
-
Indefinite integral form.
We have
\begin{equation}
\int u(x)v'(x)\, dx= u(x)v(x)-\int u'(x)v(x)\, dx\text{.}\tag{1.18.5}
\end{equation}
-
Definite integral form.
We have
\begin{equation}
\int_a^b u(x)v'(x)\, dx= u(x)v(x)\Bigr\vert_a^b-\int_a^b u'(x)v(x)\, dx\text{.}\tag{1.18.6}
\end{equation}
Procedure 1.18.2. The art of by parts.
To use the integration by parts technique on an integral of the form \(\displaystyle\int f(x)g(x)\, dx\) proceed as follows:
-
Who is \(u\text{,}\) and who \(v'\text{?}\)
Declare one of \(f\) and \(g\) to be \(u\) and the other to be \(v'\text{.}\) The mnemonic device LIPET ((L)og, (I)nverse trig, (P)olynomial/radical, (E)xponent, (T)rig) often leads to a useful choice of \(u\text{.}\)
-
Assemble ingredients.
Suppose without loss of generality that we have chosen
\(u=f\) and
\(v'=g\text{.}\) Then compute the derivative
\(f'\) of
\(f\) and compute an
antiderivative \(G\) of
\(g\text{:}\)
-
Apply by parts rule.
Using the ingredients assembled in Step 2, we have
\begin{align*}
\int \underset{u}{f(x)}\underset{v'}{g(x)}\, dx\amp = \underset{u}{f(x)}\underset{v}{G(x)}-\int \underset{u'}{f'(x)}\underset{v}{G(x)}\, dx\text{.}
\end{align*}
Example 1.18.3. Classic by parts.
Compute \(\displaystyle\int_0^1 xe^{-x}\, dx\)
Solution.
\begin{align*}
\int_0^1 xe^{-x}\, dx\amp = -xe^{-x}\Bigr\vert_0^1+\int_0^1 e^{-x}\, dx \amp (u=x, v'=e^{-x}) \\
\amp = -\frac{1}{e}-e^{-x}\Bigr\vert_0^1\\
\amp = 1-\frac{2}{e}\text{.}
\end{align*}
Procedure 1.18.4. Integration workflow.
For many integral computations it will be clear whether to use a formula, substitution, or integration by parts. When it is not clear how to proceed, the following workflow might be helpful.
-
Algebra and formulas.
If possible, use an integration formula, perhaps after some simple algebraic preparation. Otherwise, move to (1).
-
Substitution.
Evaluate whether a substitution could transform the integral into one where (0) applies. If not promising, move to (2).
-
By parts.
Evaluate whether the integral is amenable to a by parts approach. You may want to mentally run through a couple of choices of ``who is \(u\text{,}\) and who \(v'\)". If not promising, move to (3).
-
Creative algebra.
Consider more creative algebraic techniques, including trigonometric identities. If applicable, return to (0).
The following integrals can all be computed using by parts. However, for some of these byou might also explore whether substitution could serve as a useful technique.
Example 1.18.5. Iterated by parts.
\(\displaystyle \int x^2 e^x\, dx\)
Solution.
\begin{align*}
\int x^2 e^x\, dx \amp = x^2e^{x}-2\int xe^{x}\, dx \amp (u=x^2, v'=e^x) \\
\amp = x^2e^x-2(xe^x-\int e^{x}) \amp (u=x, v'=e^x)\\
\amp = x^2e^x-2xe^x+2e^x+C\text{.}
\end{align*}
Example 1.18.6. Surprising by parts.
Compute \(\displaystyle\int \ln \vert x\vert\, dx\)
Solution.
We have \(\ln x=\ln \abs{x}\cdot 1\text{.}\) LIPET suggests trying \(u=\ln \abs{x}\text{,}\) \(v'=1\text{:}\)
\begin{align*}
\int \ln \vert x\vert\, dx \amp = x\ln\abs{x}-\int \cancel{x}\cdot \frac{1}{\cancel{x}}\, dx
\amp (u=\ln \abs{x}, v'=1)\\
\amp = x\ln\abs{x}-\int 1\, dx\\
\amp = x\ln\abs{x}-x+C\text{.}
\end{align*}
Example 1.18.7. Rational function.
Compute \(\displaystyle\int \frac{x^3}{x^2+1}\, dx\)
Solution.
Using by parts with \(u=x^2\) and \(v'=\frac{x}{x^2+1}\text{,}\) we have
\begin{align*}
\int \frac{x^3}{x^2+1}\, dx\amp= \frac{1}{2}x^2\ln \abs{x^2+1}-\int x\ln\abs{x^2+1}\, dx \\
\amp = \frac{1}{2}x^2\ln\abs{x^2+1}-\frac{1}{2}\int \ln \abs{u}\, du \amp (u=x^2+1, du=2xdx)\\
\amp = \frac{1}{2}x^2\ln\abs{x^2+1}-\frac{1}{2}(u\ln\abs{u}-u)+C \amp (\knowl{./knowl/xref/eg_by_parts_4.html}{\text{Example 1.18.6}})\\
\amp = \frac{1}{2}x^2\ln\abs{x^2+1}-\frac{1}{2}(x^2+1)\ln\abs{x^2+1}+\frac{1}{2}(x^2+1)+C \\
\amp = \frac{1}{2}(x^2+1)-\ln\abs{x^2+1}+C\text{.}
\end{align*}
Alternatively, using the substitution \(u=x^2+1\text{,}\) we have
\begin{align*}
\int \frac{1}{2}\frac{x^3}{x^2+1}\, dx \amp = \frac{1}{2}\int \frac{u-1}{u}\, du \amp (u=x^2+1, du=2xdx) \\
\amp = \frac{1}{2}\int 1-\frac{1}{u}\, du \\
\amp = \frac{1}{2}(x^2+1)-\ln\abs{x^2+1}+C\text{.}
\end{align*}
As a third alternative, we could use polynomial division to write \(\frac{x^3}{x^2+1}=x-\frac{x}{x^2+1}\text{,}\) and then conclude
\begin{equation*}
\int \frac{x^3}{x^2+1}\, dx=\int x-\frac{x}{x^2+1}\, dx=\frac{1}{2}x^2-\ln\abs{x^2+1}+C\text{.}
\end{equation*}
Note that the answer here differs from the previous two by the constant \(\frac{1}{2}\text{,}\) which of course is not a problem.
Example 1.18.8. Inverse trig.
Compute \(\displaystyle\int \arctan x\, dx\)
Solution.
If using by parts, LIPET suggests the choice \(u=\artcan x\text{,}\) \(v'=1\text{:}\)
\begin{align*}
\int \arctan x\, dx \amp = x\arctan x-\int \frac{x}{x^2+1}\, dx \\
\amp = x\arctan x-\frac{1}{2}\ln\abs{x^2+1}+C\text{.}
\end{align*}
Example 1.18.9. By parts and algebra.
Compute \(\int e^x\cos x\, dx\)
Solution.
Here is an example where it looks like we are in danger of entering an infinite regress, but where a minus sign comes to our rescue. We have
\begin{align*}
\int e^x\cos x\, dx\amp = e^x\sin x-\int e^x\sin x \amp (u=e^x, v'=\cos x) \\
\amp = e^x\sin x-(-e^x\cos x+\int e^x\cos x\, dx) \amp (u=e^x,v'=\sin x)\\
\amp = e^x\sin x+e^x\cos x-\int e^x\cos x\, dx\text{.}
\end{align*}
We’ve shown that
\begin{equation*}
\int e^x\cos x\, dx=e^x\sin x+e^x\cos x-\int e^x\cos x\, dx\text{.}
\end{equation*}
Using algebra, it follows that
\begin{equation*}
2\int e^x\cos x=e^x\sin x+e^x\cos x+C\text{,}
\end{equation*}
or
\begin{equation*}
\int e^x\cos x\, dx=\frac{1}{2}(e^x\sin x+e^x\cos x)+D\text{.}
\end{equation*}