= x · sin x ’ (’ cos x) + C

= x · sin x + cos x + C.

Math Note: Observe that we can check the answer in the last example just by

differentiation:

d

[x · sin x + cos x + C] = 1 · sin x + x · cos x ’ sin x = x · cos x.

dx

The choice of u and v in the integration by parts technique is signi¬cant. We

selected u to be x because then du will be 1 dx, thereby simplifying the integral.

199

CHAPTER 7 Methods of Integration

If we had instead selected u = cos x and dv = x dx then we would have found

that v = x 2 /2 and du = ’ sin x dx and the new integral

x2

v du = (’ sin x) dx

2

is more complicated.

EXAMPLE 7.2

Calculate the integral

x 2 · ex dx.

SOLUTION

Keeping in mind that we want to choose u and v so as to simplify the integral,

we take u = x 2 and dv = ex dx. Then

u(x) = x 2 du = u (x) dx = 2x dx

v(x) = ex dv = v (x) dx = ex dx

Then the integration by parts formula tells us that

x 2 ex dx = u dv = uv ’ v du = x 2 · ex ’ ex · 2x dx. (—)

We see that we have transformed the integral into a simpler one (involving

x · ex instead of x 2 · ex ), but another integration by parts will be required. Now

we take u = 2x and dv = ex dx. Then

u(x) = 2x du = u (x) dx = 2 dx

v(x) = ex dv = v (x) dx = ex dx

So equation (—) equals

x 2 · ex ’ u dv = x 2 · ex ’ u · v ’ v du

= x 2 · ex ’ 2x · ex ’ ex · 2 dx

= x 2 · ex ’ 2x · ex + 2ex + C.

We leave it to the reader to check this last answer by differentiation.

You Try It: Calculate the integral

x 2 log x dx.

200 CHAPTER 7 Methods of Integration

EXAMPLE 7.3

Calculate

2

log x dx.

1

SOLUTION

This example differs from the previous ones because now we are evalu-

ating a de¬nite integral (i.e., an integral with numerical limits). We still use

the integration by parts formula, keeping track of the numerical limits of

integration.

We ¬rst notice that, on the one hand, the integrand is not a product. On the

other hand, we certainly do not know an antiderivative for log x. We remedy

the situation by writing log x = 1 · log x. Now the only reasonable choice is to

take u = log x and dv = 1 dx. Therefore

u(x) = log x du = u (x) dx = (1/x) dx

v(x) = x dv = v (x) dx = 1 dx

and

2 2

1 · log x dx = u dv

1 1

2 2

= uv ’ v du

1

1

2 2 1

= (log x) · x ’ x· dx

x

1

1

2

= 2 · log 2 ’ 1 · log 1 ’ 1 dx

1

2

= 2 · log 2 ’ x

1

= 2 · log 2 ’ (2 ’ 1)

= 2 · log 2 ’ 1.

You Try It: Evaluate

4

x 2 · sin x dx.

0

We conclude this section by doing another de¬nite integral, but we use a slightly

different approach from that in Example 7.3.

201

CHAPTER 7 Methods of Integration

EXAMPLE 7.4

Calculate the integral

2π

sin x cos x dx.

π/2

SOLUTION

We use integration by parts, but we apply the technique to the corresponding

inde¬nite integral. We let u = sin x and dv = cos x dx. Then

u(x) = sin x du = u (x) dx = cos x dx

v(x) = sin x dv = v (x) dx = cos x dx

So

sin x cos x dx = u dv

= uv ’ v du

= (sin x) · (sin x) ’ sin x cos x dx.

At ¬rst blush, it appears that we have accomplished nothing. For the new

integral is just the same as the old integral. But in fact we can move the new

integral (on the right) to the left-hand side to obtain

sin x cos x dx = sin2 x.

2

Throwing in the usual constant of integration, we obtain

12

sin x cos x dx =sin x + C.

2

Now we complete our work by evaluating the de¬nite integral:

2π

2π 1 1 1

sin x cos xdx = sin2 x = sin2 2π ’ sin2 (π/2) = ’ .

2 2 2

π/2 π/2

We see that there are two ways to treat a de¬nite integral using integration by

parts. One is to carry the limits of integration along with the parts calculation. The

other is to do the parts calculation ¬rst (with an inde¬nite integral) and then plug

in the limits of integration at the end. Either method will lead to the same solution.

You Try It: Calculate the integral

2

e’x cos 2x dx.

0

202 CHAPTER 7 Methods of Integration

7.2 Partial Fractions

7.2.1 INTRODUCTORY REMARKS

The method of partial fractions is used to integrate rational functions, or quotients

of polynomials. We shall treat here some of the basic aspects of the technique.

The ¬rst fundamental observation is that there are some elementary rational

functions whose integrals we already know.

I Integrals of Reciprocals of Linear Functions An integral

1

dx

ax + b

with a = 0 is always a logarithmic function. In fact we can calculate

1 1 1 1

dx = dx = log |x + b/a|.

ax + b x + b/a

a a

II Integrals of Reciprocals of Quadratic Expressions An integral

1

dx,

c + ax 2

when a and c are positive, is an inverse trigonometric function. In fact we can use

what we learned in Section 6.6.3 to write

1 1 1

dx = dx

c + ax 2 1 + (a/c)x 2

c

1 1

= √ dx

1 + ( a/cx)2

c

√

1 1

a

=√ √ √ dx

1 + ( a/cx)2

ac c

1

= √ arctan a/cx + C.

ac

III More Integrals of Reciprocals of Quadratic Expressions An integral

1

dx

ax 2 + bx + c

203

CHAPTER 7 Methods of Integration

with a > 0, and discriminant b2 ’ 4ac negative, will also be an inverse trigono-

metric function. To see this, we notice that we can write

b

ax 2 + bx + c = a x 2 + x + +c

a

b2 b2

b

=a x + x+ 2 + c’

2

4a

4a

a

2

b2

b

=a· x+ + c’ .

2a 4a

Since b2 ’ 4ac < 0, the ¬nal expression in parentheses is positive. For simplicity,

let » = b/2a and let γ = c ’ b2 /(4a). Then our integral is

1

dx.

γ + a · (x + »)2

Of course we can handle this using II above. We ¬nd that

1 1

dx = dx

ax 2 + bx + c γ + a · (x + »)2

√

1 a

=√ · arctan √ · (x + ») + C.

aγ γ

IV Even More on Integrals of Reciprocals of Quadratic Expressions

Evaluation of the integral

1

dx

ax 2 + bx + c

when the discriminant b2 ’ 4ac is ≥ 0 will be a consequence of the work we do

below with partial fractions. We will say no more about it here.

7.2.2 PRODUCTS OF LINEAR FACTORS

We illustrate the technique of partial fractions by way of examples.

EXAMPLE 7.5

Here we treat the case of distinct linear factors.

Let us calculate

1

dx.

x 2 ’ 3x + 2

204 CHAPTER 7 Methods of Integration

SOLUTION

We notice that the integrand factors as

1 1

= (—)

.

(x ’ 1)(x ’ 2)

x 2 ’ 3x + 2

[Notice that the quadratic polynomial in the denominator will factor precisely

when the discriminant is ≥ 0, which is case IV from Subsection 7.2.1.] Our

goal is to write the fraction on the right-hand side of (—) as a sum of simpler

fractions. With this thought in mind, we write

1 A B

= + ,

(x ’ 1)(x ’ 2) x’1 x’2

where A and B are constants to be determined. Let us put together the two

fractions on the right by placing them over the common denominator (x ’ 1)—

(x ’ 2). Thus

A(x ’ 2) + B(x ’ 1)

1 A B

= + = .

(x ’ 1)(x ’ 2) x’1 x’2 (x ’ 1)(x ’ 2)

The only way that the fraction on the far left can equal the fraction on the far

right is if their numerators are equal. This observation leads to the equation

1 = A(x ’ 2) + B(x ’ 1)

or

0 = (A + B)x + (’2A ’ B ’ 1).

Now this equation is to be identically true in x; in other words, it must hold for

every value of x. So the coef¬cients must be 0.

At long last, then, we have a system of two equations in two unknowns:

A+B =0

’2A ’ B ’ 1 = 0

Of course this system is easily solved and the solutions found to be A =

’1, B = 1. We conclude that

’1

1 1

= + .

(x ’ 1)(x ’ 2) x’1 x’2

What we have learned, then, is that

’1

1 1

dx = dx + dx.

x’1 x’2

x 2 ’ 3x + 2

205

CHAPTER 7 Methods of Integration

Each of the individual integrals on the right may be evaluated using the

information in I of Subsection 7.2.1. As a result,

1

dx = ’ log |x ’ 1| + log |x ’ 2| + C.

x 2 ’ 3x + 2

You Try It: Calculate the integral

4 dx

.

x 2 + 5x + 4

1

Now we consider repeated linear factors.

EXAMPLE 7.6

Let us evaluate the integral

dx

.

x 3 ’ 4x 2 ’ 3x + 18

SOLUTION

In order to apply the method of partial fractions, we ¬rst must factor the

denominator of the integrand. It is known that every polynomial with real

coef¬cients will factor into linear and quadratic factors. How do we ¬nd this

factorization? Of course we must ¬nd a root. For a polynomial of the form

x k + ak’1 x k’1 + ak’2 x k’2 + · · · + a1 x + a0 ,

any integer root will be a factor of a0 . This leads us to try ±1, ±2, ±3, ±6, ±9

and ±18. We ¬nd that ’2 and 3 are roots of x 3 ’ 4x 2 ’ 3x + 18. In point of

fact,

x 3 ’ 4x 2 ’ 3x + 18 = (x + 2) · (x ’ 3)2 .

An attempt to write

1 A B

= +

x+2 x’3

x 3 ’ 4x 2 ’ 3x + 18

will not work. We encourage the reader to try this for himself so that he will

understand why an extra idea is needed.

In fact we will use the paradigm

1 A B C

= + + .

x + 2 x ’ 3 (x ’ 3)2

x 3 ’ 4x 2 ’ 3x + 18

Putting the right-hand side over a common denominator yields

A(x ’ 3)2 + B(x + 2)(x ’ 3) + C(x + 2)

1

= .

x 3 ’ 4x 2 ’ 3x + 18 x 3 ’ 4x 2 ’ 3x + 18

206 CHAPTER 7 Methods of Integration

Of course the numerators must be equal, so

1 = A(x ’ 3)2 + B(x + 2)(x ’ 3) + C(x + 2).

We rearrange the equation as

(A + B)x 2 + (’6A ’ B + C)x + (9A ’ 6B + 2C ’ 1) = 0.

Since this must be an identity in x, we arrive at the system of equations

A+B =0

’6A ’ B + C =0

9A ’ 6B + 2C ’ 1 = 0

This system is easily solved to yield A = 1/25, B = ’1/25, C = 1/5.

As a result of these calculations, our integral can be transformed as follows:

’1/25

1 1/25 1/5

dx = dx + dx + dx.

x+2 x’3

x 3 ’ 4x 2 ’ 3x + 18 (x ’ 3)2

The ¬rst integral equals (1/25) log |x + 2|, the second integral equals ’(1/25)

log |x ’ 3|, and the third integral equals ’(1/5)/(x ’ 3).

In summary, we have found that

log |x + 2| log |x ’ 3|

1 1

dx = ’ ’ + C.

5(x ’ 3)

x 3 ’ 4x 2 ’ 3x + 18 25 25

You Try It: Evaluate the integral

4 x dx

.

x 3 + 5x 2 + 7x + 3

2

7.2.3 QUADRATIC FACTORS

EXAMPLE 7.7

Evaluate the integral

x dx

.

x 3 + 2x 2 + x + 2

SOLUTION

Since the denominator is a cubic polynomial, it must factor. The factors of

the constant term are ±1 and ±2. After some experimentation, we ¬nd that

x = ’2 is a root and in fact the polynomial factors as

x 3 + 2x 2 + x + 2 = (x + 2)(x 2 + 1).

207

CHAPTER 7 Methods of Integration

Thus we wish to write the integrand as the sum of a factor with denominator

(x + 2) and another factor with denominator (x 2 + 1). The correct way to do

this is

Bx + C

x x A

= = +2 .

x+2

x 3 + 2x 2 + x + 2 (x + 2)(x 2 + 1) x +1

We put the right-hand side over a common denominator to obtain

A(x 2 + 1) + (Bx + C)(x + 2)

x

= .

x 3 + 2x 2 + x + 2 x 3 + 2x 2 + x + 2