Techniques of Integration

A. Integration by parts

Recall the rule (f(x)g(x))' = f'(x)g(x) + f(x)g'(x). Now suppose that we try to find the indefinite integral

h ( x ) d x ,

where h ( x ) can be written in the form f(x)g'(x). It may perhaps be easier to find

\int g(x)f'(x)\,dx

than to find

h ( x ) d x .

By linearity,

\int (f(x)g(x))'\,dx = \int f'(x)g(x)\,dx + \int f(x)g'(x)\,dx,

or

f(x)g(x) = \int f'(x)g(x)\,dx + \int h(x)\,dx,

i.e.,

\int h(x)\,dx = f(x)g(x) - \int f'(x)g(x)\,dx.

Thus an indefinite integral of h ( x ) is found by subtracting from f ( x ) g ( x ) an indefinite integral of f'(x)g(x).

Examples

Example 1. x sin x d x .

Let f ( x ) = x , g ( x ) = cos x . Then f'(x) = 1, g'(x) = \sin x, and substituting gives

\begin{aligned} \int x \sin x\,dx &= -x\cos x - \int(-\cos x)\,dx\\ &= -x\cos x + \int \cos x\,dx \\ &= -x\cos x + \sin x. \end{aligned}
Example 2. log x d x .

Let f ( x ) = log x , g ( x ) = x . Then f'(x) = \dfrac{1}{x}, g'(x) = 1, and

log x d x = x log x 1 x x d x = x log x x .
Example 3.

Sometimes it is necessary to perform the procedure several times. It often happens that the original integral will recur with a coefficient other than 1, in which case we can solve for it. For instance, consider e x sin x d x . Let f ( x ) = e x , g ( x ) = cos x . Then

e x sin x d x = e x cos x + e x cos x d x .

In e x cos x d x , let h ( x ) = e x , k ( x ) = sin x . Then e^x \cos x = h(x)k'(x), and we have

e x cos x d x = e x sin x e x sin x d x .

Thus

e x sin x d x = e x cos x + e x sin x e x sin x d x .

Solving for e x sin x d x , we find

e x sin x d x = e x 2 ( sin x cos x ) .

Note. If at the second stage we had used e^x \cos x = h(x)k'(x) with h ( x ) = cos x , k ( x ) = e x , the resulting equation would have been a trivial identity; thus if such an equation results, one should attempt a different decomposition.

B. Integration by substitution

Certain integrals become much simpler if one variable is replaced by a new one. Here one uses in place of the old variable a new one which is, in the range of integration, a strictly increasing or decreasing differentiable function of the old one. If u is the new variable and x the old one, we then have u'(x) = \dfrac{1}{x'(u)}, from the differentiation of inverse functions.

Suppose we are to find an indefinite integral f ( x ) d x . That is, we are to find a function F ( x ) such that F'(x) = f(x). It may be that x is a strictly increasing or decreasing differentiable function of some new variable u , say x = x ( u ) , such that f ( x ( u ) ) , which we shall call g ( u ) , is a simpler function to integrate. Then we might try to find a function G ( u ) such that G'(u) = g(u). If u ( x ) is the inverse function to x ( u ) , we might try H ( x ) = G ( u ( x ) ) as an answer to our original problem. But

H'(x) = G'(u(x)) \cdot u'(x) = g(u(x)) \cdot u'(x) = f(x) \cdot u'(x),

which differs from f ( x ) by the factor u'(x) = \dfrac{1}{x'(u)}. Therefore let us try instead to find a function G ( u ) such that G'(u) = g(u) \cdot x'(u). Then set F ( x ) = G ( u ( x ) ) . We have then

F'(x) = G'(u(x)) \cdot u'(x) = g(u) \cdot x'(u) \cdot u'(x) = g(u) = f(x),

or F ( x ) is a function of the desired type.

There is a formal device for remembering this calculation, as follows: in f ( x ) d x , write d x = d x d u d u . If f ( x ) = g ( u ) , then

f ( x ) d x = g ( u ) d x d u d u .

Of course, the answer on the right is a function of u , for which we must then substitute in terms of x . Note that the integral on the right is just \int g(u)x'(u)\,du, or our G ( u ) . Several examples will illustrate the technique.

Examples

Example 4.

e x 1 + e 2 x d x .

Let u = e x , x = log u . Then x'(u) = \dfrac{1}{u}. We must then find

u 1 + u 2 1 u d u = 1 1 + u 2 d u = arctan u .

Our desired indefinite integral is thus arctan ( e x ) .

Example 5. x 3 1 x 2 d x .

Let x = sin u (this is possible, since 1 1 x 2 is only defined if 1 < x < 1 ). Then

u = \arcsin x,\qquad x'(u) = \cos u,

and 1 x 2 = cos u , since π 2 < u < π 2 when u is in the range of arcsin x . Thus we must find

\begin{aligned} \int \frac{\sin^3 u}{\cos u}\cdot \cos u\,du &= \int \sin^3 u\,du\\ &= \int \sin u(1-\cos^2 u)\,du \\ &= -\cos u - \int \cos^2 u \sin u\,du. \end{aligned}

Now let v = cos u . Then v'(u) = -\sin u, u'(v) = -\dfrac{1}{\sin u}, and we have, at least for 0 < u < π 2 ( ) ,

\begin{aligned} \int \cos^2 u \sin u\,du &= \int v^2 \cdot \sin u \cdot \left(-\frac{1}{\sin u}\right)dv \\ &= -\frac{1}{3}v^3 \\ &= -\frac{1}{3}\cos^3 u. \end{aligned}

Hence

sin 3 u d u = cos u + cos 3 u 3 ,

and

\begin{aligned} \int \frac{x^3}{\sqrt{1-x^2}}\,dx &= \frac{\cos^3(\arcsin x)}{3} - \cos(\arcsin x) \\ &= \frac{(1-x^2)^{3/2}}{3} - \sqrt{1-x^2}. \end{aligned}

Since this function does have x 3 1 x 2 as derivative whenever 1 < x < 1 , we have not lost anything at those points in the process, such as (**), where we might have done so.

C. Partial fractions

Suppose we want to find an indefinite integral of f ( x ) g ( x ) , where f ( x ) and g ( x ) are polynomials (such functions are called rational functions). We may assume that the degree of f ( x ) (the highest power of x appearing) is less than the degree of g ( x ) ; for if not, we can divide f ( x ) by g ( x ) and get

f ( x ) g ( x ) = P ( x ) + h ( x ) g ( x ) ,

where P ( x ) is a polynomial and h ( x ) , the remainder in the division of f ( x ) by g ( x ) , is of degree less than that of g ( x ) . Suppose also that we can factor g ( x ) into products of polynomials of the forms ( x a ) and x 2 + b x + c , b 2 4 c < 0 . (It is always possible to do this, although it is usually difficult to determine the a 's, b 's and c 's.) Once this factorization is accomplished, we begin a procedure which enables us to integrate f ( x ) g ( x ) .

What we do is to separate the factors of the above forms in g ( x ) and try to write f ( x ) g ( x ) as a sum of quotients of polynomials. The denominators will be the separate factors of g ( x ) and the numerators will have degrees less than those of the denominators. If a factor x a or x 2 + b x + c divides g ( x ) more than once, say n times, we have to allow for n terms, one having the factor as denominator to each of the powers 1 , 2 , , n . In each of these terms, it is still sufficient to assume that the numerator is a constant or of degree one (in case the denominator is a power of x 2 + b x + c ). For instance, if we had something of the form

d x 3 + e x 2 + f x + g ( x 2 + b x + c ) 2 = d x 3 + e x 2 ( x 2 + b x + c ) 2 + f x + g ( x 2 + b x + c ) 2 ,

we could divide d x 3 + e x 2 by x 2 + b x + c to get a quotient P ( x ) of degree 1 and a remainder R ( x ) of degree at most 1. Then

d x 3 + e x 2 ( x 2 + b x + c ) 2 = P ( x ) x 2 + b x + c + R ( x ) ( x 2 + b x + c ) 2 ,

so that the expression is reduced to the form which we shall consider.

Let g ( x ) = ( x a 1 ) m 1 ( x a r ) m r ( x 2 + b 1 x + c 1 ) n 1 ( x 2 + b s x + c s ) n s . Let n = m 1 + + m r + 2 n 1 + + 2 n s . Then f ( x ) has degree less than n , and we can write f ( x ) = d n 1 x n 1 + d n 2 x n 2 + + d 1 x + d 0 , where some of the d 's may be 0. Now we try to write

\begin{aligned} \frac{f(x)}{g(x)} = &\frac{A_{1,1}}{x-a_1} + \frac{A_{1,2}}{(x-a_1)^2} + \dots + \frac{A_{1,m_1}}{(x-a_1)^{m_1}} \\ &+ \frac{A_{2,1}}{x-a_2} + \dots + \frac{A_{r,m_r}}{(x-a_r)^{m_r}}\\ &+ \frac{B_{1,1}x+C_{1,1}}{x^2+b_1x+c_1} + \dots + \frac{B_{1,n_1}x+C_{1,n_1}}{(x^2+b_1x+c_1)^{n_1}} \\ &+ \dots + \frac{B_{s,n_s}x+C_{s,n_s}}{(x^2+b_sx+c_s)^{n_s}}. \end{aligned}

Here the A , B , C are unknowns, and there are

m 1 + + m r + 2 n 1 + + 2 n s = n

of them in all. If we put the right-hand side of the equation over a common denominator, this denominator is g ( x ) . Therefore the numerator must be f ( x ) ; so the constant term of the numerator must be d 0 , the coefficient of x must be d 1 , etc. This gives us n equations in the n unknowns A , B , C , which we solve. Substituting these solutions in the right-hand side of the equation, it remains only to integrate that expression term-wise. Now

\begin{aligned} &\int \frac{1}{x-a}\,dx = \log(x-a); \\ &\int \frac{1}{(x-a)^n}\,dx = \frac{-1}{n-1}\cdot\frac{1}{(x-a)^{n-1}}, \quad n>1. \end{aligned}

Since x 2 + b x + c = ( x + b 2 ) 2 + ( c b 2 4 ) , c b 2 4 > 0 , we can substitute x + b 2 for x and assume that x 2 + b x + c is simply of the form x 2 + c , c > 0 .

\begin{aligned} &\int \frac{x}{x^2+c}\,dx = \frac{1}{2}\log(x^2+c); \\ &\int \frac{1}{x^2+c}\,dx = \frac{1}{\sqrt{c}}\arctan\left(\frac{x}{\sqrt{c}}\right);\\ &\int \frac{x}{(x^2+c)^n}\,dx = \frac{-1}{2(n-1)}\cdot\frac{1}{(x^2+c)^{n-1}}, \quad n>1; \end{aligned}

and

1 ( x 2 + c ) n d x

can be handled by the substitution x = c tan u , or u = arctan ( x c ) .

Examples

Example 6.

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

Then

1 ( x 2 ) ( x + 3 ) = A x 2 + B x + 3 ,

or

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

Then A + B = 0 , 3 A 2 B = 1 , A = 1 5 , B = 1 5 , and

1 ( x 2 ) ( x + 3 ) d x = 1 5 log ( x 2 ) 1 5 log ( x + 3 ) .
Example 7. 4 x + 3 ( x 1 ) ( x 2 + 2 ) 2 d x .

Write

4 x + 3 ( x 1 ) ( x 2 + 2 ) 2 = A x 1 + B x + C x 2 + 2 + D x + E ( x 2 + 2 ) 2 .

We get the equations

A + B = 0   (coefficient of  x 4 ) B + C = 0   (coefficient of  x 3 ) 4 A + 2 B C + D = 0   (coefficient of  x 2 ) 2 B + 2 C D + E = 4   (coefficient of  x ) 4 A 2 C E = 3   (constant term).

They give:

A = 7 9 , B = 7 9 = C , D = 7 3 , E = 5 3 .

Thus we must find

\begin{aligned} \frac{7}{9}&\int \frac{1}{x-1}\,dx - \frac{7}{9}\int \frac{x}{x^2+2}\,dx - \frac{7}{9}\int \frac{1}{x^2+2}\,dx \\ &\qquad- \frac{7}{3}\int \frac{x}{(x^2+2)^2}\,dx + \frac{5}{3}\int \frac{1}{(x^2+2)^2}\,dx\\ &= \frac{7}{9}\log(x-1) - \frac{7}{18}\log(x^2+2) - \frac{7}{9\sqrt{2}}\arctan\frac{x}{\sqrt{2}} \\ &\qquad + \frac{7}{6}\cdot\frac{1}{x^2+2} + \frac{5}{3}\int \frac{1}{(x^2+2)^2}\,dx. \end{aligned}

In the last integral, let x = 2 tan u . Then x'(u) = \sqrt{2}\sec^2 u, and we must find

1 4 sec 4 u 2 sec 2 u d u = 1 ( x 2 + 2 ) 2 d x ,

or

1 2 2 cos 2 u d u .

Now cos 2 u = 2 cos 2 u 1 , or cos 2 u = 1 2 ( 1 + cos 2 u ) . Thus we must find

\begin{aligned} \frac{1}{4\sqrt{2}}\int (1+\cos 2u)\,du &= \frac{1}{4\sqrt{2}}u + \frac{1}{8\sqrt{2}}\sin 2u\\ &= \frac{1}{4\sqrt{2}}\arctan\frac{x}{\sqrt{2}} + \frac{1}{4\sqrt{2}}\cdot\frac{\tan u}{\sec^2 u} \\ &= \frac{1}{4\sqrt{2}}\arctan\frac{x}{\sqrt{2}} + \frac{1}{4\sqrt{2}}\cdot\frac{\frac{x}{\sqrt{2}}}{\frac{x^2}{2}+1}\\ &= \frac{1}{4\sqrt{2}}\arctan\frac{x}{\sqrt{2}} + \frac{1}{4}\cdot\frac{x}{x^2+2}. \end{aligned}

The complete answer is then

\begin{aligned} \frac{7}{9}&\log(x-1) - \frac{7}{18}\log(x^2+2) - \frac{7}{9\sqrt{2}}\arctan\frac{x}{\sqrt{2}} \\ &+ \frac{7}{6}\cdot\frac{x}{x^2+2} + \frac{5}{12\sqrt{2}}\arctan\frac{x}{\sqrt{2}} + \frac{5}{12}\cdot\frac{x}{x^2+2}. \end{aligned}

By a suitable substitution, one can reduce integrals of rational functions in sin x and cos x to the problem of integrating rational functions of a new variable u . The trick is to let u = tan x 2 . Then x = 2 arctan u , and

x'(u) = \frac{2}{1+u^2}.

Also,

sin x = 2 sin x 2 cos x 2 = 2 tan x 2 sec 2 x 2 = 2 u 1 + u 2 ,

and

\begin{aligned} \cos x &= 2\cos^2\frac{x}{2} - 1 \\ &= \frac{2}{1+\tan^2\frac{x}{2}} - 1 \\ &= \frac{2}{1+u^2} - 1 \\ &= \frac{1-u^2}{1+u^2}. \end{aligned}

Thus, for instance,

1 sin x + cos x d x = 1 2 u 1 + u 2 + 1 u 2 1 + u 2 2 1 + u 2 d u = 2 2 u + 1 u 2 d u .

Now 2 u + 1 u 2 = ( u ( 1 + 2 ) ) ( u ( 1 2 ) ) , and we can apply the technique of partial fractions to complete the work.

Exercises

Exercise 1.

Courant: p. 225, ex. 1-11; p. 234, ex. 1-14.

Oakley: p. 100, ex. 1-12.

Sherwood and Taylor, Calculus, 1st ed.: pp. 202, 206, 215, 218, 222, 229, 231, 377, 380.