CHAPTER 1 Techniques of Integration II: Integration by Parts

A general principle is that any derivative rule has a corresponding integration rule. For example, a derivative formula such as \frac{d}{dx} sin x = cos x has a corresponding antiderivative formula ∫ cos x dx = sin x + C. The u-substitution technique of integration comes from the chain rule for differentiation: if you check an antiderivative obtained by u-substitution in order to be sure that its derivative is the function you wanted to integrate, you use the chain rule. For example, in the top integral of Example 12.1 in the last section, to check that 50 ln u = 50 ln(1 + 0.01x^{2}) is the antiderivative of x/(1 + 0.01x^{2}), you use the chain rule:

\frac{d}{dx}50 ln u = \frac{50}{u} \frac{du}{dx} = \frac{50}{1 + 0.01x^{2}} (0.02x) = \frac{x}{1 + 0.01x^{2}} .

The product rule for derivatives also gives rise to a very useful integration rule, called integration by parts. To get this rule, we recall the product rule, which says that the derivative of u(x)v(x) is u(x)v′(x) + u′(x)v(x). We shall omit the (x), and write simply (uv)′ = uv′ + u′v. Now solve this equality for uv′, and then take the antiderivative of both sides. Since the antiderivative of (uv)′ is just uv, we obtain: ∫ uv′ = uv − ∫ u′v. This is the integration by parts rule in shorthand form. Written out completely, it is:

∫ u(x)v′(x)dx = u(x)v(x) − ∫ u′(x)v(x)dx (indefinite integral form).

For definite integrals, we put in the limits of integration:

∫_{a}^{b} u(x)v′(x)dx = u(x)v(x) |_{a}^{b} − ∫_{a}^{b} u′(x)v(x)dx (definite integral form).

At first, this might seem to be useless: the rule says that our integral is equal to uv minus some other integral, and so we still have an integral to compute. However, for an important class of functions f(x) it is possible to choose u(x) and v(x) in such a way that f(x) = u(x)v′(x) and the integral on the right — namely, ∫ u′(x)v(x)dx — is easier to evaluate than ∫ f(x)dx. This section is devoted to explaining how this is done. We first give a series of examples, and then we make up a table summarizing the main uses of integration by parts.

Example 1.1. Find ∫ x cos x dx, and then find the x-coordinate of the center of mass of the flat plate bounded by the x- and y-axes and the cosine curve in the first quadrant.

We choose u(x) = x and v′(x) = cos x. The first thing we must do is find v(x), which is an antiderivative of cos x. So we take v(x) = sin x. In an integration by parts problem, v′(x) must always be a function whose antiderivative you can find right away. (The integration by parts would work just as well if we took any other antiderivative of the form sin x + C; but to avoid unnecessary work we shall always choose v(x) by setting the constant of integration equal to 0.) Using u(x) = x and v(x) = sin x in the integration by parts rule, we obtain:

∫ x cos x dx = x sin x − ∫ 1 · sin x dx = x sin x − (− cos x) + C = x sin x + cos x + C.

It is instructive to check our answer by taking the derivative of x sin x + cos x. As always in an integration by parts problem, our answer has two parts: a product of two functions (namely x sin x) and another function which can be thought of as a “correction term” (namely, cos x). When we take the derivative of the product, the product rule gives us two terms. One of them is our original function inside the integral, and the other is a term we don’t want. The derivative of the “correction term” precisely cancels out the term we don’t want. We see how this works when we check our answer to Example 13.1:

\frac{d}{dx}(x sin x + cos x) = (x cos x + 1 · sin x) − sin x = x cos x.

Finally, \overline{x} in this example is equal to

∫_{0}^{π/2} x cos x dx / ∫_{0}^{π/2} cos x dx = (x sin x + cos x) |_{0}^{π/2}/ sin x |_{0}^{π/2}

= (π/2 − 1)/1 = \frac{π}{2} − 1 = 0.5708.

Example 1.2. Find ∫ xe^{5x}dx.

Again choose u(x) = x. Let v′(x) = e^{5x}, so that v(x) = \frac{1}{5}e^{5x}. Then

∫ xe^{5x}dx = x · \frac{1}{5}e^{5x} − ∫ 1 · \frac{1}{5}e^{5x}dx = \frac{1}{5}xe^{5x} − \frac{1}{5} ∫ e^{5x}dx = \frac{1}{5}xe^{5x} − \frac{1}{25}e^{5x} + C.

Example 1.3. Find the improper integral ∫_{0}^{∞} x^{10}e^{−x}dx.

We shall apply the definite integral version of integration by parts. Having upper limit of integration ∞ means that we can take a finite upper limit of integration b and then let b ⟶ ∞.

Before doing this problem, we shall digress for a minute, and show that x^{n}e^{−kx} always approaches 0 as x ⟶ ∞, for any n and any positive constant k. Look at the ln of this expression: ln(x^{n}e^{−kx}) = ln(x^{n}) + ln(e^{−kx}) = (n ln x) − kx. That is, we get a constant multiple of ln x minus a constant multiple of x. When x is large ln x is much smaller than x, and so eventually this difference must approach −∞. Hence, our original expression x^{n}e^{−kx}, which is e^{n ln x−kx}, is e to a power that approaches −∞, and this approaches zero, as claimed.

We shall apply this limit fact when we evaluate expressions of the form x^{n}e^{−x} at infinity (i.e., at b and then take b ⟶ ∞). That is, when we evaluate x^{n}e^{−x} at infinity we get 0. In our integral we take u(x) = x^{10} and v′(x) = e^{−x}, so that v(x) = −e^{−x}. Then

∫_{0}^{∞} x^{10}e^{−x} dx = −x^{10}e^{−x} |_{0}^{∞} − ∫_{0}^{∞} 10x^{9} (−e^{−x}) dx = 0 − 0 + 10 ∫_{0}^{∞} x^{9}e^{−x} dx.

The last integral is like the one we started with; however, the power of x has been reduced by 1. So we must apply integration by parts again, this time with u(x) = x^{9}. The result is:

∫_{0}^{∞} x^{9}e^{−x}dx = 9 ∫_{0}^{∞} x^{8}e^{−x}dx. Continuing in this way, we obtain

∫_{0}^{∞} x^{10}e^{−x}dx = 10 ∫_{0}^{∞} x^{9}e^{−x}dx = 10 · 9 ∫_{0}^{∞} x^{8}e^{−x}dx
= ⋯ = 10 · 9 · 8 ⋯ 2 · 1 · ∫_{0}^{∞} e^{−x}dx.

But ∫_{0}^{∞} e^{−x}dx = −e^{−x} |_{0}^{∞}= 1, so that our final answer is 10·9·8·7·6·5·4·3·2·1 = 3628800. (The product of all numbers from 1 to 10 is called “10 factorial,” and is written 10!.)

Example 1.4. Find ∫_{0}^{1} x^{3} ln x dx.

First note that the function x^{3} ln x is negative between 0 and 1 (because ln x is negative there), has value 0 when x = 1, and approaches the limit 0 as x ⟶ 0. (For the latter fact, see Problem 9(a) in the section on ln.) Thus, the function we’re integrating in Example 13.4 has the following appearance:

y = x^{3} ln x

We now use integration by parts. If we try to proceed as in Example 13.3, setting u(x) equal to x^{3}, we run into a problem: we would then have to take v′(x) equal to ln x, and we do not yet know an antiderivative of ln x. In an integration problem with ln x, it makes sense to reverse our choice of u and v. That is, we set u(x) = ln x and v′(x) = x^{3}, so that v(x) = x^{4}/4. This gives us:

∫_{0}^{1} x^{3} ln x dx = \frac{1}{4}x^{4} ln x |_{0}^{1} − ∫_{0}^{1} \frac{1}{4}x^{4} · \frac{1}{x} dx.

Notice what happened in the integral at the right: we have nothing more than a power of x to integrate. The point is that integration by parts can be viewed as a trade-off, where in the integral on the right you get to replace u by its derivative u′ (which should be a simpler function), but at the expense of replacing v′ by its antiderivative v. In this problem we had to replace x^{3} by a higher power x^{4}, but in return we got to replace ln x by the much simpler function 1/x which is its derivative. Returning to our computation, we find that x^{4} ln x gives 0 when evaluated at either 1 or 0, and hence

∫_{0}^{1} x^{3} ln x dx = −\frac{1}{4} ∫_{0}^{1} x^{3} dx = −\frac{1}{4} · \frac{1}{4} = −\frac{1}{16}.

Example 1.5. Find the antiderivative of ln x.

At first it might seem that the integral ∫ ln x dx should have nothing to do with integration by parts, since the function inside the integral is not a product. However, we can treat this integral in the same way as we treated ∫ x^{3} ln x dx in Example 13.4. Namely, we view ln x as the product 1 · ln x = x^{0} ln x, and we set u(x) = ln x and v′(x) = 1, so that v(x) = x. Then:

∫ ln x dx = x ln x − ∫ x · \frac{1}{x}dx = x ln x − ∫ 1 dx = x ln x − x + C.

Example 1.6. Find the antiderivative of arcsin x.

This antiderivative (and also the antiderivative of Arctan) can be computed in the same way as the antiderivative of ln x in Example 13.5. Namely, we take u(x) = arcsin x, v′(x) = 1, v(x) = x, so that u′(x) = 1/\sqrt{1 − x^{2}}, and

∫ arcsin x dx = x arcsin x − ∫ x\frac{1}{\sqrt{1 − x^{2}}} dx = x arcsin x − ∫ \frac{x dx}{\sqrt{1 − x^{2}}} .

The last integral can be evaluated using a u-substitution. That is, for the rest of the problem we forget about integration by parts, and use the letter u for an entirely different purpose. Namely, if we set u equal to the expression under the radical, we see that du is essentially what we have in the numerator. More precisely, u = 1 − x^{2}, du = −2xdx, so that

∫ arcsin x dx = x arcsin x + ∫ \frac{du}{2\sqrt{u}}
= x arcsin x + \sqrt{u} + C = x arcsin x + \sqrt{1 − x^{2}} + C.

The reader should check this answer by taking its derivative and seeing that, after cancelation, you get arcsin x.

Before doing more examples, we give a table that summarizes the most common uses of integration by parts. They all relate to functions which are the product of a power of x and either an exponential function, sine or cosine, or else one of the inverse functions ln, Arcsin, Arctan.

1. How to Choose u and v

I. In the following cases choose u(x) = x^{n} and v′(x) =the other function. Here n is a positive integer, and k, a, and b are constants.

∫ f(x)dx, where f(x) is a product x^{n} · \begin{cases}e^{kx}, \\ sin(ax + b), \\ cos(ax + b). \end{cases}

II. In the following cases choose v′(x) = x^{n} and u(x) = the other function. Here n is a positive integer or 0, m is a positive integer, and a and b are constants.

∫ f(x)dx, where f(x) is a product x^{n} · \begin{cases}ln(ax + b), \\ ln^{m}(ax + b), \\ arcsin(ax + b), \\ arctan(ax + b). \end{cases}

One type of problem in part II which has not yet occurred in the examples is x^{n} · ln^{m}(ax + b). We now give an example of this.

1. HOW TO CHOOSE u AND v 5

Example 1.7. Suppose that the shape in Example 13.4 is revolved around the x-axis to form a solid. Find its volume.

Since (x^{3} ln x)^{2} = x^{6} ln^{2} x, we choose u(x) = ln^{2} x and v′(x) = x^{6}. Then v(x) = x^{7}/7, and u′(x) = 2(ln x)/x. We have:

Vol = π ∫_{0}^{1} x^{6} ln^{2} x dx = π (\frac{1}{7}x^{7} ln^{2} x |_{0}^{1} − ∫_{0}^{1} \frac{1}{7}x^{7} · 2(ln x)\frac{1}{x} dx)

= π (0 − 0 − \frac{2}{7} ∫_{0}^{1} x^{6} ln x dx) .

We now have to use integration by parts a second time. (In general, to integrate x^{n} ln^{m} x, you’ll need to use integration by parts m times, each time lowering the power of ln x by one.) We obtain:

Vol = −\frac{2π}{7} ∫_{0}^{1} x^{6} ln x dx = −\frac{2π}{7} (\frac{1}{7}x^{7} ln x |_{0}^{1} − ∫_{0}^{1} \frac{1}{7}x^{7} · \frac{1}{x} dx)

= \frac{2π}{7} · \frac{1}{7} ∫_{0}^{1} x^{6} dx = \frac{2π}{343} = 0.01832.

Example 1.8. Find both coordinates of the center of mass of the flat plate bounded by the x- and y-axes and the curve y = e^{−x} in the first quadrant (out to infinity).

The denominator in \overline{x} and \overline{y} is the area, which is ∫_{0}^{∞} e^{−x}dx = 1, as we saw in Example 13.3. Thus,

\overline{x} = ∫_{0}^{∞} xe^{−x}dx = −xe^{−x} |_{0}^{∞} − ∫_{0}^{∞} (−e^{−x}) · 1 dx = 0 − 0 + ∫_{0}^{∞} e^{−x}dx = 1.

To compute \overline{y}, we must first write x in terms of y: y = e^{−x} ⟹ x = − ln y. In the y-direction, the shape is contained between y = 0 and y = 1. Thus,

\overline{y} = ∫_{0}^{1} y(− ln y)dy = − (\frac{1}{2}y^{2} ln y |_{0}^{1} − ∫_{0}^{1} \frac{1}{2}y^{2} · \frac{1}{y} dy) = \frac{1}{2} ∫_{0}^{1} y dy = \frac{1}{4}.

So the center of mass is at (1, 0.25).

Homework 1.

1. Find the anti-derivative of:

(a) x sin(ax + b); (b) x^{2} cos x; (c) arctan x; (d) x^{3}e^{x}; (e) x arctan x.

2. Find the center of mass of the uniform flat plate bounded by (a) the x- and y-axes and the curve e^{kx} in the second quadrant (out to −∞);

(b) the curves y = −x^{2} ln x and y = x^{2} ln x;

(c) the curves y = −x^{n} ln x and y = x^{n} ln x (express your answer in terms of n);

(d) the curves y = sin^{2}(πx) and y = − sin^{2}(πx) to the left of x = 1/4.

3. Find the volume of the container obtained by rotating x = y sin y around the y-axis between y = 0 and y = π/3.