7.1 Integration by Parts

472

OBJECTIVES

When you finish this section, you should be able to:

  1. Integrate by parts (p. 472)
  2. Derive a formula using integration by parts (p. 476)

Integration by parts is a technique of integration based on the Product Rule for derivatives: If \(u= f(x)\) and \(v = g(x)\) are functions that are differentiable on an open interval \((a, b)\), then \[ \dfrac {d}{dx}[f(x) \cdot g(x)] = f(x) g^{\prime} ( x) +f^{\prime} ( x) g( x) \]

Integrating both sides gives \[ \begin{align*} \int \frac{d} {{dx}}[f(x) \cdot g(x)]dx &= \int {[f(x)g'(x) + f'(x)g(x)]dx} \\ f(x) \cdot g(x) &= \int {f(x)g'(x)dx + \int {f'(x)g(x)dx} } \\ \end{align*} \]

Solving this equation for \(\int f( x) g^{\prime} ( x) dx\) yields \[\bbox[5px, border:1px solid black, #F9F7ED]{\bbox[5pt] {\int f( x) g^\prime ( x) dx = f(x) \cdot g(x) -\int f^\prime ( x) g(x) dx}} \]

which is known as the integration by parts formula.

Let \(u=f( x) \), \(v=g( x) \). Then we can use their differentials, \(du=f^{\prime} ( x) dx\) and \(dv=g^{\prime} ( x) dx\) to obtain the formula in the form we usually use: \[\bbox[5px, border:1px solid black, #F9F7ED]{\bbox[5pt] {\int u~dv=uv-\int v~du}} \]

IN WORDS

The integral of the product \(u\) \(dv\) equals \(u\) times \(v\) minus the integral of the product \(v du\).

1 Integrate by Parts

The goal of integration by parts is to choose \(u\) and \(dv\) so that \(\int v~du\) is easier to integrate than \(\int u~dv.\)

Integrating by Parts

Find \(\int x e^x~dx\).

Solution Choose \(u\) and \(dv\) so that \[ \int u dv = \int x e^x~dx \]

Suppose we choose \[ u = x\qquad \text{and} \quad dv = e^x~dx \]

Then \[ du = dx\qquad \text{and} \qquad v = \int dv = \int e^x~dx=e^x \]

Notice that we did not add a constant. Only a particular antiderivative of \(dv\) is required at this stage; we will add the constant of integration at the end. Using the integration by parts formula, we have \[ \int \underset{\color{#0066A7}{\hbox{\(u\)}}}{\underbrace{x}} \underset{\color{#0066A7}{dv}}{\underbrace{e^{x} dx}} = \underset{\color{#0066A7}{uv}}{\underbrace{x e^{x}}}-\int \underset{\color{#0066A7}{v}}{\underbrace{e^{x}}}\underset{\color{#0066A7}{\hbox{\(du\)}}} {\underbrace{\hbox{\(dx\)}}}=x e^{x}-e^{x}+C=e^{x}(x-1)+C \]

473

We intentionally chose \(u=x\) and \(dv=e^{x}dx\) so that \(\int v~du\) in the formula is easy to integrate. Suppose, instead, we chose \[ u = e^x \quad \text{and} \quad dv = x~dx \]

Then \[ du = e^xdx \quad \text{and} \quad v = \int xdx = \dfrac {x^{2}}{2} \]

The integration by parts formula yields \[ \int x e^{x} dx=\int \underset{\color{#0066A7}{\hbox{\(u\)}}}{\underbrace{e^{x}}} \underset{\color{#0066A7}{dv}}{\underbrace{x~dx}} = \underset{\color{#0066A7}{uv}}{\underbrace{e^{x} \dfrac{x^{2}}{2}}}-\int \underset{\color{#0066A7}{v}}{\underbrace{\dfrac{x^{2}}{2}}} \underset{\color{#0066A7}{\hbox{\(du\)}}}{\underbrace{e^{x} dx}} \]

For this choice of \(u\) and \(v,\) the integral on the right is more complicated than the original integral, indicating an unwise choice of \(u\) and \(dv.\)

IN WORDS

We choose \(dv\) so that it can be easily integrated and choose \(u\) so that \(\int v du\) is simpler than \(\int u dv\).

NOW WORK

Problem 3.

Integrating by Parts

Find \(\int x\) sin \(x~dx\).

Solution We use the integration by parts formula with \[ u=x \qquad\hbox{and}\qquad dv=\sin x\,dx\qquad {\color{#0066A7}{\int}} {\color{#0066A7}{udv=}} {\color{#0066A7}{\int x\sin x\,dx}} \]

Then \[ du = dx \quad and \quad v = \int \sin x~dx = -cos x \]

and \[ \begin{eqnarray*} \int x\sin x\,dx \underset{\underset{\color{#0066A7}{\hbox{\(\int udv= uv - \int vdu\)}}}{\color{#0066A7}{\uparrow}}} {=} -x\cos x+\int \cos x\,dx=-x\cos x+\sin x+C \\[-9pt] \end{eqnarray*} \]

NOW WORK

Problem 5.

Unfortunately, there are no exact rules for choosing \(u\) and \(dv.\) But the following guidelines are helpful:

Integration by Parts: Guidelines for Choosing \(u\) and \(dv\)

  • \(dx\) is always part of \(dv.\)
  • \(dv\) should be easy to integrate.
  • \(u\) and \(dv\) are chosen so that \(\int v du\) is no more difficult to integrate than the original integral \(\int u dv\).
  • If the new integral is more complicated, try different choices for \(u\) and \(dv.\)

Choosing \(u\) and \(dv\) often involves trial and error. If a selection does not appear to work, try a different choice. If no choice works, it may be that some other technique of integration should be used.

474

Integrating by Parts to Find \(\int \ln x\, dx\)

Derive the formula \[\bbox[5px, border:1px solid black, #F9F7ED]{ \int \ln x\,dx=x\ln x-x+C } \]

Solution We use the integration by parts formula with \[ \begin{equation*} \hbox{ }u=\ln x\qquad \hbox{and}\qquad dv=dx \end{equation*} \]

Then \[ du=\frac{1}{x}\,dx\qquad {\rm and}\qquad v=\int dx=x \ \]

Now \[ \int \ln x\,dx= {{x}}\cdot {{\ln x}}-\int {{x}}\cdot {{\frac{1}{x}\,dx}}\,=x\,\ln x-\int dx=x\,\ln x-x+C \]

NOTE

The integral \(\int \ln x\,dx\) can be found in the list of integrals on the inserts at the front and back of the book and is a basic integral.

Integrating by Parts to Find \(\int \tan^{-1} x\, dx\)

Derive the formula \[\bbox[5px, border:1px solid black, #F9F7ED]{ \int \tan ^{-1}x\,dx=x\,\tan ^{-1}x-\dfrac{1}{2}\ln \,(1+x^{2})+C } \]

Solution We use the integration by parts formula with \[ u=\tan ^{-1}x\qquad \hbox{and }\qquad dv=dx \]

Then \[ du=\frac{1}{1+x^{2}}\,dx\qquad \hbox{and}\qquad v=\int dx=x \] and \[ \int \tan ^{-1}x\,dx=x\cdot \tan ^{-1}x-\int \frac{x}{1+x^{2}}dx \]

To find the integral \(\int \dfrac{x}{1+x^{2}}dx\), we use the substitution \( t=1+x^{2}\). Then \(dt=2x\,dx\), or equivalently, \(x~dx=\dfrac{dt}{2}.\) \[ \begin{equation*} \int \frac{x}{1+x^{2}}dx=\frac{1}{2}\int \frac{dt}{t}=\frac{1}{2}\ln \vert \,t\vert =\frac{1}{2}\ln (1+x^{2}) \end{equation*} \]

As a result, \(\int \tan ^{-1} x \,dx=x \tan ^{-1}x-\dfrac{1}{2}\ln (1+x^{2})+C\).

NEED TO REVIEW?

The method of substitution is discussed in Section 5.6, pp. 387-393.

NOW WORK

Problem 9.

The next example shows that sometimes it is necessary to integrate by parts more than once.

Integrating by Parts

Find \(\int x^{2}\,e^{x}\,dx\).

Solution We use the integration by parts formula with \[ u=x^{2}\qquad \hbox{and}\qquad dv=e^{x}\,dx \]

Then \[ du=2x\,dx\qquad \hbox{and}\qquad v=\int e^{x}\,dx=e^{x} \]

475

and \[ \int x^{2} e^{x}\,dx=x^{2}e^{x}-2\int xe^{x}\,dx \]

The integral on the right is simpler than the original integral. To find it, we use integration by parts a second time. (Refer to Example 1.)

\[ \begin{equation*} \int xe^{x}\,dx=xe^{x}-e^{x} \end{equation*} \]

Then \[ \int x^{2}e^{x}\,dx=x^{2}e^{x}-2( xe^{x}-e^{x}) +C=e^{x}(x^{2}-2x+2)+C \]

NOW WORK

Problem 13.

Table 1 provides guidelines to help choose \(u\) and \(dv\) for several types of integrals that are found using integration by parts. In the table, \(n\) is always a positive integer.

Table 1: TABLE 1 Guidelines for Choosing \(u\) and \(dv\)
Integral; \(n\) is a positive integer \(u\) \(dv\)
\(\left. \begin{array}{l} \int x^{n}e^{ax}\,dx \\ \int x^{n}\cos (ax) \,dx \\ \int x^{n}\sin (ax) \,dx \end{array} \right\} \) \(u=x^{n}\) \(dv= \hbox{what remains}\)
\( \begin{array}{l} \int x^{n}\sin ^{-1}x\,dx \\ \int x^{n}\cos ^{-1}x\,dx \\ \int x^{n}\tan ^{-1}x\,dx \end{array} \) \( \begin{array}{l} u=\sin ^{-1}x \\ u=\cos ^{-1}x \\ u=\tan ^{-1}x \end{array} \) \(dv=x^{n}\,dx\)
\(\int x^{m}( \ln x) ^{n}\,dx;\) \(m\) is a real number, \(m ≠ -1\) \(u=( \ln x) ^{n}\) \(dv=x^{m}\,dx\)

Integration by parts is also used to find certain definite integrals.

Finding the Area Under the Graph of \(f(x)=x\ln x\)

Find the area under the graph of \(f( x) =x\ln x\) from \(1\) to \(2.\)

Figure 1 \(f(x)=x\ln x\)

Solution See Figure 1 for the graph of \(f( x) =x\ln x\). The area \(A\) under the graph of \(f\) from \(1\) to \(2\) is \( A=\int_{1}^{2}x\ln x\,dx.\) We use the integration by parts formula with \[ \begin{equation*} u=\ln x\qquad \hbox{and}\qquad dv=x\,dx \end{equation*} \]

Then \[ \begin{equation*} du=\frac{1}{x} dx\qquad \hbox{and}\qquad v=\int x dx=\frac{x^{2}}{2} \end{equation*} \]

and \[ \begin{eqnarray*} A=\int_{1}^{2}x\ln x\,dx&=&\left[ \frac{x^{2}}{2}\ln x\right] _{1}^{2}-\int_{1}^{2}\frac{x^{2}}{2}\left( \frac{1}{x} dx\right) =2\ln 2-\dfrac{1}{2}\int_{1}^{2}x\,dx\\[5pt] &=&2\ln 2- \dfrac{1}{2}\left[ \frac{x^{2}}{2}\right] _{1}^{2}=2\ln 2-\dfrac{3}{4} \end{eqnarray*} \]

NOW WORK

Problem 37.

2 Derive a Formula Using Integration by Parts

476

Integration by parts is also used to derive general formulas involving integrals.

Deriving a Formula

Derive the formula \[\bbox[5px, border:1px solid black, #F9F7ED]{ \int e^{ax}\cos (bx) \,dx=\dfrac{e^{ax}[b\sin (bx) +a\cos (bx)] }{a^{2}+b^{2}}+C\qquad b ≠ 0} \tag{1} \]

Solution We use the integration by parts formula with \[ u=e^{ax}\qquad \hbox{and} \qquad dv=\cos (bx) \,dx \]

Then \[ \begin{equation*} du=ae^{ax}\,dx\qquad \hbox{and}\qquad v=\int \cos (bx) \,dx=\frac{1}{b}\sin (bx) \end{equation*} \]

and \[ \begin{equation*} \int e^{ax}\cos (bx) \,dx=e^{ax}\,\dfrac{\sin (bx) }{b}-\frac{a}{b}\int e^{ax}\sin (bx) \,dx \tag{2} \end{equation*} \]

The new integral on the right, \(\int e^{ax}\sin (bx) \,dx,\) is different from the original integral, but it is essentially of the same form. We use integration by parts again with this integral by choosing \[ \begin{equation*} u=e^{ax}\qquad \hbox{and}\qquad dv=\sin (bx) \,dx \end{equation*} \]

Then \[ \begin{equation*} du=ae^{ax}\,dx\qquad \hbox{and}\qquad v=\int \sin (bx) \,dx=- \frac{1}{b}\cos (bx) \end{equation*} \]

and \[ \begin{equation*} \int e^{ax}\sin (bx) \,dx=-\frac{1}{b}\,e^{ax}\cos (bx) +\frac{a}{b}\int e^{ax}\cos (bx) \,dx\tag{3} \end{equation*} \]

Substituting the result from (3) into (2), we obtain \[ \begin{eqnarray*} \int e^{ax}\cos (bx) \,dx& =& \frac{1}{b}e^{ax}\sin (bx) -\frac{a}{b}\left[ -\frac{1}{b}e^{ax}\cos (bx) + \frac{a}{b}\int e^{ax}\cos (bx) \,dx\right] \\[8pt] \int e^{ax}\cos (bx) \,dx& =&\frac{1}{b}\,e^{ax}\sin (bx) +\frac{a}{b^{2}}\,e^{ax}\cos (bx) -\frac{a^{2}}{b^{2}}\int e^{ax}\cos (bx) \,dx \end{eqnarray*} \]

Now we solve for \(\int e^{ax}\cos (bx) \,dx\) and simplify. \[ \begin{eqnarray*} \int e^{ax}\cos (bx) \,dx+\frac{a^{2}}{b^{2}}\int e^{ax}\cos (bx) \,dx& =&\frac{1}{b}\,e^{ax}\sin (bx) +\frac{a}{ b^{2}}\,e^{ax}\cos (bx) \nonumber \\[5pt] \left( 1+\frac{a^{2}}{b^{2}}\right) \int e^{ax}\cos (bx) \,dx &=&\frac{1}{b^{2}}\,e^{ax} [b\sin (bx) +a\cos (bx) ] \\ \int e^{ax}\cos (bx) \,dx &=&\frac{e^{ax}[b\sin (bx)+a\cos (bx)]}{a^{2}+b^{2}}+C \end{eqnarray*} \]

477

For example, to find \(\int e^{4x}\cos (5x) \,dx,\) we use (1) with \(a=4\) and \(b=5.\) \[ \int e^{4x}\cos (5x) \,dx=\frac{e^{4x}[ 5\sin \,(5x) +4\cos \,(5x) ] }{41}+C \]

NOW WORK

Problem 41.

Deriving a Formula

Derive the formula \[\bbox[5px, border:1px solid black, #F9F7ED]{ \int \sec ^{n} x\,dx=\dfrac{\sec ^{n-2}x\,\tan \,x}{n-1} +\dfrac{n-2}{n-1}\int \sec ^{n-2} x\,dx\qquad n \geq 3}\tag{4} \]

Solution We begin by writing \(\sec ^{n}x=\sec ^{n-2}x\sec ^{2}x\), and choose \[ u=\sec ^{n-2}x\qquad \hbox{and}\qquad dv=\sec ^{2}x\,dx \]

This choice makes \(\int dv\) easy to integrate. Then \[ \begin{eqnarray*} du&=&[ (n-2)\sec ^{n-3}x\cdot \sec x\,\tan x] \,dx =[ (n-2)\sec ^{n-2}x\,\tan x] \,dx \\[6pt] v&=&\int \sec^{2}x\,dx=\tan x \end{eqnarray*} \]

Using integration by parts, we get \[ \begin{equation*} \int \sec ^{n}x\,dx=\sec ^{n-2}x\,\tan x-(n-2)\int \sec ^{n-2}x\,\tan ^{2}x\,dx \end{equation*} \]

To express the integrand on the right in terms of \(\sec x,\) we use the trigonometric identity, \(\tan ^{2}x+1=\sec ^{2}x,\) and replace \(\tan ^{2}x\) by \(\sec ^{2}x-1\), obtaining \[ \begin{eqnarray*} \int \sec ^{n}x\,dx& =&\sec ^{n-2}x\tan x-(n-2)\int \sec ^{n-2}x(\sec^{2}x-1)\,dx \\[4pt] \int \sec ^{n}x\,dx& =& \sec ^{n-2}x\tan x-(n-2)\int \sec ^{n}x\,dx+(n-2)\int \sec ^{n-2}x\,dx \end{eqnarray*} \]

Moving the middle term on the right to the left, we obtain \[ (n-1)\int \sec ^{n}x\,dx=\sec ^{n-2}x\,\tan x+(n-2)\int \sec ^{n-2}x\,dx \]

Finally, divide both sides by \(n-1\): \[ \int \sec ^{n}x\,dx=\frac{\sec ^{n-2}x\tan x}{n-1}+\frac{n-2}{n-1}\int \sec ^{n-2}x\,dx \]

Formula (4) is called a reduction formula because repeated applications of the formula eventually lead to an elementary integral. For this reduction formula, when \(n\) is even, repeated applications lead eventually to \[\bbox[5px, border:1px solid black, #F9F7ED]{ \int \sec ^{2}x\,dx=\tan x+C} \]

When \(n\) is odd, repeated applications eventually lead to the integral \[\bbox[5px, border:1px solid black, #F9F7ED]{ \int \sec x\,dx=\ln \vert \sec x+\tan x\vert +C} \]

478

For example, if \(n=3\), \[ \int \sec^{3}x~dx = \frac{\sec x \tan x}{2}+ \frac{1}{2} \int \sec x~dx=\frac{\sec x \tan x}{2}+\frac{1}{2}\ln \vert \sec x+\tan x\vert + C \]

NOW WORK

Problem 59.