MT1186 Chapter 4 Integration

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 56

Chapter 4

Integration

Essential reading

(For full publication details, see Chapter 1.)


4
Binmore and Davies (2002) Sections 10.2, parts of 10.3–10.4, 10.5–10.9.

Anthony and Biggs (1996) Chapters 25 and 26.

Further reading

Simon and Blume (1994) Appendix A4.

Adams and Essex (2010) Sections 5.5–5.7, 6.1–6.2 and parts of 6.3.

Aims and objectives

The objectives of this chapter are as follows.

To introduce the idea of an integral and see how it can be found using various
techniques.

To use integrals to find areas.

To see how integrals can be used in economics-based subjects.


Specific learning outcomes can be found near the end of this chapter.

4.1 Introduction: What is integration?


In Chapter 2, we introduced differentiation and saw that a function, f (x), could be
differentiated with respect to x to yield its derivative, which we denoted by
df
or f 0 (x).
dx
And, in particular, we saw how to find such derivatives by using the rules of
differentiation and some standard derivatives. Now, given a function, f (x), we want to
make sense of what it means to find the indefinite integral of this function with respect
to x, which is denoted by Z
f (x) dx.

115
4. Integration

In such cases, as we are integrating the function f (x) with respect to x, we call it the
integrand. And, similarly to what we saw before, we will see how to find such integrals
by using the rules of integration and some standard integrals. In particular, the standard
integrals will be closely related to our standard derivatives since the key idea behind our
method for finding integrals will be the idea that integration is the process that
‘undoes’ (or ‘reverses’) the process of differentiation, i.e. the process of indefinite
integration can be thought of as antidifferentiation and the resulting indefinite integral
can be thought of as an antiderivative.
Consider the functions F (x) and f (x) where we know that f (x) is the derivative1 of
F (x), i.e.
4 dF
= f (x).
dx
Now, using the idea that integration ‘undoes’ differentiation, i.e. if we integrate f (x)
with respect to x we are looking for a function, F (x), whose derivative is f (x), we can
see that Z
f (x) dx must be, more or less, given by F (x).

In such cases, we say that F (x) is an antiderivative of f (x) as opposed to, say, the
indefinite integral.
However, you may wonder why we say that the function, F (x), that we found above is
‘an’, as opposed to ‘the’, antiderivative of f (x). The reason for this is that if, instead of
the function F (x) we had the function F (x) + c where c is a constant, then its
derivative would still be f (x), i.e.
 
d
F (x) + c = f (x),
dx
and so, using the reasoning above, we would find that
Z
f (x) dx can also, more or less, be given by F (x) + c,

where c is a constant. That is, F (x) + c is also an antiderivative of f (x) for this
constant c.

Example 4.1 Show that 4x2 and 4x2 + 1 are both antiderivatives of 8x.

4x2 is an antiderivative of 8x as we can differentiate 4x2 to get 8x. But, similarly, we


can see that 4x2 + 1 is also an antiderivative of 8x as we can differentiate 4x2 + 1 to
get 8x.

As such, because this works for any constant c we add to F (x), we say that the
indefinite integral gives us a whole family of antiderivatives which only differ by a
constant, i.e. the choice of c. In this way, we say that indefinite integration, i.e. the
process of finding Z
f (x) dx,

is antidifferentiation, i.e. it seeks all the functions F (x) + c that can be differentiated to
yield f (x) and, as such, every one of these functions will be an antiderivative of f (x).
1
We say that it is the derivative because differentiation always yields exactly one answer.

116
4.2. How to find indefinite integrals

Z
Example 4.2 What is 8x dx?

We saw in Example 4.1 that 4x2 is an antiderivative of 8x. This means that
Z
8x dx = 4x2 + c,

where c is an arbitrary (i.e. any) constant. Notice that this works because
differentiating 4x2 + c we get 8x.

Generally speaking then, we have the following.


4
If F (x) is a function whose derivative is the function f (x), then we have
Z
f (x) dx = F (x) + c,

where c is an arbitrary constant. In particular, we call the


function, f (x), the integrand as it is what we are integrating,
function, F (x), an antiderivative as its derivative is f (x),
constant, c, a constant of integration which is completely arbitrary,2 and
Z
integral, f (x) dx, an indefinite integral since, in the result, c is arbitrary.

Now that we have the idea, let’s see how we’re going to actually find the indefinite
integrals of the functions that commonly occur in this course.

4.2 How to find indefinite integrals


The previous section told us how to find indefinite integrals using the antiderivatives,
but now we want to explore a more convenient way of finding them. The key idea is
that we introduce standard integrals which tell us how to integrate the basic functions
that we saw in Chapter 1. Once we know how to integrate these, the rules of integration
will allow us to integrate combinations of these functions.

4.2.1 Standard integrals


In Example 4.2, we used the idea that indefinite integration is antidifferentiation to
show that the function f (x) = 8x has an indefinite integral given by
Z
8x dx = 4x2 + c,

where c is an arbitrary constant. We now state some results that will allow us to find
the indefinite integrals of our other basic functions.
2
As we can add any constant to F (x) to account for the fact that F (x) + c, for any constant c ∈ R,
is also an antiderivative.

117
4. Integration

Power functions

If n 6= −1, we have Z
nxn+1
x dx = + c,
n+1
where c is an arbitrary constant and this works because
 n+1 
d x (n + 1)xn
+c = + 0 = xn .
dx n + 1 n+1
In particular, if n = 0, we have
4 Z Z
1 dx = x0 dx = x + c,

and this works because the derivative of x + c is 1.


However, if we have n = −1, we have
Z Z
−1 1
x dx = dx = ln |x| + c,
x
where we need the modulus sign in ln |x| as x may be negative but the logarithm
function is only defined for x > 0. This works because, if x > 0, we have |x| = x and so
d ln |x| d ln(x) 1
= = ,
dx dx x
whereas if x < 0, we have |x| = −x and so
d ln |x| d ln(−x) −1 1
= = = ,
dx dx −x x
if we use the chain rule.

Exponential and logarithmic functions

If we are using e, we have Z


ex dx = ex +c,

where c is an arbitrary constant and this works because


 
d
e +c = ex .
x
dx
However, there is no nice standard integral for ln x and so we’ll see how to find
Z
ln x dx,

when we encounter integration by parts in Example 4.20.


If we have another base, a, the standard integrals are not so simple. But, we can see that
Z
ax
ax dx = + c,
ln a

118
4.2. How to find indefinite integrals

where c is an arbitrary constant since, using the result from Activity 2.9, we have
 x 
d a ax ln a
+c = + 0 = ax .
dx ln a ln a

However, there is also no nice standard integral for loga x and so we’ll see how to find
Z
loga x dx,

in Activity 4.12 where we will use the change of base formula once we can integrate ln x.
4
Sine and cosine functions

For the sine and cosine function we find that


Z Z
sin x dx = − cos x + c and cos x dx = sin x + c,

where c is an arbitrary constant. The former works because


 
d
− cos x + c = −(− sin x) + 0 = sin x,
dx

whereas the latter works because the derivative of sin x is cos x.

4.2.2 The basic rules of integration


In Section 1.1.2, we saw that there are several standard ways of making new functions
from old ones and, in Section 2.2.2, we saw how the rules of differentiation could be
used to differentiate these new functions. Here we will see how we can use standard
integrals, i.e. the integrals of our basic functions, and rules of integration to integrate
the new functions that are created from these basic ones in these standard ways. We
start with the most straightforward of these which allows us to integrate linear
combinations of functions.

The linear combination rule

If k and l are constants, this allows us to integrate the linear combination,


kf (x) + lg(x), of two functions f (x) and g(x). It states that
Z Z Z
[kf (x) + lg(x)] dx = k f (x) dx + l g(x) dx.

Indeed, this gives us three more basic rules straightaway, i.e. the

constant multiple rule: If k is a constant and f (x) is a function, then


Z Z
kf (x) dx = k f (x) dx.

119
4. Integration

sum rule: If f (x) and g(x) are functions, then


Z Z Z
[f (x) + g(x)] dx = f (x) dx + g(x) dx.

difference rule: If f (x) and g(x) are functions,


Z Z Z
[f (x) − g(x)] dx = f (x) dx − g(x) dx.

Activity 4.1 Derive the constant multiple, sum and difference rules from the linear
combination rule.
4
Activity 4.2 Use antiderivatives to show that the linear combination rule works.

Example 4.3 Using these rules we see that:


Z 1
!
− 21 x2 1
−3x dx = −3 1 + c = −6x 2 + c by the constant multiple rule,
2

Z h i 1 3 
3
2 1 x3 x 2 3
x +x 2 dx = + 3 +c= x + 2x 2 + c by the sum rule,
3 2
3
Z
[sin x − cos x] dx = − cos x − sin x + c by the difference rule, and
Z  
3 x
− 4 e dx = 3 ln |x| − 4 ex +c by the linear combination rule,
x
where c is an arbitrary constant.

So, in the case of linear combinations of functions such as these, we see that the integral
of the linear combination is given by the linear combination of the integrals.

Activity 4.3 Use the rules above to integrate the following functions with respect
to x.
3
(a) − 3 cos x, (b) ex + cos x, (c) 3 sin x − .
x

We now look at the other rules of integration, i.e. the ones that will allow us to
integrate other combinations of functions. But, unlike what we saw with the rules of
differentiation in Section 2.2.2, we shall see that these are harder to apply.

4.2.3 Integration by substitution


Integration by substitution is a way of dealing with integrands that involve the
composition of two functions and, as such, it is closely related to the chain rule of
differentiation. To see how it works, we will start by seeing how integration by
substitution is related to the chain rule and then we will describe how to apply this
rule. We will then apply this rule in some simple examples and then some harder ones.

120
4.2. How to find indefinite integrals

Why integration by substitution works

We start by noting that the chain rule for differentiation tells us that if
h(x) = (f ◦ g)(x) = f (g(x)),
then we write h as f (g) so that, on differentiating, we get
dh df dg
= .
dx dg dx
But, because of this we can see that

h(x) = (f ◦ g)(x) = f (g(x)) is an antiderivative of


dh
=
df dg
,
4
dx dg dx
and so, we have Z
df dg
dx = f (g(x)) + c,
dg dx
which is the basis of integration by substitution. However, this is quite hard to apply
and so, as a useful way of applying this rule, we think of
Z
dg df
dg as dx, so that we have dg = f (g) + c,
dx dg
and this is the key to the method that we shall be using here.

How to integrate by substitution

We can now see how to apply integration by substitution. The basic idea is that, if you
are given an integrand that involves a composition of two functions, this rule of
integration sometimes allows you to turn it into an easier integral by making a
substitution. That is:

The
Z integral involves the derivative of a composition and has the form
f 0 (g(x))g 0 (x) dx.

Write f 0 (g(x)) as f 0 (g) and g 0 (x)dx as dg. This should give you the easier integral
Z
f 0 (g) dg.

Find this integral and replace all occurrences of g with g(x) to get your final
answer.
Now, to make this clearer, let’s look at some examples.

Some simple applications of integration by substitution

Easy integrations by substitution involve an integrand which is nothing more than a


simple composition of two functions and so there can be no doubt about which function
should be ‘g’. To see this, let’s consider what happens when we want to integrate a
simple composition which involves the function 3x + 1.

121
4. Integration

Z
Example 4.4 Find (3x + 1)2 dx.

dg
Taking g = 3x + 1 we have = 3 and so dg = 3 dx, i.e. dx = 31 dg. Hence,
dx
substitution gives
Z Z   Z
2 2 1 1 1 g3 (3x + 1)3
(3x + 1) dx = g dg = g 2 dg = · +c= + c,
3 3 3 3 9

where c is an arbitrary constant.


4
Z
1
Example 4.5 Find dx.
3x + 1
dg
Taking g = 3x + 1 we have = 3 and so dg = 3 dx, i.e. dx = 31 dg. Hence,
dx
substitution gives
Z Z   Z
1 1 1 1 1 1
dx = dg = g −1 dg = ln |g| + c = ln |3x + 1| + c,
3x + 1 g 3 3 3 3

where c is an arbitrary constant.

Z
Example 4.6 Find e3x+1 dx.

dg
Taking g = 3x + 1 we have = 3 and so dg = 3 dx, i.e. dx = 31 dg. Hence,
dx
substitution gives
Z Z   Z
3x+1 g 1 1 1 1
e dx = e dg = eg dg = eg +c = e3x+1 +c,
3 3 3 3

where c is an arbitrary constant.

In particular, observe what changes in these examples and what stays the same. Indeed,
just for comparison, we can see what would happen if we had a composition which is
like the one in Example 4.4 but it now involves the function 4x + 7 instead of 3x + 1.
Z
Example 4.7 Find (4x + 7)2 dx.

dg
Taking g = 4x + 7 we have = 4 and so dg = 4 dx, i.e. dx = 41 dg. Hence,
dx
substitution gives
Z Z   Z
2 2 1 1 1 g3 (4x + 7)3
(4x + 7) dx = g dg = g 2 dg = · +c= + c,
4 4 4 3 12

where c is an arbitrary constant.

122
4.2. How to find indefinite integrals

Z Z
1
Activity 4.4 In a similar manner, find dx and e4x+7 dx.
4x + 7

Note that in all of these examples, the substitution works because we have
g(x) = ax + b and hence
dg 1
=a =⇒ dg = a dx =⇒ dg = dx,
dx a
where a 6= 0 and b are constants. Indeed, as we end up with an integrand involving a1 ,
which is a constant, it can be moved out of the integral using the constant multiple rule
of integration. So, if our integrand is a composition, i.e. f (g(x)), and g(x) is a linear 4
function, i.e. it has the form ax + b where a 6= 0 and b are constants, this kind of
substitution will always work and this leads to the general result that
Z
1
f (ax + b) dx = F (ax + b) + c,
a
where F (x) is an antiderivative of f (x) and c is an arbitrary constant.

Activity 4.5 Suppose that a 6= 0 and b are constants. Use this result to find an
expression for Z
(ax + b)n dx,

when n is a constant. Also find expressions for


Z Z Z
ax+b
e dx, sin(ax + b) dx and cos(ax + b) dx.

What happens if a = 0?

Activity 4.6 Using the expressions you found in Activity 4.5, verify your answers
to Activity 4.4.

Some less simple applications of integration by substitution

We will also see slightly harder integrations by substitution where the integrand
involves a composition of two functions multiplied by another function. Although, even
in these cases, there can be little doubt about which function should be ‘g’. To see this,
let’s consider what happens when we want to integrate a simple composition which
involves the function x2 + 1.
Z
Example 4.8 Find (x2 + 1)2 x dx.

Taking g = x2 + 1 we have g 0 (x) = 2x and so dg = 2x dx, i.e. x dx = 12 dg. Hence,


substitution gives
Z Z   Z
2 2 2 1 1 1 g3 (x2 + 1)3
(x + 1) x dx = g dg = g 2 dg = · +c= + c,
2 2 2 3 6

123
4. Integration

i.e. the extra ‘x’ in the integrand was actually needed for the substitution g = x2 + 1
to work.
Z
x
Example 4.9 Find dx.
x2 + 1
Taking g = x2 + 1 we have g 0 (x) = 2x and so dg = 2x dx, i.e. x dx = 12 dg. Hence,
substitution gives
Z Z   Z
x 1 1 1 1 1
2
dx = dg = g −1 dg = ln |g| + c = ln |x2 + 1| + c,
x +1 g 2 2 2 2
4
i.e. the extra ‘x’ in the integrand was, again, needed for the substitution g = x2 + 1
to work.
Z
2 +1
Example 4.10 Find x ex dx.

Taking g = x2 + 1 we have g 0 (x) = 2x and so dg = 2x dx, i.e. x dx = 12 dg. Hence,


substitution gives
Z Z Z   Z
x2 +1 x2 +1 g 1 1 1 1 2
xe dx = e x dx = e dg = eg dg = eg +c = ex +1 +c,
2 2 2 2

i.e. the extra ‘x’ in the integrand was, again, needed for the substitution g = x2 + 1
to work.

In particular, observe what changes in these examples and what stays the same. Indeed,
just for comparison, we can see what would happen if we had a composition which is
like the one in Example 4.8 but it now involves the function 3x2 + 7 instead of x2 + 1.
Z
Example 4.11 Find (3x2 + 7)2 x dx.

Taking g = 3x2 + 7 we have g 0 (x) = 6x and so dg = 6x dx, i.e. x dx = 61 dg. Hence,


substitution gives
Z Z   Z
2 2 2 1 1 1 g3 (3x2 + 7)3
(3x + 7) x dx = g dg = g 2 dg = · +c= + c,
6 6 6 3 18

i.e. the extra ‘x’ in the integrand was actually needed for the substitution
g = 3x2 + 7 to work.
Z Z
x 2 +7
Activity 4.7 In a similar manner, find 2
dx and x e3x dx.
3x + 7

To summarise, it is worth noting that in all of these examples, the substitution works
because we have g(x) = ax2 + b and hence
dg
= 2ax =⇒ dg = 2ax dx,
dx
124
4.2. How to find indefinite integrals

where a 6= 0 and b are constants. But, 2ax is not a constant and so we can not deal with
this by taking it out of the integral as we did in the last set of examples. However, in
these cases, the substitution still works because we have
dg 1
= 2ax =⇒ dg = 2ax dx =⇒ dg = xdx,
dx 2a
and there is also an ‘x’ in the integrand to facilitate the transition from ‘dx’ to ‘dg’.
Indeed, in the absence of this extra ‘x’, the substitution would produce a more
complicated integral and we would not be able to proceed!

Integration by substitution more generally 4


The general lesson that we should be drawing from the last two sets of examples is that
integration by substitution works when we have an integrand which is the product of

the composition of two functions f 0 (g(x)), and

a constant multiple of g 0 (x).


The first of these enables us to replace f 0 (g(x)) with f 0 (g) and the second enables us to
replace dx with some constant multiple of dg. Having done this, the substitution has
turned a hard integral into an easier one and we can proceed. Let’s now consider some
more complicated examples.
Z
Example 4.12 Find (x3 + x2 )7 (3x2 + 2x) dx.

Here the composition is (x3 + x2 )7 and so we take g = x3 + x2 . As such, we have

dg
= 3x2 + 2x,
dx
which is the other part of the product in the integrand, i.e. this substitution will
work. Thus, we see that
dg = (3x2 + 2x) dx,
and so the substitution gives
Z Z
3 2 7 2 7 g8 (x3 + x2 )8
(x + x ) (3x + 2x) dx = g dg = +c= + c.
8 8

Here, the extra ‘3x2 + 2x’ in the integrand was needed for the substitution
g = x3 + x2 to work.

Z
2x + 2
Example 4.13 Find dx.
x2 + 2x + 2
Here the composition is (x2 + 2x + 2)−1 and so we take g = x2 + 2x + 2. As such, we
have
dg
= 2x + 2,
dx

125
4. Integration

which is the other part of the product in the integrand, i.e. this substitution will
work. Thus, we see that
dg = (2x + 2) dx,
and so the substitution gives
Z Z
2x + 2 1
dx = dg = ln |g| + c = ln |x2 + 2x + 2| + c.
x2 + 2x + 2 g
Here, the extra ‘2x + 2’ in the integrand was needed for the substitution
g = x2 + 2x + 2 to work.
4 Z
3 +3x+7
Example 4.14 Find (x2 + 1) ex dx.

3 +3x+7
Here the composition is ex and so we take g = x3 + 3x + 7. As such, we have
dg
= 3x2 + 3 = 3(x2 + 1),
dx
which is a constant multiple of the other part of the product in the integrand, i.e.
this substitution will work. Thus, we see that
1
dg = 3(x2 + 1) dx =⇒ dg = (x2 + 1) dx,
3
and so the substitution gives
Z Z   Z
2 x3 +3x+7 g 1 1 1 1 3
(x + 1) e dx = e dg = eg dg = eg +c = ex +3x+7 +c.
3 3 3 3

Here, the extra ‘x2 + 1’ in the integrand was needed for the substitution
g = x3 + 3x + 7 to work.

Z
Activity 4.8 Find x sin(x2 ) dx.

Integration by substitution with trigonometric functions

Sometimes we can straightforwardly apply what we have just seen to find integrals that
involve compositions of trigonometric functions as the following examples show.
Z
Example 4.15 Find sin2 x cos x dx.

Here the composition is sin2 x and so we take g = sin x. As such, we have


dg
= cos x,
dx
which is the other part of the product in the integrand, i.e. this substitution will

126
4.2. How to find indefinite integrals

work. Thus, we see that


dg = cos x dx,
and so the substitution gives
Z Z
g3 1
sin x cos x dx = g 2 dg =
2
+ c = sin3 x + c.
3 3
Here, of course, the extra ‘cos x’ in the integrand was needed for the substitution
g = sin x to work.

Z 4
Activity 4.9 Find cos2 x sin x dx.

Indeed, as the next example shows, this kind of substitution allows us to find another
useful result.

Z
Example 4.16 Find tan x dx.

In (1.1), we saw that


sin x
tan x = ,
cos x
which means that the composition is (cos x)−1 and so we take g = cos x. As such, we
have
dg
= − sin x,
dx
which, up to a minus, is the other part of the product in the integrand, i.e. this
substitution will work. Thus, we see that

dg = − sin x dx,

and so the substitution gives


Z Z Z
sin x dg
tan x dx = dx = − = − ln |g| + c = − ln | cos x| + c.
cos x g
Here, of course, the extra ‘sin x’ in the integrand was needed for the substitution
g = cos x to work.

Z
Activity 4.10 Find cot x dx.

However, not every trigonometric substitution is so easy to spot as the next example
shows.

Z
dx
Example 4.17 Find .
(x + a)2 + b2

127
4. Integration

Here, for reasons that will soon become apparent, we make the substitution
x + a = b tan θ. As such, differentiating both sides of this expression with respect to
θ, we have
dx
= b sec2 θ =⇒ dx = b sec2 θ dθ.

This means that our integral becomes
Z Z Z Z
dx b sec2 θ sec2 θ dθ
= 2
dθ = dθ = ,
(x + a)2 + b2 b2 tan θ + b2 b sec2 θ b

if we use the trigonometric identity tan2 θ + 1 = sec2 θ from (1.4). This then gives us
4 Z  
dθ θ 1 −1 x+a
= + c = tan + c,
b b b b

since x + a = b tan θ and where c is an arbitrary constant. Thus, we have found that
Z  
dx 1 −1 x+a
= tan + c,
(x + a)2 + b2 b b

which is another useful result.


Z
dx
Activity 4.11 Find . (Hint: Complete the square in the
x2 + 2x + 2
denominator.)

We will see other examples of how trigonometric identities can be used when finding
integrals in Section 4.2.6.

4.2.4 Integration by parts


Integration by parts is a way of dealing with integrands which involve the product of
two functions and, as such, it is closely related to the product rule of differentiation. To
see how it works, we will start by seeing how integration by parts is related to the
product rule and then we will describe how to apply this rule. We will then see some
examples of how it can be applied.

Why integration by parts works

We start by noting that the product rule for differentiation tells us that
d
[f (x)g(x)] = f 0 (x)g(x) + f (x)g 0 (x).
dx
So, integrating both sides with respect to x, we get
Z Z Z
d
[f (x)g(x)] dx = f (x)g(x) dx + f (x)g 0 (x) dx,
0
dx
which, on noting that integration ‘undoes’ differentiation, yields
Z Z
f (x)g(x) = f (x)g(x) dx + f (x)g 0 (x) dx.
0

128
4.2. How to find indefinite integrals

Rearranging this then gives us


Z Z
f (x)g (x) dx = f (x)g(x) − f 0 (x)g(x) dx,
0

and we call this new rule integration by parts.

How to integrate by parts

Observe that integration by parts allows us to write one integral in terms of another
and so a successful application of this rule requires a ‘good choice’ of f (x) and g 0 (x), i.e.
one where it is straightforward to integrate g 0 (x) and the new integral is easier to find
4
than the old one. That is:
Z
The integral involves a product of two functions and has the form f (x)g 0 (x) dx.

Choose f (x) and g 0 (x) so that we can differentiate f (x) to get f 0 (x) and
straightforwardly integrate g 0 (x) to get g(x).
Z
Apply the formula and make sure that the new integral, f 0 (x)g(x) dx, is easier to
integrate.

If it is, proceed. If it is not, then you have been unwise in your choice of f (x) and
g 0 (x).
Let’s look at some simple examples of how it works.

Z
Example 4.18 Find x ex dx.

Here we have a product and, to apply integration by parts, we choose

f (x) = x and g 0 (x) = ex ,

so that differentiating f (x) and integrating g 0 (x) we get

f 0 (x) = 1 and g(x) = ex ,

where we have suppressed the arbitrary constant from the integration. Applying the
rule then gives,
Z Z Z
x e dx = (x)(e ) − (1)(e ) dx = x e − ex dx,
x x x x

and, clearly, the new integral is easier to find. Thus, finding this integral, we get
Z Z
x e dx = x e − ex dx = x ex − ex +c = (x − 1) ex +c,
x x

as the answer.

129
4. Integration

Warning! Observe that if we had chosen f (x) and g 0 (x) differently, we would have
got
f (x) = ex and g 0 (x) = x,
so that differentiating f (x) and integrating g 0 (x) we would have got

x2
f 0 (x) = ex and g(x) = ,
2
where we have suppressed the arbitrary constant from the integration. Applying the
rule then gives,
4 Z
x x
 2 Z
x x
 2
x x 2 ex 1
Z
x e dx = (e ) − (e ) dx = − x2 ex dx,
2 2 2 2

and this is bad because the new integral is harder to find.

Z
Example 4.19 Find x ln x dx.

Here we have a product and, to apply integration by parts, we choose

f (x) = ln x and g 0 (x) = x,

so that differentiating f (x) and integrating g 0 (x) we get

1 x2
f 0 (x) = and g(x) = ,
x 2
where we have suppressed the arbitrary constant from the integration. Applying the
rule then gives,
Z  2 Z   2 Z
x 1 x x2 x
x ln x dx = (ln x) − dx = ln x − dx,
2 x 2 2 2

and, clearly, the new integral is easier to find. Thus, finding this integral, we get
Z Z
x2 x x2 x2
x ln x dx = ln x − dx = ln x − + c,
2 2 2 4
as the answer.

Warning! Observe that if we had chosen f (x) and g 0 (x) differently, we would have
got
f (x) = x and g 0 (x) = ln x.
This would have been bad because we can’t integrate g 0 (x) = ln x to get g(x) at the
moment.

However, having said that, now that we can integrate by parts, we can finally see how
to integrate ln x.

130
4.2. How to find indefinite integrals

Z
Example 4.20 Find ln(x) dx.

To do this using integration by parts, we treat the integrand as 1 · ln(x) so that we


have a product, i.e. we want to find,
Z Z
ln(x) dx = 1 · ln(x) dx.

To apply integration by parts, we choose

f (x) = ln(x) and g 0 (x) = 1, 4


so that differentiating f (x) and integrating g 0 (x) we get
1
f 0 (x) = and g(x) = x,
x
where we have suppressed the arbitrary constant from the integration. Applying the
rule then gives,
Z Z   Z
1
1 · ln(x) dx = (x)(ln(x)) − (x) dx = x ln(x) − 1 dx,
x

and, clearly, the new integral is easier to find. Thus, finding this integral, we get
Z Z
ln(x) dx = x ln(x) − 1 dx = x ln(x) − x + c,

and so we have now found the integral of ln x as promised in Section 4.2.1.

Activity 4.12 Use the result in Example 4.20 and the change of base formula for
logarithms to find Z
loga x dx,

which was also promised in Section 4.2.1.

Activity 4.13 Use the result in the previous example to find the integral in
Example 4.19 the other way, i.e. by choosing

f (x) = x and g 0 (x) = ln x,

when integrating by parts.

We observe that integration by parts is not useful for all products since, as we saw
above, integrals like Z
(x2 + 1)2 x dx,

in Example 4.8 contain a product and yet they are best dealt with by substitution as
the extra ‘x’ in the product is a constant multiple of the derivative of g = x2 + 1.

131
4. Integration

However, integrals like Z


(x2 + 1)2 x2 dx,

would require integration by parts since, now, the extra ‘x2 ’ in the product is not a
constant multiple of the derivative of g = x2 + 1. Indeed, the main skill involved in
finding integrals using these rules is choosing the appropriate method.3 To illustrate
this, let’s see how we would find this last integral.
Z
Example 4.21 Find (x2 + 1)2 x2 dx.
4 Here we have a product and, to apply integration by parts, we choose

f (x) = (x2 + 1)2 and g 0 (x) = x2 ,

so that differentiating f (x) and integrating g 0 (x) we get

x3
f 0 (x) = 2(x2 + 1)(2x) and g(x) = ,
3
where we have used the chain rule to perform the differentiation and suppressed the
arbitrary constant from the integration. Applying the rule then gives,
Z   Z  
2 2 2 2 2
 x3 2
 x3
(x + 1) x dx = (x + 1) − 2(x + 1)(2x) dx,
3 3

and, clearly, the new integral is easier to find because we can easily multiply out the
brackets and integrate term-by-term. Thus, finding this integral, we get
Z Z  
2 2 2 x3 2 2 4 6 4
 x3 2 2 4 x7 x5
(x + 1) x dx = (x + 1) − x + x dx = (x + 1) − + + c,
3 3 3 3 7 5

as the answer.

Activity 4.14 Verify that this answer is correct by multiplying out the brackets in
the integrand and integrating term-by-term.

The last two ways of making progress with an integral that we will consider are not rules
of integration, but handy techniques that allow us to rewrite integrands so that we can
see how to integrate them. The first of these uses a particular kind of algebraic identity
known as ‘partial fractions’ and the second involves the use of trigonometric identities.

4.2.5 Using partial fractions to simplify integrands


Suppose that we have an integrand which is a rational function of two polynomials, say
P (x)
R(x) = .
Q(x)
3
This is unlike the situation with differentiation where it is always pretty obvious which rule we should
be applying!

132
4.2. How to find indefinite integrals

In order to apply the method of partial fractions, it must be the case that the degree of
the numerator, i.e. P (x), is less than the degree of the denominator, i.e. Q(x). If this is
the case, we start by looking at how the denominator factorises and then proceed
according to which of the following cases we are in.

Case 1: The denominator has distinct [real] linear factors

If the denominator, Q(x), is of degree n and has n real and distinct roots a1 , a2 , . . . , an
then we can write
Q(x) = (x − a1 )(x − a2 ) · · · (x − an ),
i.e. Q(x) has distinct [real] linear factors. In this case, the method of partial fractions 4
dictates that we can write
P (x) A1 A2 An
R(x) = = + + ··· + ,
(x − a1 )(x − a2 ) · · · (x − an ) x − a1 x − a2 x − an
and we can find the numbers A1 , A2 , . . . , An we require by cross-multiplying on the
right-hand-side, comparing the numerators and letting x = a1 , x = a2 , . . . , x = an
respectively. Let’s look at a simple example.
Z
x
Example 4.22 Find dx.
x2 − x − 2
Here the integrand is a rational function of two polynomials and the degree of the
numerator is less than the degree of the denominator. As such, we can use the
method of partial fractions and, looking at the denominator, we see that
x2 − x − 2 = (x − 2)(x + 1),
so we are in the case where we have distinct linear factors. This means that we can
write
x x A1 A2
2
= = + ,
x −x−2 (x − 2)(x + 1) x−2 x+1
for some constants A1 and A2 . To find these constants, we cross-multiply on the
right-hand-side to see that
x A1 (x + 1) + A2 (x − 2)
= ,
(x − 2)(x + 1) (x − 2)(x + 1)
and so, comparing the numerators, we need
x = A1 (x + 1) + A2 (x − 2).
Indeed, setting x = 2 on both sides, we see that 2 = 3A1 whereas setting x = −1 on
both sides, we see that −1 = −3A2 . Thus, we have
x x 2/3 1/3
= = + ,
x2 −x−2 (x − 2)(x + 1) x−2 x+1
using the values of A1 and A2 that we have found. Consequently, we find that
Z Z  
x 2/3 1/3 2 1
2
dx = + dx = ln |x − 2| + ln |x + 1| + c,
x −x−2 x−2 x+1 3 3
where c is an arbitrary constant.

133
4. Integration

We observe, in particular, that the degree of the denominator determines how many
constants we have to find.

Case 2: The denominator has a repeated [real] linear factor

If we find that one of the roots, say ak , of the denominator, Q(x), is real and repeated
m times then we replace the term
Ak
,
x − ak
in the expansion from Case 1 with the terms
4 B1 B2 Bm
+ 2
+ ··· + .
x − ak (x − ak ) (x − ak )m
We then have to find the numbers B1 , B2 , . . . , Bm as well as any other numbers that
remain from Case 1. Let’s look at a simple example.
Z
x+3
Example 4.23 Find dx.
(x + 2)(x − 1)2
Here the integrand is a rational function of two polynomials and the degree of the
numerator is less than the degree of the denominator. As such, we can use the
method of partial fractions and, looking at the denominator, we have
(x + 2)(x − 1)2 ,
and so we are in the case where we have a repeated linear factor. This means that
we can write
x+3 A1 B1 B2
2
= + + ,
(x + 2)(x − 1) x + 2 x − 1 (x − 1)2
for some constants A1 , B1 and B2 . To find these constants, we cross-multiply on the
right-hand-side to see that
x+3 A1 (x − 1)2 + B1 (x − 1)(x + 2) + B2 (x + 2)
= ,
(x + 2)(x − 1)2 (x + 2)(x − 1)2
and so, comparing the numerators, we need
x + 3 = A1 (x − 1)2 + B1 (x − 1)(x + 2) + B2 (x + 2).
Indeed, setting x = −2 on both sides, we see that 1 = 9A1 and setting x = 1 on both
sides, we see that 4 = 3B2 . However, to find B1 , we now note that comparing (say)
the coefficient of the x2 term on both sides of this expression we get 0 = A1 + B1
and so B1 = −A1 = −1/9. Thus, we have
x+3 1/9 −1/9 4/3
2
= + + ,
(x + 2)(x − 1) x + 2 x − 1 (x − 1)2
using the values of A1 , B1 and B2 that we have found. Consequently, we find that
Z Z  
x+3 1/9 −1/9 4/3
dx = + + dx
(x + 2)(x − 1)2 x + 2 x − 1 (x − 1)2
1 1 4
= ln |x + 2| − ln |x − 1| − + c,
9 9 3(x − 1)
where c is an arbitrary constant.

134
4.2. How to find indefinite integrals

We observe, again, that the degree of the denominator determines how many constants
we have to find.

Case 3: The denominator has an irreducible [real] factor

If we find that the denominator, Q(x), has an irreducible [real] factor like ax2 + bx + c,4
then we replace the corresponding term in the expansion from Case 1 with the term

C1 x + C2
.
ax2 + bx + c
4
We then have to find the numbers C1 and C2 as well as any other numbers that remain
from Case 1. Let’s look at a simple example.

Z
x
Example 4.24 Find dx.
(x − 1)(x2+ 2x + 2)
Here the integrand is a rational function of two polynomials and the degree of the
numerator is less than the degree of the denominator. As such, we can use the
method of partial fractions and, looking at the denominator, we have

(x − 1)(x2 + 2x + 2),

and so we are in the case where we have an irreducible factor as x2 + 2x + 2 has no


real roots as, for instance, “b2 − 4ac” gives us 22 − 4(1)(2) = 4 − 8 = −4 < 0. This
means that we can write
x A1 C1 x + C2
= + ,
(x − 1)(x2 + 2x + 2) x − 1 x2 + 2x + 2

for some constants A1 , C1 and C2 . To find these constants, we cross-multiply on the


right-hand-side to see that

x A1 (x2 + 2x + 2) + (C1 x + C2 )(x − 1)


= ,
(x − 1)(x2 + 2x + 2) (x − 1)(x2 + 2x + 2)

and so, comparing the numerators, we need

x = A1 (x2 + 2x + 2) + (C1 x + C2 )(x − 1).

Indeed, setting x = 1 on both sides, we see that 1 = 5A1 and, to find C1 , we now note
that comparing the coefficient of the x2 term on both sides of this expression we get
0 = A1 + C1 and so C1 = −A1 = −1/5 and comparing the coefficient of the constant
term on both sides we get 0 = 2A1 − C2 and so C2 = 2A1 = 2/5. Thus, we have

x 1/5 (1/5)(−x + 2)
= + 2 ,
(x − 1)(x2+ 2x + 2) x−1 x + 2x + 2

4
That is, we have a quadratic like ax2 + bx + c with b2 − 4ac < 0 so we cannot find real roots. This
means that we cannot factorise it using real factors and so we cannot use Case 1 or Case 2 on it.

135
4. Integration

using the values of A1 , C1 and C2 that we have found. Consequently, we find that
Z Z  
x 1/5 (−1/5)(x − 2)
dx = + 2 dx
(x − 1)(x2 + 2x + 2) x−1 x + 2x + 2
Z  
1 1 x−2
= − dx.
5 x − 1 x2 + 2x + 2

Now, the integral of the first term is easy but, to deal with the integral of the second
term, we note that the derivative of x2 + 2x + 2 is 2x + 2 (i.e. we are thinking about
the substitution g = x2 + 2x + 2 which we saw in Example 4.13). This means that,
4 writing
x−2 1 2x − 4 1 2x + 2 − 6 1 2x + 2 3
= = = − 2 ,
x2 + 2x + 2 2
2 x + 2x + 2 2
2 x + 2x + 2 2
2 x + 2x + 2 x + 2x + 2
we can see that, completing the square in the denominator of the last term, we have
Z Z  
x 1 1 1 2x + 2 3
dx = − + dx
(x − 1)(x2 + 2x + 2) 5 x − 1 2 x2 + 2x + 2 (x + 1)2 + 1
 
1 1 2 −1
= ln |x − 1| − ln |x + 2x + 2| + 3 tan (x + 1) + c,
5 2

where c is an arbitrary constant. Here, we have implicitly made the substitution


g = x2 + 2x + 2 in the middle term (as we saw in Example 4.13) and we saw how to
integrate the last term in Activity 4.11.

Of course, the key here is that, in this new term the linear expression in the numerator
that we have to find has a degree which is one less than the degree of the irreducible
quadratic expression in the denominator.5 This means that, if we had a repeated
irreducible factor in the denominator, we would have to compensate in a way which is
reminiscent of Case 2 as the next example shows.
Z
x4 + x3 + 2x2
Example 4.25 Find dx.
(x − 1)(1 + x2 )2
Here the integrand is a rational function of two polynomials and the degree of the
numerator is less than the degree of the denominator. As such, we can use the
method of partial fractions and, looking at the denominator, we have

(x − 1)(1 + x2 )2 ,

and so we are in the case where we have a repeated irreducible factor as x2 + 1 has
no real roots as, for instance, “b2 − 4ac” gives us 02 − 4(1)(1) = −4 < 0. This means
that we can write
x4 + x3 + 2x2 A1 C1 x + C2 D1 x + D2
2 2
= + + ,
(x − 1)(1 + x ) x−1 1 + x2 (1 + x2 )2
5
That is, the number of constants we have to find is equal to the degree of the denominator in the
term we are dealing with.

136
4.2. How to find indefinite integrals

for some constants A1 , C1 , C2 , D1 and D2 . To find these constants, we


cross-multiply on the right-hand-side to see that

x4 + x3 + 2x2 A1 (1 + x2 )2 + (C1 x + C2 )(x − 1)(1 + x2 ) + (D1 x + D2 )(x − 1)


= ,
(x − 1)(1 + x2 )2 (x − 1)(1 + x2 )2

and so, comparing the numerators, we need

x4 + x3 + 2x2 = A1 (1 + x2 )2 + (C1 x + C2 )(x − 1)(1 + x2 ) + (D1 x + D2 )(x − 1).

Indeed, setting x = 1 on both sides, we see that 4 = 4A1 and, to find C1 , we now
note that comparing the coefficient of the x4 term on both sides of this expression 4
we get 1 = A1 + C1 and so C1 = 1 − A1 = 0 and comparing the coefficient of the x3
term on both sides of this expression we get 1 = −C1 + C2 and so C2 = 1 + C1 = 1.
To find D1 and D2 we note that, using what we have found so far, we have

x4 + x3 + 2x2 = (1 + x2 )2 + (x − 1)(1 + x2 ) + (D1 x + D2 )(x − 1),

which means that, comparing the coefficient of x2 on both sides of this expression we
get 2 = 2 − 1 + D1 and so D1 = 1 whereas comparing the coefficient of x on both
sides we get 0 = 0 + 1 − D1 + D2 and so D2 = 0. Thus, we have

x4 + x3 + 2x2 1 1 x
2 2
= + 2
+ ,
(x − 1)(1 + x ) x−1 1+x (1 + x2 )2

using the values of the constants A1 , C1 , C2 , D1 and D2 that we have found.


Consequently, we find that
Z Z  
x4 + x3 + 2x2 1 1 x
dx = + + dx
(x − 1)(1 + x2 )2 x − 1 1 + x2 (1 + x2 )2
1
= ln |x − 1| + tan−1 x − +c
2(1 + x2 )

where c is an arbitrary constant and we have implicitly used the substitution


u = 1 + x2 to work out the integral of the last term.

So, once again, we observe that the degree of the denominator determines how many
constants we have to find in all of these examples. Generally speaking, as we are using
partial fractions to help us find integrals, we shouldn’t expect to see anything more
complicated than this.

4.2.6 Using trigonometric identities to simplify integrands


In Example 4.15 we saw how to find
Z
sin2 x cos x dx,

by using the substitution g = sin x, but what if you were asked to find
Z
sin2 x dx?

137
4. Integration

In this case, the substitution would not work since we do not have the ‘extra’ factor of
cos x in the integrand. However, as we shall see in the next example, we can easily find
this new integral if we use one of the trigonometric identities that we saw in
Section 1.1.4.

Z
Example 4.26 Find sin2 x dx.

In Activity 1.18, we saw the double-angle formula

cos(2x) = 1 − 2 sin2 x,
4
which allows us to write the problematic integrand sin2 x in terms of the function
cos(2x) which is far easier to integrate. That is, rearranging this trigonometric
identity, we have  
2 1
sin x = 1 − cos(2x) ,
2
and so we find that
Z Z    
2 1 1 1
sin x dx = 1 − cos(2x) dx = x − sin(2x) + c,
2 2 2

where c is an arbitrary constant.

Z
Activity 4.15 Find cos2 x dx.

Indeed, in Example 4.17, we used a substitution that worked because of the


trigonometric identity tan2 θ + 1 = sec2 θ to obtain a useful result. Here’s another one
that is very similar.

Z
dx
Example 4.27 Use the substitution x + a = b sin θ to find p .
b − (x + a)2
2

Here, for reasons that will soon become apparent, we make the suggested
substitution. As such, differentiating both sides of x + a = b sin θ with respect to θ,
we have
dx
= b cos θ =⇒ dx = b cos θ dθ.

This means that our integral becomes
Z Z Z Z
dx b cos θ cos θ
p = p dx = dθ = dθ,
b2 − (x + a)2 b2 − b2 sin2 θ cos θ

if we use the trigonometric identity 1 − sin2 θ = cos2 θ from (1.2). This then gives us
Z  
−1 x+a
dθ = θ + c = sin + c,
b

138
4.2. How to find indefinite integrals

since x + a = b sin θ and where c is an arbitrary constant. Thus, we have found that
Z  
dx −1 x+a
p = sin + c,
b2 − (x + a)2 b

which is another useful result.

As a last example, let’s see another way in which trigonometric identities can be used to
find an integral.

Z 4

Example 4.28 Use the substitution t = tan θ to find .
1 + cos(2θ)
The substitution t = tan θ is very useful and so we start by seeing how it can be
applied. Firstly, we note that, differentiating both sides with respect to θ, we get
dt
= sec2 θ,

and so, using the trigonometric identity sec2 θ = 1 + tan2 θ from (1.4), this gives us

dt
dθ = .
1 + t2
Secondly, we note that the denominator of our integrand is

1 + cos(2θ) = 1 + cos2 θ − sin2 θ,

using a double-angle formula from (1.6) and so we will need to be able to write sin θ
and cos θ in terms of t. An easy way to do this is to consider the right-angled
triangle in Figure 4.1 as this immediately tells us that
t 1
sin θ = √ , and cos θ = √ ,
1 + t2 1 + t2
and so we see that the denominator of our integrand can be written as

2 2 1 t2 2
1 + cos(2θ) = 1 + cos θ − sin θ = 1 + 2
− 2
= ,
1+t 1+t 1 + t2
in terms of t. Thus, returning to the integral, we have
Z Z Z
dθ 1 + t2 dt 1 t 1
= = dt = + c = tan θ + c,
1 + cos(2θ) 2 1 + t2 2 2 2

where c is an arbitrary constant.

Generally, as in the last two examples, when an unusual substitution is required in this
unit, it will be given in the question. Indeed, we’ll see a little bit more of this kind of
thing in Examples 4.36 and 4.37.

139
4. Integration

t2
√ 1+
t

θ
1

Figure 4.1: A right-angled triangle with t = tan θ can have t on the opposite side and 1
on the
√ adjacent side which means that, using Pythagoras’ theorem, the hypotenuse must
be 1 + t2 . With this triangle, we can then quickly deduce the expressions for sin θ and
cos θ in terms of t which are needed for Example 4.28.
4
4.3 Definite integrals and areas
So far, we have been looking at indefinite integrals and we have been finding them by
using the idea of an antiderivative to deduce standard integrals and rules of integration.
We now turn to the geometric interpretation of an integral and this involves introducing
the idea of a definite integral and seeing what it represents.

4.3.1 Definite integrals and what they represent


In Section 2.3.1 we saw that the derivative of a function, f (x), gave us the gradient of
the curve y = f (x). We now consider what the integral of a function, f (x), tells us about
the curve y = f (x) and see how this comes about through the idea of a definite integral.

What is a definite integral?

Recall that an indefinite integral is so-called since, given a function, f (x), and one of its
antiderivatives, F (x), i.e. two functions related by the fact that
dF
= f (x),
dx
we have Z
f (x) dx = F (x) + c,

where c is an arbitrary constant. And, indeed, it is this arbitrary constant that makes
this integral indefinite as we do not know what c is. In a similar vein, instead of writing,
Z Z b
f (x) dx we could also write f (x) dx,
a

where the constants a and b are called the limits of integration.


In order to work out integrals that look like this we need to know what to do with these
limits and the procedure is:

Firstly: deal with the integral. Integrating f (x), we take one of its antiderivatives,
F (x), and then write
Z b  b
f (x) dx = F (x) .
a a

140
4.3. Definite integrals and areas

In particular, as we shall see below, observe that we no longer need a constant of


integration.
Secondly: deal with the limits. By definition, we let
 b
F (x) = F (b) − F (a),
a

i.e. we subtract the value of the antiderivative at x = a from its value at x = b.


Notice that this means that, if F (x) is an antiderivative of f (x), we have
Z b
f (x) dx = F (b) − F (a),
a
4
i.e. the value of the integral depends only on the value of the antiderivative at the
points x = a and x = b. Thus, this is now a definite integral as it no longer involves an
arbitrary constant, c.

Activity 4.16 If F (x) is an antiderivative of f (x), show that


Z b  b
f (x) dx = F (x) + c = F (b) − F (a),
a a

if c is a constant. Hence explain why we can omit the constant of integration when
evaluating definite integrals.

Another consequence of this discussion is that it allows us to see how to use our basic
rules of integration to evaluate definite integrals. For instance, if k and l are constants
and f (x) and g(x) are functions, then we can see that the linear combination rule gives
us Z b Z b Z b
[kf (x) + lg(x)] dx = k f (x) dx + l g(x) dx,
a a a
if we are using definite integrals.

Activity 4.17 Following what we saw in Section 4.2.2, write down the constant
multiple rule, the sum rule and the difference rule for definite integrals.

Activity 4.18 Using what we have seen so far, derive the linear combination rule
for definite integrals.

Now that we have the basic idea, let’s see how we can work out a definite integral.
Z 3
Example 4.29 Evaluate (x + 4) dx.
1

If we follow the two step procedure above, i.e. integrating to find an antiderivative
and then dealing with the limits, we get
Z 3  3    2     
x2 32 1 9 1
(x+4) dx = + 4x = + 4(3) − + 4(1) = + 12 − + 4 = 12,
1 2 1 2 2 2 2

141
4. Integration

which is the value of this definite integral.

Alternatively, we could use the linear combination rule to get


Z 3 Z 3 Z 3 3  3  2
   
x2 3 12
(x + 4) dx = x dx + 4 dx = + 4x = − + 4(3) − 4(1)
1 1 1 2 1 1 2 2
   
9 1
= − + 12 − 4 = 12,
2 2

which is the same answer as before.


4
What definite integrals with non-negative integrands represent

Definite integrals are useful because they tell us about the area under a curve.
Specifically, if we have the definite integral
Z b
f (x) dx, (4.1)
a

where f (x) ≥ 0 for all x such that a ≤ x ≤ b,6 we say that we have a non-negative
integrand and find that the value of the integral is the area of the region between the
curve y = f (x), the x-axis and the vertical lines x = a and x = b as illustrated in
Figure 4.2.

y = f (x)

O x
a b

Figure 4.2: The hatched region is between the curve y = f (x), the x-axis and the vertical
lines x = a and x = b. In cases like this we have a non-negative integrand, i.e. f (x) ≥ 0
for a ≤ x ≤ b, and so the definite integral in (4.1) gives us the area of this hatched region.

Example 4.30 Find the area of the region between the line y = 4 − 2x, the x-axis
and the vertical lines x = 0 and x = 2 which is illustrated in Figure 4.3(a).

There are two ways to find this area:

As this is just a right-angled triangle, the area is just ‘half times base times
height’, i.e.
1
area of triangle = × 2 × 4 = 4.
2
Thus, the area of the region is four.
6
At the moment we will just accept this caveat. The reason why we need f (x) to be non-negative for
values of x between the limits of integration will become clear very soon.

142
4.3. Definite integrals and areas

As we have y = f (x) with f (x) = 4 − 2x, we can see from Figure 4.3(a) that
f (x) ≥ 0 between x = 0 and x = 2. So, as noted above, the area should be given
by
Z 2  2
2
(4 − 2x) dx = 4x − x = (4 × 2 − 22 ) − (4 × 0 − 02 ) = (8 − 4) − 0 = 4,
0 0

which is, again, four.


Consequently, this confirms that the definite integral does give us the area of the
region between the line y = 4 − 2x, the x-axis and the vertical lines x = 0 and x = 2,
at least, when f (x) ≥ 0 between the vertical lines. 4
y y

11111
00000
4 4

00000
11111
00000
11111
3 y = 4 − 2x 3

00000
11111
00000
11111
2 2

00000
11111
y = 4 − x2

00000
11111
1 1

00000
11111
O
1 2
x
−2 −1
O
1 2
x

(a) (b)
Figure 4.3: Non-negative integrands. (a) For Example 4.30, the region between the line
y = 4 − 2x, the x-axis and the vertical lines x = 0 and x = 2. (b) For Example 4.31, the
region between the parabola y = 4 − x2 , the x-axis and the vertical lines x = −1 and
x = 1.

However, generally, we won’t have a simple geometric way of finding the area under a
curve and so we will have to use integration.

Example 4.31 Find the area of the region between the parabola y = 4 − x2 , the
x-axis and the vertical lines x = −1 and x = 1 which is illustrated in Figure 4.3(b).

As we have y = f (x) with f (x) = 4 − x2 , we can see from Figure 4.3(b) that
f (x) ≥ 0 between x = −1 and x = 1. So, as noted above, the area should be given by
Z 1  1    
2 x3 (1)3 (−1)3
(4 − x ) dx = 4x − = 4(1) − − 4(−1) −
−1 3 −1 3 3
   
11 11 22
= − − = ,
3 3 3

i.e. the area is 7 13 .

143
4. Integration

Activity 4.19 Observe that the region in the previous example is symmetric about
the y-axis. Use this observation to explain why the area of this region is two times
the area represented by the definite integral,
Z 1
(4 − x2 ) dx,
0

and verify that this does indeed give the correct area.

What definite integrals with non-positive integrands represent


4
We now start to consider what happens to the definite integral in (4.1) when we can’t
guarantee that the integrand is non-negative, i.e. what happens if we do not have
f (x) ≥ 0 for all x such that a ≤ x ≤ b? To simplify matters, we will start by asking:
What happens when this condition always fails? That is, what happens when the
integrand is non-positive as f (x) ≤ 0 for all x such that a ≤ x ≤ b.
So what does the definite integral in (4.1) tell us about the area of the region bounded
by the curve y = f (x), the x-axis and the vertical lines x = a and x = b when we have a
non-positive integrand, i.e. when f (x) ≤ 0 for a ≤ x ≤ b, as illustrated in Figure 4.4?
One way of looking at this is to note that,

If f (x) ≤ 0 for all a ≤ x ≤ b, then −f (x) ≥ 0 for all a ≤ x ≤ b.

But, this means that −f (x) gives us a non-negative integrand and the area, A, of the
region in question is given by
Z b Z b Z b
A= −f (x) dx = − f (x) dx =⇒ f (x) dx = −A,
a a a

i.e. for non-positive integrands, the definite integral gives us minus the area. Thus, in
the case of non-positive integrands, the area is given by the magnitude of the definite
integral. Let’s have a look at an example.

a b
O x

y = f (x)

Figure 4.4: The hatched region is between the curve y = f (x), the x-axis and the vertical
lines x = a and x = b. In cases like this we have a non-positive integrand, i.e. f (x) ≤ 0
for a ≤ x ≤ b, and so the definite integral in (4.1) gives us minus the area of this hatched
region.

144
4.3. Definite integrals and areas

Example 4.32 Find the area of the region between the line y = 4 − 2x, the x-axis
and the vertical lines x = 2 and x = 4 which is illustrated in Figure 4.5(a).

There are two ways to find this area:

As this is just a right-angled triangle, the area is just ‘half times base times
height’, i.e.
1
area of triangle = × 2 × 4 = 4.
2
Thus, the area of the region is four.
4
As we have y = f (x) with f (x) = 4 − 2x, we can see from Figure 4.5(a) that
f (x) ≤ 0 between x = 2 and x = 4. So, looking at the definite integral we get,
Z 4  4
2
(4−2x) dx = 4x−x = (4×4−42 )−(4×2−22 ) = (16−16)−(8−4) = −4,
2 2

which is minus the answer we would expect. As such, we take the magnitude of
this answer and so the area is, again, four.
Consequently, if f (x) ≤ 0 between the vertical lines, the definite integral gives us
minus the area and so we take the magnitude of the definite integral to find the area.

y y

4 4

3 y = 4 − 2x 3 y = 4 − 2x

2 2

1 1

O x O x
1 2 3 4 1 2 3 4
−1 −1

−2 −2

−3 −3

−4 −4

(a) (b)
Figure 4.5: Negative integrands and their relation to area. The region between the line
y = 4 − 2x, the x-axis and the vertical lines (a) x = 2 and x = 4 for Example 4.32, and
(b) x = 0 and x = 4 for Example 4.33.

145
4. Integration

What definite integrals with general integrands represent

We now consider what happens to the definite integral in (4.1) when we can’t guarantee
that the integrand is non-positive or non-negative, i.e. what happens if f (x) ≥ 0 for
some x such that a ≤ x ≤ b but not others? Let’s start by considering the simple case
where we have an integrand which is neither non-positive nor non-negative because
there is some number c such that a ≤ c ≤ b where

f (x) ≥ 0 for all x such that a ≤ x ≤ c, and

4 f (x) ≤ 0 for all x such that c ≤ x ≤ b,


as illustrated in Figure 4.6. One way of looking at this is to note that the definite
integral
Z c
f (x) dx gives us the hatched area, A1 , between the vertical lines x = a and
a
x = c,
Z b
f (x) dx gives us minus the hatched area, A2 , between the vertical lines x = c
c
and x = b.
As such, the hatched area, A, between the lines x = a and x = b is given by
Z c Z b

A = A1 + A2 = f (x) dx + f (x) dx ,
a c

which is not the value of the definite integral in (4.1).

y
y = f (x)

b
O x
a c

Figure 4.6: The hatched region is between the curve y = f (x), the x-axis and the vertical
lines x = a and x = b. In cases like this we have a non-negative integrand for a ≤ x ≤ c
and a non-positive integrand for a ≤ x ≤ c, i.e. the definite integral in (4.1) can not be
used to find the area of the region.

Thus, for general integrands, the procedure for finding the area of the region bounded
by the curve y = f (x), the x-axis and the vertical lines x = a and x = b is as follows:

Firstly, determine all the points where the curve crosses the x-axis with
x-coordinates between x = a and x = b.

Secondly, use these points to determine (possibly via a sketch) where the curve is
positive and where the curve is negative.

146
4.3. Definite integrals and areas

Thirdly, use this information to determine the areas by finding the appropriate
definite integrals (bearing in mind that the integrands will now be either
non-negative or non-positive).

Fourthly, add up all the areas to find the total area.


To see how this works let’s consider a couple of examples.

Example 4.33 Find the area of the region between the line y = 4 − 2x, the x-axis
and the vertical lines x = 0 and x = 4 which is illustrated in Figure 4.5(b).

As indicated in Figure 4.5(b), the line y = 4 − 2x crosses the x-axis when x = 2 and 4
this lies between x = 0 and x = 4. We can also see that the function is non-negative
for 0 ≤ x ≤ 2 and non-positive for 2 ≤ x ≤ 4. As such, using our earlier workings in
Examples 4.30 and 4.32, we split the total region into two sub-regions to see that:

Between x = 0 and x = 2 we evaluate the definite integral,


Z 2
(4 − 2x) dx which gives us 4,
0

as we saw in Example 4.30. Thus, the area is four here as we have a


non-negative integrand.

Between x = 2 and x = 4 we evaluate the definite integral,


Z 4
(4 − 2x) dx which gives us −4,
2

as we saw in Example 4.32. Thus, the area is four here as we have a non-positive
integrand.
Consequently, the total area is eight.

We also note, in passing, that the definite integral


Z 4  4
2
(4 − 2x) dx = 4x − x = (4 × 4 − 42 ) − (4 × 0 − 02 ) = (16 − 16) − 0 = 0,
0 0

and, as this is zero, it most definitely is not giving us the area we seek!

Activity 4.20 Verify that the answer to the previous example is correct by finding
the areas of the triangles involved.

Example 4.34 Find the area of the region between the parabola y = 1 − x2 , the
x-axis and the vertical lines x = −2 and x = 2 which is illustrated in Figure 4.7.

As indicated in Figure 4.7, the parabola y = 1 − x2 crosses the x-axis when x = ±1


and these points lie between x = −2 and x = 2. We can also see that the function is
non-negative for −1 ≤ x ≤ 1 and non-positive for −2 ≤ x ≤ −1 and 1 ≤ x ≤ 2. As
such, we split the total region into three sub-regions to see that:

147
4. Integration

Between x = −2 and x = −1 we evaluate the definite integral,


Z −1  −1    
2 x3 (−1)3 (−2)3
(1 − x ) dx = x − = −1 − − −2 −
−2 3 −2 3 3
   
1 8 4
= −1 + − −2 + =− .
3 3 3
4
Thus, the area is 3
here as we have a non-positive integrand.

Between x = −1 and x = 1 we evaluate the definite integral,


4 Z 1
2

x3
1 
13
 
(−1)3

(1 − x ) dx = x − = 1− − −1 −
−1 3 −1 3 3
   
1 1 4
= 1− − −1 + = .
3 3 3
4
Thus, the area is 3
here as we have a non-negative integrand.

Between x = 1 and x = 2 we evaluate the definite integral,


Z 2  1        
2 x3 23 13 8 1 4
(1 − x ) dx = x − = 2− − 1− = 2− − 1− =− .
1 3 −1 3 3 3 3 3
4
Thus, the area is 3
here as we have a non-positive integrand.
4
Consequently, the total area is 3
+ 43 + 4
3
which is four.

We also note, in passing, that the definite integral,


Z 2  2        
2 x3 23 (−2)3 8 8 4
(1−x ) dx = x − = 2− − (−2) − = 2 − − −2 + =− ,
−2 3 −2 3 3 3 3 3

and this is most definitely not giving us the area we seek!

4.3.2 Definite integrals and the other rules of integration


We have seen how to use the basic rules of integration when dealing with definite
integrals and so we now look at how we can use the other two rules of integration,
namely integration by substitution and integration by parts, in this context.

Integration by substitution

When evaluating a definite integral using integration by substitution we follow the same
procedure as before but now, we also change the limits of integration so that they are
values of g rather than values of x. That is, if we are making the substitution g = g(x)
and we have a definite integral with limits x = a and x = b, after the substitution, the
limits will be g = g(a) and g = g(b) respectively. This is best illustrated by an example.

148
4.3. Definite integrals and areas

1 y = 1 − x2
−2 2
O x
−1 1
−1

−2

−3 4
Figure 4.7: Negative integrands and their relation to area (continued). For Example 4.34,
the region between the parabola y = 1 − x2 , the x-axis and the vertical lines x = −2 and
x = 2.

Z 1
2 +1
Example 4.35 Find x ex dx.
0

We saw in Example 4.10 that, taking g = x2 + 1, we have


dg 1
= 2x =⇒ dg = 2x dx =⇒ x dx = dg.
dx 2
In this case, as we have a definite integral, we also change the limits of integration,
i.e.

lower limit: x = 0 gives g = g(0) = 02 + 1 = 1, and

upper limit: x = 1 gives g = g(1) = 12 + 1 = 2.


Hence, the substitution gives
Z 1 Z 2   Z  2  
x2 +1 g 1 1 2 g 1 g 1 2 1 e
xe dx = e dg = e dg = e = e −e = (e −1),
0 1 2 2 1 2 1 2 2

as the answer.

Alternatively, using our indefinite integral from Example 4.10, we saw that
integration by substitution gave us
Z
2 1 2
x ex +1 dx = ex +1 +c,
2
and so this means that, if we suppress the constant of integration, we get
Z 1  1    
x2 +1 1 x2 +1 1 12 +1 02 +1 1 2 1 e
xe dx = e = e −e = e −e = (e −1),
0 2 0 2 2 2

as before.

149
4. Integration

For a harder example, let’s see what happens when we have to make a substitution that
works because of our double-angle formulae from Section 1.1.4.
Z
2
1 √ √
Example 4.36 Use the substitution x = sin θ to find x 1 − x dx.
0

Differentiating both sides of x = sin2 θ with respect to θ, we have


dx
= 2 sin θ cos θ =⇒ dx = 2 sin θ cos θ dθ,

4 and changing the limits of integration we get

lower limit: x = 0 gives sin2 θ = 0 and so θ = 0, and

upper limit: x = 1 gives sin2 θ = 1 and so θ = π/2.


Hence, the substitution gives us
Z Z Z
1 √ √ π/2 π/2
x 1 − x dx = (sin θ)(cos θ)(2 sin θ cos θ) dθ = 2 sin2 θ cos2 θ dθ,
0 0 0

where we have √ used the trigonometric identity cos2 θ = 1 − sin2 θ from (1.2)to get
cos θ from the 1 − x in the integrand. Then, using the double-angle formula
sin(2θ) = 2 sin θ cos θ from (1.6), we see that this gives us
Z Z
1 √ √ 1 π/2
x 1 − x dx = sin2 (2θ) dθ,
0 2 0

which we solve using a variation on the method given in Example 4.26, i.e. we note
that cos(4θ) = 1 − 2 sin2 (2θ) from Activity 1.18, so that
Z Z    π/2
1 √ √ 1 π/2
1 1 π
x 1 − x dx = 1 − cos(4θ) dθ = θ − sin(4θ) = ,
0 4 0 4 4 0 8

as sin(4θ) = 0 when θ = 0 or θ = π/2.

Lastly, let’s see another application of the t = tan θ substitution that we saw in
Example 4.28.
Z π/2

Example 4.37 Use the substitution t = tan θ to find .
0 4 − 2 cos2 θ
Using what we saw in Example 4.28, we see that
dt 1
dθ = and cos2 θ = ,
1 + t2 1 + t2
and so, in particular, the denominator of our integrand can be written as

2 2 + 4t2
4 − 2 cos2 θ = 4 − = .
1 + t2 1 + t2

150
4.3. Definite integrals and areas

Also, changing the limits of integration, we get

lower limit: θ = 0 gives t = tan 0 = 0, and

upper limit: θ = π/2 gives t = tan(π/2) = ∞,


which means that the substitution gives
Z Z ∞ Z
π/2
dθ 1 + t2 dt 1 ∞ 1
= dt = 1 dt
0 4 − 2 cos2 θ 0 2 + 4t2 1 + t2 4 0 2
+ t2
 ∞ √
1 √ √ 2
=
4
−1
2 tan ( 2t) =
8
π, 4
0

as tan−1 ∞ = π/2 and we have used the result we saw in Example 4.17.

Of course, in this example, when we write things like “tan(π/2) = ∞” or


“tan−1 (∞) = π/2”, what we really mean is “tan θ → ∞ as θ → π/2” and
“tan−1 t → π/2 as t → ∞”. This shorthand will be fine for this course, but in 176
Further Calculus, we will see how to do things like this properly.

Integration by parts

When evaluating a definite integral using integration by parts we use


Z b  b Z b
0
f (x)g (x) dx = f (x)g(x) − f 0 (x)g(x) dx,
a a a

i.e. we have to evaluate the f (x)g(x) term using the limits of integration as well as
evaluating the new [easier] definite integral.
Z 1
Example 4.38 Find x ex dx.
0

We saw in Example 4.18 that, to apply integration by parts to this integral, we


choose
f (x) = x and g 0 (x) = ex ,
so that differentiating f (x) and integrating g 0 (x) we get
f 0 (x) = 1 and g(x) = ex ,
where we have suppressed the arbitrary constant from the integration. Applying the
rule in the case of a definite integral then gives,
Z 1  1 Z 1  1 Z 1
x x x x
x e dx = (x)(e ) − (1)(e ) dx = x e − ex dx,
0 0 0 0 0

which leads to
Z 1    1    
x 1 0 x 1 1 0
x e dx = (1)(e ) − (0)(e ) − e = e −0 − e − e = 1,
0 0

as the answer.

151
4. Integration

Alternatively, using our indefinite integral from Example 4.18, we saw that
integration by parts gave us
Z
x ex dx = (x − 1) ex +c,

and so this means that, if we suppress the constant of integration, we get


Z 1  1
x x
x e dx = (x − 1) e = (1 − 1) e1 −(0 − 1) e0 = 0 − (− e0 ) = 1,
0 0

4 as before.

4.4 Applications of integrals


Integrals can be used in economics and we now introduce two ways in which they can
arise in that subject. The first is what happens when we want to find a cost function
but we only know the marginal cost; and the second introduces the idea of consumer
and producer surpluses.

4.4.1 Marginal functions revisited


Suppose that the cost of producing a quantity, q, of goods is given by the cost function,
C(q). In Section 2.3.3, we met the idea of the marginal cost, MC(q), of producing q
units which was given by
dC
MC(q) = ,
dq
and this was useful since the approximation
∆C ' MC(q)∆q,
allowed us to estimate the change in costs, ∆C, due to an increase in production of ∆q,
i.e. where the quantity produced is increased from q to q + ∆q. We now consider the
problem of finding the cost function, C(q), when we are given the marginal cost
function, MC(q). Indeed, as the marginal cost function is the derivative of the cost
function, we can see that
C(q) is an antiderivative of MC(q),
and so, Z
C(q) = MC(q) dq. (4.2)
However, this presents us with a problem as finding the indefinite integral on the
right-hand-side of (4.2) will yield all the antiderivatives of MC(q) — i.e. a function C(q)
that contains an arbitrary constant — whereas we want to find the particular
antiderivative that is actually the cost function — i.e. we want to find a particular value
of this constant. So, the question is: Which value of the arbitrary constant will give us
the cost function? In order to answer this question, we need to be given more
information, say the fixed costs associated with this production, so that we can find the
right value for this constant. Let’s consider an example.

152
4.4. Applications of integrals

Example 4.39 A company’s marginal cost function is given by

MC(q) = 2q + 100 eq ,

and its fixed costs are 10, 000. What is the cost function, C(q), for this company?

Using (4.2) above, we see that the cost function is given by the integral of the
marginal cost, i.e.
Z
C(q) = (2q + 100 eq ) dq = q 2 + 100 eq +c,
4
where c is an arbitrary constant. This tells us, depending on the value of c, all of the
possible cost functions for this company. But, which one should we take? Obviously,
perhaps, we want the one which also gives us fixed costs of 10, 000, i.e. we want

C(0) = 10, 000 =⇒ 10, 000 = 02 + 100 e0 +c =⇒ 10, 000 = 100 + c =⇒ c = 9, 900,

as the fixed costs are the cost of producing nothing. Thus, the cost function for this
company is given by
C(q) = q 2 + 100 eq +9, 900,
as this function agrees with the question on both the marginal and the fixed costs of
production.

4.4.2 Consumer and producer surpluses


Suppose that a market has linear supply and demand functions as illustrated in
Figure 4.8. As we know from Section 1.1.5, the equilibrium price, p∗ , and the
equilibrium quantity, q ∗ , occur at the point where the graphs of these functions
intersect. Indeed, at equilibrium, as the consumers buy q ∗ units of the good at a price of
p∗ per unit, they pay an amount p∗ q ∗ to the suppliers and we can think of this as the
area of the hatched region in Figure 4.9(b).
However, if the consumers are willing to buy q ∗ units of the good, it can be argued7
that the consumers would be willing to pay an amount given by
Z q∗
pD (q) dq,
0

which is the area of the hatched region in Figure 4.9(a). The difference between the area
that represents what they would pay and the area that represents what they actually
pay, i.e. the area of the hatched region in Figure 4.9(d), is called the consumer surplus.
Indeed, this consumer surplus, CS, can be found using the formula
Z q∗
CS = pD (q) dq − p∗ q ∗ ,
0

and this is the amount that the consumers save by paying what they actually paid
instead of what they would have paid.
7
See, for example, Section 25.1 of Anthony and Biggs (1996).

153
4. Integration

p∗

4 D

O q
q∗

Figure 4.8: Linear supply and demand functions for a market. Note that the equilibrium
price, p∗ , and the equilibrium quantity, q ∗ , occur at the point where the graphs of these
functions intersect.

Similarly, if the suppliers are willing to supply q ∗ units of the good, it can be argued
that they need to be paid an amount given by
Z q∗
pS (q) dq,
0

which is the area of the hatched region in Figure 4.9(c). The difference between the area
that represents what they are actually paid and the area that represents what they need
to be paid, i.e. the area of the hatched region in Figure 4.9(e), is called the producer
surplus. Indeed, this producer surplus, PS, can be found using the formula
Z q∗
∗ ∗
PS = p q − pD (q) dq,
0

and this is the amount that the suppliers gain by being paid what they actually receive
instead of what they need to receive. Let’s look at a simple example.

Example 4.40 A market has an inverse demand function given by


1
pD (q) = 70 − q,
3
and an inverse supply function given by
1
pS (q) = 20 + q.
2
Find the equilibrium price and quantity. What are the consumer and producer
surpluses for this market?

The equilibrium quantity, q ∗ , makes the prices obtained from the inverse demand
and supply functions equal, i.e.
1 1 5
70 − q ∗ = 20 + q ∗ =⇒ 50 = q ∗ =⇒ q ∗ = 60,
3 2 6

154
4.4. Applications of integrals

p p p

111111
000000
000000
111111 S S S
000000
111111
000000
111111
000000
111111
000000
111111
000000
111111
000000
111111
000000
111111
p∗
000000
111111
000000
111111
000000
111111
111111
000000
p∗

000000
111111 1111111111
0000000000
p∗

0000000000
1111111111
000000
111111
000000
111111
000000
111111
000000
111111
000000
111111
000000
111111 0000000000
1111111111
0000000000
1111111111
000000
111111 0000000000
1111111111
D D D
000000
111111
000000
111111
000000
111111
000000
111111
000000
111111
O ∗ q
q
000000
111111
000000
111111
O
q∗
q
0000000000
1111111111
0000000000
1111111111
O
q∗
q

(a) (b) (c) 4


p p

111111
000000
000000
111111 S S
000000
111111
000000
111111
000000
111111
000000
111111
000000
111111
000000
111111
000000
111111
p∗ 0
1
0
1
0
1
p∗
1010
111111
000000
000000
111111
0
1
000000
111111 1010
Consumer surplus:
0
1
0
1 area (a) − area (b)
0
1
0
1
0
1
D 000000
111111
000000
111111 1010
D
0
1
0
1
0
1
O 0q∗
1 q Producer surplus:
area (b) − area (c)
O
10
q∗
q

(d) (e)
Figure 4.9: What people pay or need to be paid. (a) What the consumers would pay for a
quantity q ∗ . (b) What the consumers pay for a quantity q ∗ if the market is at equilibrium.
(c) What the suppliers need to be paid for a quantity q ∗ . (d) What the consumers save if
they pay for a quantity q ∗ in a market that is at equilibrium, this is the consumer surplus.
(e) What the producers gain if they sell a quantity q ∗ in a market that is at equilibrium,
this is the producer surplus.

and this means that the equilibrium price, p∗ , is given by


1
p∗ = 70 − (60) = 70 − 20 = 50,
3
if we use the inverse demand function.

Hence, to find the consumer surplus, CS, we have


Z q∗
CS = pD (q) dq − p∗ q ∗ ,
0

and so we need to find


Z 60    60  
1 q2 1 2
70 − q dq = 70q − = 70(60) − (60) − 0 = 4, 200 − 600 = 3, 600,
0 3 6 0 6
which means that
CS = 3, 600 − (50)(60) = 3, 600 − 3, 000 = 600,

155
4. Integration

is the consumer surplus. And, to find the producer surplus, PS, we have
Z q∗
∗ ∗
PS = p q − pS (q) dq,
0

and so we need to find


Z 60    60  
1 q2 1 2
20 + q dq = 20q + = 20(60) + (60) − 0 = 1, 200 + 900 = 2, 100,
0 2 4 0 4

which means that


4
PS = (50)(60) − 2, 100 = 3, 000 − 2, 100 = 900,

is the producer surplus.

Although, as both the demand and supply functions are linear in this example, there is
an easier way to find the consumer and producer surpluses as the next activity shows.

Activity 4.21 Sketch the inverse demand and supply functions in the previous
example and shade in the regions which represent the consumer and producer
surplus. What are the areas of these regions?

Of course, the demand and supply functions that we are given may not be linear and, in
such cases, we would have to use integration to find the consumer and producer
surpluses.

Activity 4.22 The demand for a commodity is given by the equation

p(q + 1) = 231.

If the equilibrium quantity is 10, find the equilibrium price and hence determine the
consumer surplus.

Learning outcomes
At the end of this chapter and having completed the relevant reading and activities, you
should be able to:

find integrals using standard integrals and the rules of integration;

find integrals by simplifying the integrand using partial fractions and trigonometric
identities;

use integrals to find areas;

solve problems from economics-based subjects that involve integrals.

156
4.4. Solutions to activities

Solutions to activities
Solution to activity 4.1
Given the linear combination rule, i.e.
Z Z Z
[kf (x) + lg(x)] dx = k f (x) dx + l g(x) dx,

we can derive the constant multiple rule by setting l = 0 so that


Z Z Z Z Z
kf (x) dx = [kf (x) + 0g(x)] dx = k f (x) dx + 0 g(x) dx = k f (x) dx,
4
the sum rule by setting k = 1 and l = 1 so that
Z Z Z Z
[f (x) + g(x)] dx = [1f (x) + 1g(x)] dx = 1 f (x) dx + 1 g(x) dx
Z Z
= f (x) dx + g(x) dx,

and the difference rule by setting k = 1 and l = −1 so that


Z Z Z Z
[f (x) − g(x)] dx = [1f (x) + (−1)g(x)] dx = 1 f (x) dx + (−1) g(x) dx
Z Z
= f (x) dx − g(x) dx.

Solution to activity 4.2


Suppose that F (x) and G(x) are antiderivatives of f (x) and g(x) respectively, i.e.
dF dG
= f (x) and = g(x).
dx dx
This means that
Z Z
k f (x) dx + l g(x) dx = kF (x) + lG(x) + c,

where c is an arbitrary constant. But, by the linear combination rule for differentiation,
we also have
 
d dF dG
kF (x) + lG(x) + c = k +l + 0 = kf (x) + lg(x),
dx dx dx
which means that kF (x) + lG(x) + c is also an antiderivative of kf (x) + lg(x), i.e.
Z
[kf (x) + lg(x)] dx = kF (x) + lG(x) + c.

Consequently, we have
Z Z Z
[kf (x) + lg(x)] dx = k f (x) dx + l g(x) dx,

as they have the same antiderivatives.

157
4. Integration

Solution to activity 4.3


For (a), use the constant multiple rule to see that
Z Z
−3 cos x dx = −3 cos x dx = −3 sin x + c,

where c is an arbitrary constant. For (b), we use the sum rule to see that
Z Z Z
(e + cos x) dx = e dx + cos x dx = ex + sin x + c,
x x

where c is an arbitrary constant. For (c), we use the linear combination rule to see that
4 Z   Z Z
3 1
3 sin x − dx = 3 sin x dx−3 dx = 3(− cos x)−3 ln |x|+c = −3 cos x−3 ln |x|+c,
x x
where c is an arbitrary constant.

Solution to activity 4.4


For both of these integrals we use the substitution g = 4x + 7 so that we have
dg 1
=4 =⇒ dg = 4dx =⇒ dx = dg.
dx 4
Hence making this substitution in the first integral we get
Z Z   Z
1 1 1 1 1 1 1
dx = dg = dg = ln |g| + c = ln |4x + 7| + c,
4x + 7 g 4 4 g 4 4
where c is an arbitrary constant whereas, in the second integral, we get
Z Z   Z
4x+7 g 1 1 1 1
e dx = e dg = eg dg = eg +c = e4x+7 +c,
4 4 4 4
where c is an arbitrary constant.

Solution to activity 4.5


Using the standard integrals as a source of antiderivatives, we see that, if n 6= −1,
Z
1 xn+1
(ax + b)n dx = · + c,
a n+1
whereas, if n = −1, we have
Z Z
−1 1 1
(ax + b) dx = dx = ln |ax + b| + c,
ax + b a
where c is an arbitrary constant. We also have
Z
1
eax+b dx = eax+b +c,
a
Z
1
sin(ax + b) dx = − cos(ax + b) + c, and
a

158
4.4. Solutions to activities

Z
1
cos(ax + b) dx = sin(ax + b) + c,
a
where c is an arbitrary constant.

Of course, if a = 0, then the dependence on x in the integrand disappears and so we are


just integrating a constant, i.e. we have
Z
bn dx = xbn + c,

for any n, as well as


Z Z Z
eb dx = x eb +c, sin b dx = x sin b + c and cos b dx = x cos b + c, 4
where c is an arbitrary constant.

Solution to activity 4.6


Using what we saw in Activity 4.5 we see that the integrals from Activity 4.4 are,
simply,
Z Z
1 1 1
dx = ln |4x + 7| + c and e4x+7 dx = e4x+7 +c,
4x + 7 4 4
where c is an arbitrary constant. This is, of course, exactly what we found in
Activity 4.4.

Solution to activity 4.7


Taking g = 3x2 + 7 we have g 0 (x) = 6x and so dg = 6x dx, i.e. x dx = 16 dg. Hence, in
the first integral, this substitution gives
Z Z   Z
x 1 1 1 1 1 1
dx = dg = dg = ln |g| + c = ln |3x2 + 7| + c,
3x2 + 7 g 6 6 g 6 6
where c is an arbitrary constant whereas, in the second integral, this substitution gives
Z Z   Z
3x2 +7 g 1 1 1 1 2
xe dx = e dg = eg dg = eg +c = e3x +7 +c,
6 6 6 6
where c is an arbitrary constant. In both cases, note that the extra ‘x’ in the integrand
was actually needed for the substitution g = 3x2 + 7 to work.

Solution to activity 4.8


Here the composition is sin(x2 ) and so we take g = x2 . As such, we have
dg 1
= 2x =⇒ x dx = dg,
dx 2
which is a constant multiple of the other part of the product in the integrand, i.e. this
substitution will work. Thus, the substitution gives
Z Z   Z
2 1 1 1 1
x sin(x ) dx = sin(g) dg = sin(g) dg = − cos(g) + c = − cos(x2 ) + c,
2 2 2 2
where c is an arbitrary constant. Here, of course, the extra ‘x’ in the integrand was
needed for the substitution g = x2 to work.

159
4. Integration

Solution to activity 4.9


Here the composition is cos2 x and so we take g = cos x. As such, we have
dg
= − sin x,
dx
which, up to a minus, is the other part of the product in the integrand, i.e. this
substitution will work. Thus, we see that

dg = − sin x dx,

4 and so the substitution gives


Z Z Z
g3 1
sin x cos x dx = g (− dg) = − g 2 dg = − + c = − cos3 x + c.
2 2
3 3
Here, of course, the extra ‘sin x’ in the integrand was needed for the substitution
g = cos x to work.

Solution to activity 4.10


In Activity 1.4, we saw that
cos x
cot x = ,
sin x
which means that the composition is (sin x)−1 and so we take g = sin x. As such, we
have
dg
= cos x,
dx
which is the other part of the product in the integrand, i.e. this substitution will work.
Thus, we see that
dg = cos x dx,
and so the substitution gives
Z Z Z
cos x dg
cot x dx = dx = = ln |g| + c = ln | sin x| + c.
sin x g
Here, of course, the extra ‘cos x’ in the integrand was needed for the substitution
g = sin x to work.

Solution to activity 4.11


We note that the quadratic expression in the denominator can be written as

x2 + 2x + 2 = (x + 1)2 + 1,

if we complete the square. As such, we have


Z Z
dx dx
2
= 2
= tan−1 (x + 1) + c,
x + 2x + 2 (x + 1) + 1

using the result we derived in Example 4.17. (A useful exercise at this point is to try
and get this answer by actually making the substitution x + 1 = tan θ as we did in that
example.)

160
4.4. Solutions to activities

Solution to activity 4.12


Using the change of base formula for logarithms from Section 1.1.4, i.e.
ln x
loga (x) = ,
ln a
we have
Z Z  
1 1 x
loga x dx = ln x dx = x ln(x) − x + c = x loga (x) − + c,
ln a ln a ln a
where c is an arbitrary constant.
4
Solution to activity 4.13
Z
To find x ln x dx the other way, i.e. by choosing

f (x) = x and g 0 (x) = ln x,

we differentiate f (x) and integrate g 0 (x) using the result in Example 4.20 to get

f 0 (x) = 1 and g 0 (x) = x ln x − x,

where we have suppressed the arbitrary constant from the integration. Applying the
rule then gives
Z Z
x ln x dx = x(x ln x − x) − (1)(x ln x − x) dx
Z 
2 2 x2
= x ln x − x − x ln x dx − +c
2
Z
2 x2
= x ln x − − x ln x dx + c,
2
so that, taking the integral on the right-hand-side over to the left-hand-side, we have
Z Z
2 x2 x2 x2
2 x ln x dx = x ln x − +c =⇒ x ln x dx = ln x − + c,
2 2 4
where c is an arbitrary constant. Notice that this is the same as the answer we found in
Example 4.19 but it is slightly trickier to get and we need to know the answer to
Example 4.20.

Solution to activity 4.14


Unlike what we saw in Example 4.21, it would actually make more sense to find
Z
(x2 + 1)2 x2 dx,

by multiplying out the brackets and integrating term-by-term rather than integrating it
by parts. Doing this, we get
Z Z Z
x7 2 5 x3
(x + 1) x dx = (x + 2x + 1)x dx = (x6 + 2x4 + x2 ) dx =
2 2 2 4 2 2
+ x + + c,
7 5 3

161
4. Integration

where c is an arbitrary constant. Indeed, to verify that this is the same answer as the
one we saw in the example, it is easiest to take the earlier answer and note that
   
x3 2 2 4 x 7 x5 x3 4 2 4 x 7 x5
(x + 1) − + + c = (x + 2x + 1) − + +c
3 3 7 5 3 3 7 5
x7 2 5 x3 4 4
= + x + − x 7 − x5 + c
3 3 3 21 15
7 3
x 2 x
= + x5 + + c,
7 5 3
which is what we got above.
4
Solution to activity 4.15
To find this integral we also use the other double-angle formula from Activity 1.18,
namely  
2 2 1
cos(2x) = 2 cos x − 1 =⇒ cos x = 1 + cos(2x) ,
2
as this allows us to write the problematic integrand cos2 x in terms of the function
cos(2x) which is far easier to integrate. This means that we have
Z Z    
2 1 1 1
cos x dx = 1 + cos(2x) dx = x + sin(2x) + c,
2 2 2
where c is an arbitrary constant.

Solution to activity 4.16


Using the first step, we can see that
Z b  b
f (x) dx = F (x) + c ,
a a

as F (x) + c is also an antiderivative of f (x) if c is a constant. Then, using the second


step we get8
 b    
F (x) + c = F (b) + c − F (a) + c = F (b) − F (a),
a

which is exactly what we wanted. That is, including a constant of integration does not
affect the value of a definite integral and so we can omit it.

Solution to activity 4.17


For definite integrals, it should be easy to see that we have the

constant multiple rule: If k is a constant and f (x) is a function, then


Z b Z b
kf (x) dx = k f (x) dx.
a a
8
In what follows, bear in mind that a constant such as c, when evaluated at either x = a or x = b, is
just c.

162
4.4. Solutions to activities

sum rule: If f (x) and g(x) are functions, then


Z b Z b Z b
[f (x) + g(x)] dx = f (x) dx + g(x) dx.
a a a

difference rule: If f (x) and g(x) are functions,


Z b Z b Z b
[f (x) − g(x)] dx = f (x) dx − g(x) dx.
a a a

Solution to activity 4.18 4


Suppose that F (x) and G(x) are antiderivatives of f (x) and g(x) respectively, i.e.

dF dG
= f (x) and = g(x).
dx dx
This means that
Z b Z b  b  b    
k f (x) dx+l g(x) dx = k F (x) +l G(x) = k F (b)−F (a) +l G(b)−G(a) .
a a a a

But, by the linear combination rule for differentiation, we also have


 
d dF dG
kF (x) + lG(x) = k +l = kf (x) + lg(x),
dx dx dx

which means that kF (x) + lG(x) is also an antiderivative of kf (x) + lg(x), i.e.
Z b  b    
[kf (x) + lg(x)] dx = kF (x) + lG(x) = kF (b) + lG(b) − kF (a) + lG(a) .
a a

Consequently, we have
Z b Z b Z
[kf (x) + lg(x)] dx = k f (x) dx + l g(x) dx,
a a

as they have the same values.

Solution to activity 4.19


As the region in Example 4.31 is symmetric about the y-axis it should be clear that we
have an area given by
Z 1 Z 0 Z 1
2 2
(4 − x ) dx = (4 − x ) dx + (4 − x2 ) dx,
−1 −1 0

where the values of the two integrals on the right-hand-side, i.e. the areas they
represent, are equal. As such, we can write
Z 1 Z 1
2
(4 − x ) dx = 2 (4 − x2 ) dx,
−1 0

163
4. Integration

if we decide to find the second of these integrals. Then, looking at the integral on the
right-hand-side, we get
Z 1  1    
2 x3 (1)3 (0)3 11
(4 − x ) dx = 4x − = 4(1) − − 4(0) − = ,
0 3 0 3 3 3
so that, multiplying this by two, we get an area of 22/3 as before.

Solution to activity 4.20


Looking at the triangles in Figure 4.5(b), we use ‘half times base times height’ to see
that the area of the triangle on the left is
4 1
× 2 × 4 = 4,
2
and the area of the triangle on the right is also given by
1
× 2 × 4 = 4.
2
As such, the total area is eight as we found in Example 4.33.

Solution to activity 4.21


A sketch of the inverse supply and demand functions from Example 4.40 is given in
Figure 4.10 and the shaded regions are the consumer and producer surpluses as
indicated. Notice that we have also labelled the equilibrium price and quantity, which
we found in the example, on the sketch. Indeed, from this sketch it should be clear that:

The consumer surplus, CS, is the area of a triangle of base 60 and height 20, i.e. we
can use ‘half times base times height’ to see that
1
CS = × 60 × 20 = 600,
2
and this agrees with what we found in the example.
The producer surplus, PS, is the area of a triangle of base 60 and height 30, i.e. we
can use ‘half times base times height’ to see that
1
PS = × 60 × 30 = 900,
2
and this agrees with what we found in the example.

Solution to activity 4.22


As the demand equation is p(q + 1) = 231, we see that the inverse demand function is
231
pD (q) = ,
q+1
and, an equilibrium quantity, q ∗ , of 10 then gives us an equilibrium price of
p∗ = pD (q ∗ ) = 21. This means that, using
Z q∗
CS = pD (q) dq − p∗ q ∗ ,
0

164
4.4. Exercises

111111
000000
000000
111111
70
000000
111111 S
000000
111111
000000
111111
000000
111111
000000
111111
1111111111
0000000000
000000
111111
CS
000000
111111
0000000000
1111111111
000000
111111
50

0000000000
1111111111
0000000000
1111111111
PS

0000000000
1111111111
0000000000
1111111111
D
20

O q
60 210

Figure 4.10: A sketch of the consumer and producer surpluses for Activity 4.21.
4

we need to find
Z 10  10    
231
dq = 231 ln |q + 1| = 231 ln 11 − 231 ln 1 = 231 ln 11,
0 q+1 0

as ln 1 = 0, and this gives us


CS = 231 ln 11 − (21)(10) = 231 ln 11 − 210,
for the consumer surplus.

Exercises
Exercise 4.1
Find the following indefinite integrals.
Z Z Z
3
(a) sin x cos x dx, (b) sin3 x dx, (c) (x + 2) ln x dx.

Exercise 4.2
Z p √
1 + e−x
Find √ dx.
ex

Exercise 4.3
Z
x2
Find dx.
x2 − 1

Exercise 4.4
Z π/2
x dx
Use the substitution t = tan to evaluate .
2 0 2 + cos x

Exercise 4.5
Find the area of the region between the curve y = x3 , the x-axis and the vertical lines
x = −1 and x = 2.

165
4. Integration

Solutions to exercises
Solution to exercise 4.1
For (a), we have to find Z
sin3 x cos x dx,

and we notice that the integrand involves the composition sin3 x. This suggests that we
should make the substitution g = sin x and, as this gives us
dg
4 dx
= cos x =⇒ dg = cos x dx,

which is the other part of the product in the integrand, we can be sure that this will
work. So, using this substitution we get
Z Z
g4 1
sin x cos x dx = g 3 dg =
3
+ c = sin4 x + c,
4 4
where c is an arbitrary constant.

For (b), we have to find Z


sin3 x dx,

and we note that, using the trigonometric identity sin2 x = 1 − cos2 x from (1.2), this
can be written as
Z Z Z Z
sin x dx = (1 − cos x) sin x dx = sin x dx − cos2 x sin x dx.
3 2

Of course, the first of these integrals on the right-hand-side is trivial and the other was
found in Activity 4.9. So, using this, we find that
Z Z Z  
3 2 1 3
sin x dx = sin x dx − cos x sin x dx = − cos x − − cos x + c
3
1
= − cos x + cos3 x + c,
3
where c is an arbitrary constant.

For (c), we have to find Z


(x + 2) ln x dx,

and we note that the integrand is a product. This suggests that we should use
integration by parts with

f (x) = ln x and g 0 (x) = x + 2,

like we did in Example 4.19. So, differentiating f (x) and integrating g 0 (x) we get

1 x2
f 0 (x) = and g(x) = + 2x,
x 2
166
4.4. Solutions to exercises

where we have suppressed the arbitrary constant from the integration. Applying the
rule then gives,
Z  2  Z  2   Z  
x x 1 x x
(x+2) ln x dx = (ln x) + 2x − + 2x dx = (x+4) ln x− + 2 dx,
2 2 x 2 2
and, clearly, the new integral is easier to find. Thus, finding this integral, we get
Z Z    2 
x x x x
(x + 2) ln x dx = (x + 4) ln x − + 2 dx = (x + 4) ln x − + 2x + c,
2 2 2 4
where c is an arbitrary constant.
4
Solution to exercise 4.2
It makes sense to start by rewriting the integral so that we have
Z p √ Z p
1 + e−x
√ dx = 1 + e−x/2 e−x/2 dx,
ex

since, in this form, we can see that we have the composition 1 + e−x/2 in the integrand.
This suggests that we should make the substitution g = 1 + e−x/2 and, as this gives us
dg 1
= − e−x/2 =⇒ −2 dg = e−x/2 dx,
dx 2
which is the other part of the product in the integrand, we can be sure that this will
work. So, using this substitution we get
Z p √ Z Z
1 + e−x √ 1/2 g 3/2 4 
−x/2 3/2
√ dx = g (−2 dg) = −2 g dg = −2 +c = − 1 + e +c,
ex 3/2 3
where c is an arbitrary constant.

Solution to exercise 4.3


The integral Z
x2
dx,
x2 − 1
has an integrand which is the quotient of two polynomials. But, as these have the same
degree, we can not use the method of partial fractions on it as it stands. Instead, we
start by rewriting the integrand as
x2 x2 − 1 + 1 1
2
= 2
=1+ 2 ,
x −1 x −1 x −1
so that now, we can use the method of partial fractions on
1
,
x2 −1
as the degree of its numerator is less than the degree of its denominator. That is, since
x2 − 1 = (x − 1)(x + 1), we have distinct linear factors and so we can write
1 1 A1 A2
= = + ,
x2 −1 (x − 1)(x + 1) x−1 x+1

167
4. Integration

for some constants A1 and A2 . To find these constants, we cross-multiply on the


right-hand-side to see that
1 A1 (x + 1) + A2 (x − 1)
= ,
(x − 1)(x + 1) (x − 1)(x + 1)
and so, comparing the numerators, we need

1 = A1 (x + 1) + A2 (x − 1).

Indeed, setting x = 1 on both sides, we see that 1 = 2A1 whereas setting x = −1 on


both sides, we see that 1 = −2A2 . Thus, we have
4 1 1/2 −1/2
= + ,
x2 −1 x−1 x+1
using the values of A1 and A2 that we have found. Consequently, putting this all
together, we find that
Z Z  
x2 1/2 −1/2 1 1
2
dx = 1+ + dx = x + ln |x − 1| − ln |x + 1| + c,
x −1 x−1 x+1 2 2
where c is an arbitrary constant.

Solution to exercise 4.4


We are asked to evaluate the definite integral
Z π/2
dx
,
0 2 + cos x
using the substitution t = tan(x/2). This substitution, like the substitution t = tan θ
that we saw in Example 4.28, is very useful and so we start by seeing how it can be
applied. Firstly, we note that we can easily write sin(x/2) and cos(x/2) in terms of t by
using a right-angled triangle like the one in Figure 4.1 as this immediately tells us that
x t x 1
sin =√ and cos =√ .
2 1 + t2 2 1 + t2
So, using the double-angle formula cos(2x) = cos2 x − sin2 x from (1.6), we see that the
denominator of our integrand can be written as
1 t2 3 + t2
2 + cos x = 2 + cos2 x − sin2 x = 2 + − = .
1 + t2 1 + t2 1 + t2
Secondly, differentiating both sides of t = tan(x/2) with respect to x, we get
dt 1 x
= sec2 ,
dx 2 2
and so, since sec(x/2) is the reciprocal of cos(x/2) as we saw in Section 1.3.2, we have
2 dt
dx = ,
1 + t2
in terms of t. Thirdly, as this is a definite integral, we also have to change the limits of
integration, i.e.

168
4.4. Solutions to exercises

lower limit: x = 0 gives t = tan 0 = 0, and


upper limit: x = π/2 gives t = tan(π/4) = 1.
Thus, returning to the integral, we have
Z π/2 Z 1   Z 1
dx 1 + t2 2 dt dt
= 2 2
=2 2
,
0 2 + cos x 0 3+t 1+t 0 3+t

and, using the result we found in Example 4.17, this gives us


Z π/2  1  
dx 1 −1 x 2 −1 1 −1 2 π 
= 2 √ tan √ = √ tan √ − tan 0 = √ −0 ,
0 2 + cos x 3 3 0 3 3 3 6
π
and so √ is the answer.
4
3 3

Solution to exercise 4.5


To find the area of the region between the curve y = x3 , the x-axis and the vertical lines
x = −1 and x = 2, we note that the curve will be similar to what we saw in
Figure 2.2(c) and so the region we are looking at is the one illustrated in Figure 4.11.

y
y = x3

0
1
0
1
0
1
1
0
0
10
10
1
0
1
01
10
10
1
1
00
1
0
1
11
0 1 01
00
−1
01
O
0 2
x

Figure 4.11: The hatching indicates the region of interest in Exercise 4.5.

In particular, we see that the curve crosses the x-axis when x = 0 and that the function
is non-positive when −1 ≤ x ≤ 0 and non-negative when 0 ≤ x ≤ 2. As such, we split
the total region into two sub-regions to see that:

Between x = −1 and x = 0 we evaluate the definite integral,


Z 0  4 0
3 x 04 (−1)4 1
x dx = = − =− .
−1 4 −1 4 4 4
1
Thus, the area is 4
here as we have a non-positive integrand.
Between x = 0 and x = 2 we evaluate the definite integral,
Z 2  4 2
3 x 24 04 16
x dx = = − = = 4.
0 4 0 4 4 4
Thus, the area is 4 here as we have a non-negative integrand.
1 17
Consequently, the total area of this region is + 4 = .
4 4

169
4. Integration

170

You might also like