next up previous index
Next: 17.4 Integration by Substitution Up: 17. Antidifferentiation Techniques Previous: 17.2 Basic Formulas   Index

17.3 Integration by Parts

17.17   Theorem (Integration by parts.) Let $f,g$ be functions that are continuous on an interval $[a,b]$ and differentiable on $(a,b)$. If $f'g$ has an antiderivative on $[a,b]$, then $g'f$ also has an antiderivative on $[a,b]$ and
\begin{displaymath}\int g'f = fg - \int f'g.
\end{displaymath} (17.18)

We call formula (17.18) the formula for integration by parts.

Proof:     This theorem is just a restatement of the product rule for differentiation. If $f$ and $g$ are differentiable on $(a,b)$ then the product rule says that

\begin{displaymath}(fg)' = f'g + g'f \end{displaymath}

so that

\begin{displaymath}g'f = (fg)' - f'g \end{displaymath}

on $(a,b)$. If $\int f'g$ is an antiderivative for $f'g$ on $[a,b]$, then $fg - \int f'g$ is continuous on $[a,b]$, and

\begin{displaymath}(fg - \int f'g)' = (fg)' - f'g = g'f \end{displaymath}

on $(a,b)$. We have shown that $fg - \int f'g$ is an antiderivative for $g'f$ on $[a,b]$. $\diamondsuit$

17.19   Example. We will calculate $\displaystyle {\int_0^{\pi} x \sin(3x)dx}$. We begin by searching for an antiderivative for $x \sin(3x)$. Let
$\displaystyle f(x)$ $\textstyle =$ $\displaystyle x,\mbox{{}}$  
$\displaystyle g'(x)$ $\textstyle =$ $\displaystyle \sin(3x), \mbox{{}}$  
$\displaystyle f'(x)$ $\textstyle =$ $\displaystyle 1,\mbox{{}}$  
$\displaystyle g(x)$ $\textstyle =$ $\displaystyle -\frac{1}{3}\cos(3x).\mbox{{}}$  

Then by the formula for integration by parts
$\displaystyle \int x \sin(3x) dx$ $\textstyle =$ $\displaystyle \int f(x)g'(x) dx \mbox{{}}$  
  $\textstyle =$ $\displaystyle f(x)g(x) - \int f'(x) g(x) dx \mbox{{}}$  
  $\textstyle =$ $\displaystyle -\frac{x}{3}\cos(3x) + \frac{1}{3} \int \cos(3x) dx \mbox{{}}$  
  $\textstyle =$ $\displaystyle -\frac{x}{3} \cos(3x) + \frac{1}{9} \sin(3x).$ (17.20)

Hence
$\displaystyle \int _0 ^{\pi} x \sin(3x) dx$ $\textstyle =$ $\displaystyle (\left. -\frac{x}{3} \cos(3x) + \frac{1}{9} \sin(3x) )\right\vert _0^{\pi} \mbox{{}}$  
  $\textstyle =$ $\displaystyle -\frac{\pi}{3}\cos(3\pi) = \frac{\pi}{3}.
\mbox{{}}$  

Suppose I had tried to find $\int x\sin(3x)$ in the following way: Let
$\displaystyle f(x)$ $\textstyle =$ $\displaystyle \sin(3x), \mbox{{}}$  
$\displaystyle g'(x)$ $\textstyle =$ $\displaystyle x,\mbox{{}}$  
$\displaystyle f'(x)$ $\textstyle =$ $\displaystyle 3\cos(3x), \mbox{{}}$  
$\displaystyle g(x)$ $\textstyle =$ $\displaystyle \frac{1}{2}x^2. \mbox{{}}$  

Then by the formula for integration by parts
$\displaystyle \int x \sin(3x) dx$ $\textstyle =$ $\displaystyle \int f(x)g'(x) dx \mbox{{}}$  
  $\textstyle =$ $\displaystyle f(x)g(x) - \int f'(x) g(x) dx \mbox{{}}$  
  $\textstyle =$ $\displaystyle \frac{1}{2}x^2 \sin(3x) - \frac{3}{2} \int x^2 \cos(3x) dx.$ (17.21)

In this case the antiderivative $ \int x^2 \cos(3x) dx$ looks more complicated than the one I started out with. When you use integration by parts, it is not always clear what you should take for $f$ and for $g'$. If you find things are starting to look more complicated rather than less complicated, you might try another choice for $f$ and $g'$.


Integration by parts is used to evaluate antiderivatives of the forms
$\displaystyle {\int x^n\sin(ax)dx}$, $\displaystyle {\int x^n\cos(ax)dx}$, and $\displaystyle {\int x^n e^x dx}$ when $n$ is a positive integer. These can be reduced to antiderivatives of the forms $\displaystyle {\int x^{n-1}\sin(ax)dx}$,
$\displaystyle {\int x^{n-1}\cos(ax)dx}$, and $\displaystyle {\int x^{n-1} e^x dx}$, so by applying the process $n$ times we get the power of $x$ down to $x^0$, which gives us antiderivatives we can easily find.

17.22   Example. We will calculate $\int \sin(\ln(x)).$

Let

$\displaystyle f(x)$ $\textstyle =$ $\displaystyle \sin(\ln(x)), \mbox{{}}$  
$\displaystyle g'(x)$ $\textstyle =$ $\displaystyle 1,\mbox{{}}$  
$\displaystyle g(x)$ $\textstyle =$ $\displaystyle x,\mbox{{}}$  
$\displaystyle f'(x)$ $\textstyle =$ $\displaystyle \frac{\cos(\ln(x))}{x} .\mbox{{}}$  

Then
$\displaystyle \int \sin(\ln(x))dx$ $\textstyle =$ $\displaystyle \int f(x) g'(x) dx =f(x)g(x) -\int f'(x)g(x)dx \mbox{{}}$  
  $\textstyle =$ $\displaystyle x \sin(\ln(x)) - \int \cos(\ln(x))dx$ (17.23)

We will now use integration by parts to find an antiderivative for $\cos(\ln(x))$. Let
$\displaystyle F(x)$ $\textstyle =$ $\displaystyle \cos(\ln(x)), \mbox{{}}$  
$\displaystyle G'(x)$ $\textstyle =$ $\displaystyle 1,\mbox{{}}$  
$\displaystyle G(x)$ $\textstyle =$ $\displaystyle x,\mbox{{}}$  
$\displaystyle F'(x)$ $\textstyle =$ $\displaystyle -\frac{\sin(\ln(x))}{x}.\mbox{{}}$  

Then
$\displaystyle \int \cos(\ln(x))dx$ $\textstyle =$ $\displaystyle \int F(x) G'(x) = F(x)G(x) - \int F'(x)G(x) dx \mbox{{}}$  
  $\textstyle =$ $\displaystyle x \cos(\ln(x)) + \int \sin(\ln(x))dx$ (17.24)

From equations (17.23) and (17.24) we see that

\begin{displaymath}\int \sin(\ln(x))dx = x \sin(\ln(x)) -\left(x\cos(\ln(x)) +\int\sin(\ln(x)) \right).
\end{displaymath}

Thus

\begin{displaymath}2 \int \sin(\ln(x))dx = x \sin(\ln(x)) - x\cos(\ln(x)), \end{displaymath}

and

\begin{displaymath}\int \sin(\ln(x))dx = \frac{x}{2} (\sin(\ln(x)) - \cos(\ln(x))). \end{displaymath}

17.25   Example. We will calculate $\int \ln(t)dt$. Let
$\displaystyle f(t)$ $\textstyle =$ $\displaystyle \ln(t), \mbox{{}}$  
$\displaystyle g'(t)$ $\textstyle =$ $\displaystyle 1,\mbox{{}}$  
$\displaystyle g(t)$ $\textstyle =$ $\displaystyle t, \mbox{{}}$  
$\displaystyle f'(t)$ $\textstyle =$ $\displaystyle \frac{1}{t}. \mbox{{}}$  

Then
$\displaystyle \int \ln(t) dt$ $\textstyle =$ $\displaystyle \int f(t)g'(t)dt = f(t)g(t) - \int f'(t)g(t)dt \mbox{{}}$  
  $\textstyle =$ $\displaystyle t \ln(t) - \int 1 dt \mbox{{}}$  
  $\textstyle =$ $\displaystyle t \ln(t) -t. \mbox{{}}$  

17.26   Theorem (Antiderivative of inverse functions.) Let $I$ and $J$ be intervals in $\mbox{{\bf R}}$, and let $f\colon I\to J$ be a continuous function such that $f'(x)$ is defined and non-zero for all $x$ in the interior of $I$. Suppose that $g\colon J\to I$ is the inverse function for $f$, and that $F$ is an antiderivative for $f$. Then an antiderivative for $g$ on $J$ is given by
\begin{displaymath}
\int g(x)\; dx=xg(x)-(F\circ g)(x).
\end{displaymath} (17.27)

Proof: Let $h(x)=x$. Then $h'(x)=1$, and

$\displaystyle \int g(x)\; dx$ $\textstyle =$ $\displaystyle \int g(x) h'(x) dx = g(x)h(x)-\int g'(x)h(x) dx$  
  $\textstyle =$ $\displaystyle xg(x) -\int x g'(x) dx$ (17.28)

Now $F'=f$ and $f\circ g(x)=x$ for all $x$ in $J$, so

\begin{displaymath}(F\circ g)'(x)=F'\Big(g(x)\Big)\cdot g'(x)=f\Big(g(x)\Big)\cdot
g'(x)=xg'(x)\end{displaymath}

and it follows from (17.28) that

\begin{eqnarray*}
\int g(x)\;dx &=& xg(x)-\int(F\circ g)'(x)\; dx \\
&=& xg(x)-(F\circ g)(x).\mbox{ $\diamondsuit$}
\end{eqnarray*}



Remark: It follows from the proof of the previous theorem that if you know an antiderivative for a function $f$, then you can find an antiderivative for the inverse function $g$ by integration by parts. This is what you should remember about the theorem. The formula (17.27) is not very memorable.

17.29   Example. In the previous theorem, if we take

\begin{displaymath}f(x)=e^x,\;\; F(x)=e^x,\;\; g(x)=\ln (x),\end{displaymath}

then we get

\begin{displaymath}\int\ln(x)\;dx=x\ln(x)-e^{\ln(x)}=x\ln(x)-x.\end{displaymath}

This agrees with the result obtained in example 17.25.

17.30   Exercise. What is wrong with the following argument? Let
$\displaystyle f(x)$ $\textstyle =$ $\displaystyle \frac{1}{x}, \mbox{{}}$  
$\displaystyle g'(x)$ $\textstyle =$ $\displaystyle 1,\mbox{{}}$  
$\displaystyle f'(x)$ $\textstyle =$ $\displaystyle -\frac{1}{x^2}, \mbox{{}}$  
$\displaystyle g(x)$ $\textstyle =$ $\displaystyle x.\mbox{{}}$  

Then
$\displaystyle \int\frac{1}{x}dx$ $\textstyle =$ $\displaystyle \int f(x) g'(x) dx =f(x)g(x) -\int f'(x)g(x)dx \mbox{{}}$  
  $\textstyle =$ $\displaystyle 1 + \int \frac{1}{x}dx.\mbox{{}}$  

If we subtract $\displaystyle {\int \frac{1}{x}dx}$ from both sides we obtain

\begin{displaymath}0 = 1.\end{displaymath}

17.31   Exercise. A Calculate the following antiderivatives:
a)
${\displaystyle \int x e^x dx.}$
b)
${\displaystyle \int e^x \sin(x) dx.}$ (Integrate by parts more than once.)
c)
${\displaystyle \int \arctan(u) du.}$
d)
${\displaystyle \int \frac{x}{\sqrt{4-x^2}} dx.}$
e)
${\displaystyle \int x \sqrt{4-x^2} dx. }$
f)
${\displaystyle \int x^r \ln(\vert x\vert) dx}$, where $r\in\mbox{{\bf R}}$. Have you considered the case where $r=-1$?
g)
${\displaystyle \int x^2 \cos(2x) dx}$.


next up previous index
Next: 17.4 Integration by Substitution Up: 17. Antidifferentiation Techniques Previous: 17.2 Basic Formulas   Index
Ray Mayer 2007-09-07