b a y x y = f (x)

CS1BA1: INTEGRATION
1
Physical interpretation
• Differentiation ↔ slopes of curves.
• Integration ↔ areas under curves.
y
y = f (x)
a
b
x
Figure 1: Area under curve between (a, b) =
Rb
a
f (x) dx
• Terminology and notation:
Z
b
f (x) dx = the INTEGRAL of f from x = a to b.
a
2
Calculation of Integrals
The key to calculating integrals is the following
Integration reverses the action of differentiation
For instance, differentiating x3 gives 3x2 and integrating 3x2 gives x3 .
EXAMPLES:
(also see log tables)
f (x)
R
f (x) dx
x
e
ex
cos x
sin x
sin x
− cos x
tan x
log sec x
x (n 6= −1)
xn+1
n+1
1/x
log x
n
2
Differentiating the entry in the right hand column (integral) gives the corresponding entry in
the left hand column. For example:
Z
d
(sin x) = cos x
dx
d x
(e ) = ex
dx
d x5
1
= · 5x4 = x4
dx 5
5
⇒
cos x dx = sin x,
Z
⇒ ex dx = ex ,
Z
x5
.
⇒ x4 dx =
5
Although it is not essential to memorise the formulae for integrals, it is advisable to become
familiar with those contained in the Tables Book.
3
De nite and inde nite integrals
De nition:
1. When we are not speci c about where to start and stop integrating, we call the integral the
INDEFINITE INTEGRAL:
Z
f (x) dx,
which is a function of x.
2. When we de ne the upper and lower limits of integration (b and a), we call the integral the
DEFINITE INTEGRAL:
b
Z
f (x) dx which is a number.
a
3.1
Evaluation of de nite integrals
Given F (x) =
R
f (x) dx, we can evaluate the de nite integral
Z b
b
f (x) dx = F (x)
:= F (b) − F (a).
x=a
a
EXAMPLE 1:
Find
2
Z
4
Z
ex dx.
x dx,
1
2
SOLUTION:
x2
2
Z
x dx =
So
Z
(since
2
x dx =
1
d
dx
x2
2
=
1
· 2x = x )
2
x2 2
22
12
3
=
−
= .
2 x=1
2
2
2
Next,
Z
Z
2
4
ex dx = ex , so
4
ex dx = ex = e4 − e2 .
x=2
EXAMPLE 2:
Find
Z
1
2
1
dx,
x
Z
1
2
1
dx.
x2
3
SOLUTION:
Z
2
1
2
1
= log 2 − log 1.
dx = log x
x
x=1
To do the next example, notice that
2
Z
1
1
dx =
x2
2
Z
x−2 dx
1
However, for n 6= −1, we have
Z
xn dx =
xn+1
,
n+1
so in this instance, with n = −2, must have
Z
x−2+1
x−1
−1
x−2 dx =
=
=
.
−2 + 1
−1
x
Therefore
Z
1
2
−1 −1
−1 2
1
−1
1
=
dx =
−
=
+1= .
2
x
x x=1
2
1
2
2
3.2
Inde nite Integrals
3.3
Constant of Integration
Statements such as the following are often seen:
Z
cos x dx = sin x + C,
where C is a constant called the constant of integration. If we differentiate sin x + C, we obtain
cos x. This is because the derivative of any constant C is always 0. Thus
d
(sin x + C) = cos x is equivalent to
dx
Z
cos x dx = sin x + C.
4
Properties of Integration
1. INTEGRAL OF SUM = SUM OF THE INTEGRALS
Z
Z
Z
f (x) + g(x) dx = f (x) dx + g(x) dx
2. FACTOR CONSTANTS OUTSIDE THE INTEGRAL
Z
Z
cf (x) dx = c f (x) dx where c is any constant
EXAMPLE 3:
Compute
Z 2
3x − + 4 sin x dx.
x
1
2
4
SOLUTION:
Z
5
1
2
3x 2 − + 4 sin x dx
x
Z
Z
Z
1
−2
(P1)
=
3x 2 dx +
dx + 4 sin x dx
x
Z
Z
Z
1
1
(P2)
2
= 3 x dx − 2
dx + 4 sin x dx
x
x1/2+1
= 3.
− 2 log x + 4. − cos x
1/2 + 1
x3/2
− 2 log x − 4 cos x
3/2
=
3
=
2x3/2 − 2 log x − 4 cos x.
Negative Area
Sometimes de nite integrals are negative: how can this be reconciled with the notion that the
integral is the area under a curve? In fact, a negative area just corresponds to an area lying
below the X-axis.
y
y
c
x
b
x
a
y = f (x)
y = f (x)
Rb
a
f (x) dx =
Rc
a
f (x) dx +
Rb
c
f (x) dx.
Figure 2: In fact, a negative area just corresponds to an area lying below the X-axis. Moreover,
a negative de nite integral can arise from the sum of a positive and negative areas.
6
Integration by substitution
To differentiate
3
y = ex
we substitute u = x3 and differentiate using the chain rule. For instance
y
dy
⇒
du
dy
⇒
dx
= eu ,
u = x3 ,
du
= eu ,
= 3x2
dx
3
dy du
=
·
= eu .3x2 = 3x2 ex .
du dx
5
Therefore
3
3
3x2 ex =
d(ex
dx
)
Now, to calculate the integral
Z
3
3x2 ex dx
we apply the following substitution
u = x3 . Then
du
= 3x2 ,
dx
or du = 3x2 dx.
Now replace the x's under the integral (including dx) by the u's (and du):
Z
Z
3
2 x3
3x e dx =
ex .3x2 dx
Z
3
=
eu du = eu = ex ,
This technique is called Integration by substitution.
6.1
Guidelines for the best choice for u
Those following hints may be contradictory, and are not foolproof: however, they are suf cient
to tackle a large class of integrals, and with enough practice, one develops a feel for the correct
strategy:
• Let u = the "most complicated expression", particularly if that expression is the argument
of another function. This is the same choice of u that one would use if differentiating using
the Chain Rule (e.g., choosing u = x3 above).
• Let u = f (x) if f 0 (x) dx is also present under the integral.
• If the integrand (the function to integrate) is a quotient, let u = be the denominator (the
bottom).
6.2
Examples integration by substitution
(1.)
Z
x4
dx.
+2
x5
SOLUTION: Quotient: let
u = x5 + 2,
du
= 5x4
dx
so
⇒ du = 5x4 dx.
Replacing the x's by u's:
Z
x4
dx =
x5 + 2
x4 dx
x5 + 2
Z
Z
1/5 du
1
=
=
u−1 du
u
5
1
1
log u = log(x5 + 2).
=
5
5
Z
Always write the nal answer in terms of the original variable (in this case x).
Z
p
(2.)
x3 16 + x4 dx.
6
SOLUTION: The expression which is the argument of the square root is a good candidate for
substitution: let
du
= 4x3 ⇒ du = 4x3 dx.
dx
Look to arrange 4x3 dx(= du) in one group in the integral:
Z p
Z
p
3
4
16 + x4 .x3 dx
x 16 + x dx =
Z
Z
√ 1
1
u. du =
=
u1/2 du
4
4
1 u1+1/2
u3/2
(16 + x4 )3/2
=
=
=
.
4 1 + 1/2
6
6
u = 16 + x4 ,
A check: The derivative of the
so
nal answer should equal the integrand.
Z
(3.)
sin 6x dx.
SOLUTION: Let u = 6x, the argument of sin:
du
=6
dx
⇒
Z
1
1
du =
sin u du
6
6
1
1
· − cos u = − cos 6x.
6
6
Z
⇒
du = 6 dx.
Z
sin u ·
sin 6x dx =
=
Z
(4.)
SOLUTION: If f (x) = log x, then f 0 (x) dx =
1
x
log x
dx.
x
dx is present in the integrand. Thus put
1
dx
du
=
⇒ du =
.
dx
x
x
Z
Z
Z
log x
dx
u2
1
dx = log x ·
= u du =
= (log x)2 .
x
x
2
2
u = log x
⇒
(5.)
Z
sin x
dx.
2 + cos x
SOLUTION: Quotient: put u = 2 + cos x, so du = − sin x dx. Therefore, we have
Z
Z
Z
sin x
sin x dx
−du
dx =
=
2 + cos x
2 + cos x
u
= − log u = − log(2 + cos x).
(6.)
Z
5
x3 (x4 + 4) dx.
SOLUTION: Put u = x4 + 4, the argument of the fth power: Then
du
= 4x3
dx
⇒
du = 4x3 dx.
Group 4x3 dx(= du) together and substitute:
Z
Z
5
5
x3 (x4 + 4) dx = (x4 + 4) .x3 dx
Z
Z
1
1 u6
(x4 + 4)6
1
=
u5 . du =
u5 du =
=
.
4
4
4 6
24
7
Z
(7.)
sin x cos3 x dx.
SOLUTION: Put u = cos x, the argument of the cube: Then
du
= − sin x ⇒ du = − sin x dx.
dx
Group − sin x dx(= du) together and substitute:
Z
Z
Z
sin x cos3 x dx =
cos3 x. sin x dx = u3 . − du
Z
u4
cos4 x
= − u3 du = −
=−
.
4
4
Sometimes, our substitution
u = f (x)
does not entirely eliminate the original variable in the integral, and in these cases, we must
x in terms of u
Z
x
dx.
2x + 2
SOLUTION: Put u = 2x + 2, the argument of the square root. Thus
(8.)
√
du
= 2 ⇒ du = 2 dx.
dx
Now, we replace x (and dx) by u (and du):
Z
Z
Z
x
x 1
1
x
√
√
√ du.
dx =
du =
2
2
u
u
2x + 2
We now replace x by expressing it in terms of u: x = u−2
2 , so
Z
Z
1
1u−2
x
√
√ du
dx =
2
2
u
2x + 2
Z √
1
2
u1/2
1 u3/2
u− √
−2
du =
=
4
4 3/2
1/2
u
1 3/2
1
=
u − u1/2 = (2x + 2)3/2 − (2x + 2)1/2 .
6
6
Z
(9.)
tan5 x
dx.
cos2 x
SOLUTION: Notice that
d
tan x = sec2 x,
dx
so put u = tan x to obtain
dx
du = sec2 x dx =
.
cos2 x
Z
Z
tan5 x
u6
tan6 x
⇒
dx = u5 du =
=
.
2
cos x
6
6
Sometimes, our strategy requires some persistence in trying different substitutions:
Z
(10.)
cot x log(sin x) dx.
SOLUTION: Ultimately, we try
u = log(sin x)
du
1
=
cos x = cot x,
dx
sin x
⇒
so du = cot x dx, which gives
Z
Z
cot x log(sin x) dx =
u du =
u2
1
= log2 (sin x).
2
2
nd
8
6.3
Harder substitution
6.3.1
Type 1
Substituting u = f (x) does not entirely eliminate the original variable (x).
Write x in terms of u, i.e., x = f −1 (u).
DETAILS
1: Put u = most complicated bit
(same substitution as if differentiating using the Chain
Rule), and nd dx in terms of x and du.
2: Substitute u for the complicated expression and replace dx in the integral. Rewrite any
x's left in the integral in terms of u.
3: Calculate the integral with respect to the new variable u.
• REMEMBER: If there is a du at the end of the integral, everything under the integral must
be written in terms of u.
EXAMPLE 1: Find
Z
x5
p
1 + x3 dx.
SOLUTION:
STEP 1: Let u = 1 + x3 . Then
du
= 3x2
dx
STEP 2:
Z
x5
du = 3x2 dx
⇒
⇒ dx =
du
.
3x2
Z
Z
p
√ du
1
1
u 2 x3 du.
1 + x3 dx = x5 u 2 =
3x
3
Now write x3 in terms of u ⇒ x3 = u − 1:
STEP 3:
Z
5
x
p
1+
x3
1
dx =
3
Z
√
u (u − 1) du
| {z }
=x3
Z
u5/2
u3/2
−
5/2
3/2
1
3
=
5
3
2u 2
2u 2
2
2
−
=
(1 + x3 ) 2 − (1 + x3 ) 2 .
15
9
15
9
u3/2 − u1/2 du =
5
1
3
=
3
EXAMPLE 2: Find
x9 − x4
dx.
(x5 − 2)3/2
Z
SOLUTION:
STEP 1: Let u = x5 − 2. Then
du
= 5x4
dx
STEP 2:
Z
du = 5x4 dx
⇒
x9 − x4
dx =
(x5 − 2)3/2
Z
⇒ dx =
x9 − x4 du
1
· 4 =
3/2
5x
5
u
Z
du
.
5x4
x5 − 1
du.
u3/2
9
Now write x5 in terms of u ⇒ x5 = u + 2:
STEP 3:
Z
6.3.2
Z
1
x9 − x4
(u + 2) − 1
dx
=
du
5
(x5 − 2)3/2
u3/2
Z
1
1 u−1/2
u1/2
−3/2
−1/2
=
u
+u
du =
+
5
5 −1/2
1/2
1
2
2 1
2 1
−2
+ (x5 − 2) 2 .
= − u− 2 + u 2 = √
5
5
5 x5 − 2 5
Type 2
If the integrand contains
√
a2 − x2 , it is often worthwhile to
Let x = a sin u. Then
√
a2 − x2 = a cos u.
Details:
1: Put x = a sin u. Then
q
a2 (1 − sin2 u)
√
= a2 cos2 u = a cos u
p
a2 − x2 =
and
dx
= a cos u,
du
we have dx = a cos u du.
2: Replace all the x's and dx and calculate the integral with respect to u.
3: At the end, write u in terms of x:
u = sin−1
x
.
a
EXAMPLE 3: Find
Z
SOLUTION:
STEP 1: Let x = 3 sin u. Then
√
√
9 − x2 = 3 cos u and
dx
= 3 cos u
du
STEP 2:
1
dx.
9 − x2
Z
√
1
dx =
9 − x2
⇒ dx = 3 cos u du.
Z
1
· 3 cos u du = u.
3 cos u | {z }
=dx
STEP 3: Write u in terms of x . . .
x = 3 sin u ⇒ sin u =
. . . and nd the integral in terms of x
Z
√
x
x
⇒ u = sin−1
3
3
1
x
dx = sin−1 .
3
9 − x2
EXAMPLE 4: Find
Z p
25 − 4x2 dx.
10
SOLUTION: This time we don't quite have a term in the form
√
a2 − x2 . However, notice that
p
p
25 − 4x2 = 52 − (2x)2 .
STEP 1: IDEA: let 2x play the rôle of x and set 2x = 5 sin u. Then we have
p
25 − 4x2
p
52 − (2x)2
p
=
52 − (5 sin u)2 = 5 cos u
=
and since x = 5/2 sin u,
dx
5
= cos u
du
2
⇒ dx =
5
cos u du.
2
STEP 2:
Z p
Z
Z
5
25
2
25 − 4x dx = 5 cos u · cos u du =
cos2 u du.
2
2
STEP 3: To calculate this integral we have recourse to the Tables Book (p.42)
Z
so
cos2 x dx =
1
2
x+
1
sin 2x ,
2
Z
Z p
25
2
cos2 u du
25 − 4x dx =
2
25 1
25
25
1
=
=
u+
sin 2u.
u + sin 2u
2 2
2
4
8
Write u in terms of x: x = 5/2 sin u implies
sin u =
2x
5
and u = sin−1
2x
.
5
Next, we express sin 2u in terms of x: to do this, recall that
sin 2u = 2 cos u sin u
. . . Tables p.10
p
= 2 1 − sin2 u sin u . . . cos2 u = 1 − sin2 u
s
2
2x
2x
.
= 2 1−
·
5
5
Thus
Z p
25
25
25 − 4x2 dx =
u+
sin 2u
4
8
s
2
25
25
2x
2x
−1 2x
=
· sin
+
·2 1−
·
4
5
8
5
5
r
25
2x 5x
4x2
=
sin−1
+
1−
.
4
5
2
25
6.3.3
TYPE ∞
Neat tricks, particular to the given problem. The following is a good example, and a tough
question.
EXAMPLE 5: Calculate
Z
x1/4
1
dx.
+ x3/4
11
SOLUTION: The trick here is to let u = x1/4 , so
x = u4 and
Z
x1/4
1
+ x3/4
dx
= 4u3 ⇒ dx = 4u3 du. Thus
du
Z
Z
1
4u2
3
dx =
·
4u
du.
du
=
u + u3
1 + u2
By long division, we obtain
1
u2
=1−
2
1+u
1 + u2
so
Z
1
dx = 4
1/4
x + x3/4
Z
1
1−
du
1 + u2
Z
du
= 4u − 4
.
1 + u2
The Log tables again come to our aid: on p.41 we have
Z
1
dx = tan−1 x,
1 + x2
so
Z
1
dx = 4u − 4 tan−1 u
x1/4 + x3/4
= 4x1/4 − 4 tan−1 x1/4 .
7
Integration by parts
We have seen how integration by substitution corresponds to the chain rule for differentiation. Is
there a rule of integration corresponding to the product rule? Yes! Integration by parts is useful
for calculating the integrals of products:
Z
Z
u dv = uv − v du
(IBP)
EXAMPLE 1: Find
Z
xe2x dx.
SOLUTION: We will choose u = x, dv = e2x dx so that
Z
Z
xe2x dx = u dv → L.H.S of (IBP).
Find terms on R.H.S of (IBP). Need: du and v
u=x
⇒
du
= 1 ⇒ du = dx
dx
=⇒ DIFFERENTIATE u to GET du.
dv = e2x dx
Z
⇒v=
e2x dx =
1 2x
e .
2
=⇒ INTEGRATE dv to GET v.
• Substitute u, v, du, dv into (IBP):
Z
Z
Z
2x
xe dx = u dv = uv − v du
Z
1
1 2x
1
1 1
= x. e2x −
e dx = xe2x − · e2x .
2
2
2
2 2
12
EXAMPLE 2: Find
R
x cos x dx. SOLUTION:
• Choose u = x, dv = cos x dx, so
Z
Z
x cos x dx = u dv
→ L.H.S of (IBP).
Find terms on R.H.S of (IBP). Need: du and v
u=x
du
= 1 ⇒ du = dx
dx
Z
⇒ v = cos x dx = sin x.
⇒
dv = cos x dx
• Substitute u, v, du, dv into (IBP):
Z
Z
Z
x cos x dx = u dv = uv − v du
Z
= x. sin x − sin x dx = x sin x + cos x.
EXERCISE: Check by differentiating the answer.
7.1
Chosing u and dv
EXAMPLE 3: Find
Z
x2 log x dx.
SOLUTION: In this question, we could choose
u = x2
or
u = log x.
Which should one try?
u = x2 : Then dv = log x dx, so
Z
v=
log x dx.
This isn't in the tables book. Abandon this line.
u = log x: Then dv = x2 dx, so
Z
du
1
1
1
= , so du = dx.
v = x2 dx = x3 , and
3
dx
x
x
Substitute into the (IBP) formula:
Z
Z
Z
2
x log x dx = u dv = uv − v du
Z
1
1 3 1
= log x · x3 −
x · dx
3
3
x
Z
1 3
1
1
1
=
x log x −
x2 dx = x3 log x − x3 .
3
3
3
9
EXERCISE: Check this by differentiating.
How should u be chosen in general? Choose u in the order
L − logarithm
A − algebraic: powers of x, e.g. x, x3
T − trigonometric
E − exponential
13
The guideline has been used in all the examples:
Z
1.
xe2x dx x
A, e2x
E
LATE ⇒ u = x (A), so dv = e2x dx.
Z
2.
x cos x dx x
A, cos x
T
LATE ⇒ u = x (A), so dv = cos x dx.
3.
Z
x2 log x dx x2
A, log x
L
LATE ⇒ u = log x (L), so dv = x2 dx.
This rule gives very reliable guidance, but occasionally doesn't work. Sometimes we must
integrate by parts successively to get an answer:
EXAMPLE 4: Find
Z
x2 cos x dx.
SOLUTION:
• LATE ⇒ u = x2 (A), so dv = cos x dx (T).
• Differentiate u, integrate dv:
Z
du
= 2x,
dx
v=
cos x dx = sin x.
• Substitute u, v, du, dv into (IBP):
Z
Z
Z
x2 cos x dx = u dv = uv − v du
Z
Z
= x2 . sin x − sin x.2x dx = x2 sin x − 2 x sin x dx.
• Can't calculate the last integral directly: use IBP again.
• For
Z
x sin x dx LATE ⇒ u = x(A), so dv = sin x dx (T).
• Differentiate u, integrate dv:
du
= 1,
dx
Z
sin x dx = − cos x.
v=
• Substituting into (IBP):
Z
Z
x sin x dx = −x cos x −
• Replacing this in (2) gives
Z
− cos x dx = −x cos x + sin x.
x2 cos x dx = x2 sin x − 2(−x cos x + sin x)
= x2 sin x + 2x cos x − 2 sin x.
EXAMPLE 5: Find
Z
SOLUTION: • e2x
E, cos x
e2x cos x dx.
T, so by LATE u = cos x, so dv = e2x dx. Thus
Z
du
1
= − sin x, v = e2x dx = e2x .
dx
2
(1)
14
• Substitute u, v, du, dv into (IBP):
Z
2x
e
=
=
Z
Z
u dv = uv − v du
Z
1
1 2x
cos x. e2z −
e . − sin x dx
2
2
Z
1 2x
1
e2x sin x dx. (2)
e cos x +
2
2
cos x dx =
• No improvement: the last integral looks as hard as the
rst one. Try integrating by parts
again, and see what happens.
• Use LATE again: u = sin x, dv = e2x dx
du
⇒
= cos x,
dx
Z
v=
e2x dx =
1 2x
e .
2
• Using (IBP) gives
Z
e2x sin x dx =
=
Z
1 2x
1
e cos x dx
sin x e2x −
2
2
Z
1 2x
1
e sin x −
e2x cos x dx. (*)
2
2
Call the desired integral I, and substitute back into (2) . . .
1
1
I = e2x cos x +
2
2
1
1 2x
e sin x − I
2
2
|
{z
}
=(∗)
. . . and now tidy up and solve for I:
I=
1 2x
1
1
e cos x + e2x sin x − I
2
4
4
⇒
I=
1
2 2x
e cos x + e2x sin x.
5
5
EXERCISE: Check this by differentiating.
8
Integration of rational functions
A rational function is just a ratio of two polynomials:
e.g.,
To integrate such functions, we
x(x + 2)
.
(x − 1)2 (x + 1)
rst decompose the whole fractional term into two partial frac-
tions. These fractions will be simpler rational functions which are easier to integrate. We illustrate
the method by an example.
EXAMPLE 1: Find
Z
x(x + 2)
dx.
(x − 1)2 (x + 1)
15
8.1
Partial fraction decomposition
We rst must decompose
x(x + 2)
.
(x − 1)2 (x + 1)
The two distinct roots in the denominator (x = 1, x = −1), result in two partial fractions. The
denominator of P.F. is a factor of the denominator which has the same roots. Here, partial
fractions have denominators x + 1 and (x − 1)2 . The numerator of P.F. is an expression in x which
has highest power in x one less than that in the denominator. Thus the partial fractions are
Bx + C
(x − 1)2
A
,
x+1
where A, B, C are undetermined constants.
Therefore, for some A, B, C we have
x(x + 2)
A
Bx + C
.
=
+
2
(x − 1) (x + 1)
x + 1 (x − 1)2
(2)
How do we nd A, B, C?
STEP 1: Take the R.H.S. of (2) and bring it to a common denominator. By collecting like powers
of x, simplify the expression until it has the same form as the L.H.S.
Bx + C
A(x − 1)2 + (Bx + C)(x + 1)
A
+
=
x + 1 (x − 1)2
(x + 1)(x − 1)2
2
A(x − 2x + 1) + (Bx2 + Bx + Cx + C)
=
(x + 1)(x − 1)2
2
(A + B)x + (−2A + B + C)x + (A + C)
=
.
(x + 1)(x − 1)2
The L.H.S. is given by
x(x + 2)
x2 + 2x
=
.
(x − 1)2 (x + 1)
(x − 1)2 (x + 1)
STEP 2: Both expressions have the same denominator, so they must have the same numerator
...
x2 + 2x
| {z }
numerator LHS
= (A + B)x2 + (−2A + B + C)x + (A + C)
{z
}
|
numerator RHS
. . . so the coef cients of like powers of x in the numerators are equal:
x2 :
(I)
1=A+B
(II)
2 = −2A + B + C
x:
const. :
(III)
0=A+C
STEP 3: Solve these equations by inspection:
From (III), C = −A, and from (I) B = 1 − A. Substituting these expressions into (II) gives
2 = −2A + (1 − A) + −A
⇒ 2 = −4A + 1.
Thus A = −1/4. Putting this result into (I), (III) gives B = 1 − A = 5/4, C = −A = 1/4.
Therefore the decomposition is
x(x + 2)
1 1
1 5x + 1
=−
+
.
(x − 1)2 (x + 1)
4 x + 1 4 (x − 1)2
16
8.2
Integration of rational functions
Now we can integrate to get:
Z
Z
Z
x(x + 2) dx
1
1
1
5x + 1
dx.
=−
dx +
2
(x − 1) (x + 1)
4
x+1
4
(x − 1)2
(3)
1st integral in (3):
1
−
4
Z
1
dx
x+1
Let u = x + 1, so du = dx and thus
Z
Z
1
1
1
1
1
−
dx = −
du = − log(x + 1).
4
x+1
4
u
4
2nd integral in (3):
1
4
Z
5x + 1
dx
(x − 1)2
(*) Let u = x − 1, so du = dx, and thus
Z
Z
1
1
5x + 1
5x + 1
dx
=
du.
2
4
(x − 1)
4
u2
(*) Now write x in terms of u, replace x in the integral, and then integrate: we have u = x − 1, so
x = u + 1, and thus
1
4
Z
Z
Z
5x + 1
1
5(u + 1) + 1
1
5u + 6
dx =
du =
du
2
2
(x − 1)
4
u
4
u2
Z
Z
5
1
6
5
6 u−1
=
du +
u−2 du = log u + ·
4
u
4
4
4 −1
6
5
6
5
log u −
= log(x − 1) −
=
4
4u
4
4(x − 1)
Substituting this into (3) gives
Z
5
6
1
x(x + 2) dx
= log(x − 1) −
− log(x + 1).
(x − 1)2 (x + 1)
4
4(x − 1) 4
8.3
Another example
EXAMPLE 2: Find
Z
x2 + 14
dx.
(x + 4)2 (x − 2)
SOLUTION:
STEP 0: Decomposition is
x2 + 14
A
Bx + C
=
+
.
2
(x + 4) (x − 2)
x − 2 (x + 4)2
STEP 1: Bring the RHS to a common denominator and gather like powers of x together in the
numerator:
A
Bx + C
x2 + 14
=
+
(x + 4)2 (x − 2)
x − 2 (x + 4)2
A(x + 4)2 + (Bx + C)(x − 2)
=
(x − 2)(x + 4)2
2
A(x + 8x + 16) + Bx2 − 2Bx + Cx − 2C
=
(x − 2)(x + 4)2
2
(A + B)x + (8A − 2B + C)x + (16A − 2C)
=
.
(x − 2)(x + 4)2
17
STEP 2: Now the coef cients of like powers of x in the numerator of the left and right hand side
are equal, so that
x2 :
x:
const. :
(I)
1=A+B
(II)
0 = 8A − 2B + C
(III)
14 = 16A − 2C
STEP 3: Solve these equations by inspection:
From (III), 2C = 16A − 14, so that C = 8A − 7. Using (I), we have B = 1 − A. Substituting these
expressions into (II) gives
0 = 8A − 2(1 − A) + 8A − 7
⇒ 0 = 18A − 9.
Thus A = 1/2. Putting this result into (I), (III) gives B = 1 − A = 1/2 and C = 8A − 7 = −3.
Integrating this decomposition gives
Z
x2 + 14
dx =
(x + 4)2 (x − 2)
Z
1/2
dx +
x−2
Z
1
2x
−3
dx.
(x + 4)2
1st integral in (4):
1
2
Z
1
dx
x−2
Let u = x − 2, so du = dx and thus
Z
Z
1
1
1
1
1
1
dx =
du = log u = log(x − 2).
2
x−2
2
u
2
2
2nd integral in (4):
Z
1
2x
−3
dx
(x + 4)2
(*) Let u = x + 4, so du = dx, and thus
Z
1
2x
−3
dx =
(x + 4)2
Z
1
2 2x
−3
u2
du.
(*) Now write x in terms of u and replace x in the integral: we have u = x + 4, so x = u − 4.
Z
1
2x
−3
dx =
(x + 4)2
Z
1
2 (u
− 4) − 3
du.
u2
(*) Integrate
Z
1
2x
Z 1
−3
2u − 5
dx
=
du.
2
(x + 4)
u2
Z
Z
1
1
1
u−1
=
du − 5 u−2 du = log u − 5
2
u
2
−1
1
1
5
1
log u + 5 = log(x + 4) +
.
=
2
u
2
x+4
• Substituting this into (4) gives
Z
x2 + 14
1
1
5
dx = log(x − 2) + log(x + 4) +
.
2
(x + 4) (x − 2)
2
2
x+4
(4)