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

7.

Integration
We can think of integration in two ways, either as being the area
under a curve or as being the opposite operation to differentiation.
We consider both possibilities.

7.1 Basics of integration


7.1.1 Integration as area
Consider the curve y f ( x) in the range a x b . We can
approximate the area under the curve by dividing the range up into
N small subintervals with end points x0 x1 xN and 0 a ,
N b.

ti i s i
s ti 73

Si Ee Ai f x
1
2 3

i ti is
fun
fit for

x0 x1 x2 x3 xN x
a b
Figure 38: Sketch of integration as a sum.

This division is referred to as partitioning the interval [a, b] . The


lengths of each interval, xn xn 1 , need not be constant, but it is
often convenient for this to be the case.

© Stuart Dalziel (Michaelmas, 2021) 236


. Integration Basics of integration

We then choose N points 1 2 N , one lying in each of the


subintervals, so that
xi 1 i xi

We can then draw a rectangle in each subinterval of length xi xi 1


and height f ( i ) . The area of one rectangle is

( xi xi 1 ) f ( i )

and the total area of all the rectangles is the Riemann sum
N
SN ( xi xi 1 ) f ( i ) . (154)
infinite i 1

partitionThis is all shown in figure 38. If the Riemann sum has a finite limit
as N9 irrespective of how we chose the xi and i , provided all
xi xi 0 , the limit is the Riemann integral
what the Riemann
1

b N
sum tends to
f ( x) dx lim S N lim ( xi xi 1 ) f ( i ) , (155)
a N N
i 1

and is the area between the curve y f ( x) and the x axis in the
range a x b . This form of integral, where there is a specified
range of x to be integrated over, is referred to as a definite integral.
If the integrand f x is singular in a x b then it is not
contains immediately clear whether the definite integral
b
f ( x) dx exists.
a

undefined pointsFor example,


singular at x
f x 1 x, f x 1 x and f x
0 . However, as we shall explore further later
ln x are all

1 1 1
dx 2 x1 2 2
0
x 0

does exist, as does


1
lnx dx 1
0

1 1
but dx does not exist.
0 x

© Stuart Dalziel (Michaelmas, 2021) 237


. Integration Basics of integration

Properties:
a b
f ( x) dx f ( x) dx
b a

b c b
f ( x) dx f ( x) dx f ( x) dx
a a c

If f ( x) and g ( x) are (Riemann) integrable in [a, b] then


b b b
f ( x) g ( x) dx f ( x) dx g ( x) dx
a a a

If k is a constant then
b b
kf ( x) dx k f ( x) dx
a a

Integration is a linear operation. (Differentiation is also a linear


operator.)
Numerical routines for estimating integrals are based on the ideas
in this subsection, but greater accuracy with few subintervals can
be obtained using other shapes instead of rectangles.

7.1.2 Fundamental theorem of calculus


The fundamental theorem of calculus can be expressed informally
as integration is the opposite of differentiation.
Consider the integral
gtergrand
Primitive F ( x)
a
x
f (u ) du. (156)

We now differentiate F ( x) from first principles using the procedure


set out in section 4.1. Specifically,

foul du
df f
© Stuart Dalziel (Michaelmas, 2021) 238
. Integration Basics of integration
Fcat St
74
fordF F (x x) F ( x)
lim
ÉÉÉÉÉ dx x
TÉ x 0

s x x x
f (u ) du f (u ) du
a lim a a
x 0 x

Tx lim
x

x
x
f (u ) du
(157)
x 0 x
Now as x 0 we can see that
x x
f (u ) du x f ( x) (158)
x

(because as the range of integration gets shorter and shorter the


function can be approximated as a constant over that range, so that
the value of the integral corresponds to the area of the rectangle of
width x and height f ( x) ). Putting (158) into (157) gives

dF f ( x) x
lim f ( x) .
dx x 0 x
Integration of f ( x) followed by differentiation gets back to f ( x) ,
i.e. integration is the opposite of differentiation.

The fundamental theorem of calculus states


d x
f u du f x . (159)
dx a

The function being integrated, here f x is the integrand, and a


function that can be differentiated to obtain f x , such as F x , is
the primitive of f x .

© Stuart Dalziel (Michaelmas, 2021) 239


. Integration Basics of integration

The primitive can also be viewed as the indefinite integral of the


integrand f ( x) ,

F ( x)
Fox
f (u ) du or F ( x)
f four du
f ( x) dx .
x

There are thus an infinite number of primitives for f ( x) , each


differing by the arbitrary constant of integration.

Fun du
fi f
foul or Gut du
x foul
Fet Gent Cleftfear
A definite integral can be expressed as the difference between the
primitives evaluated at the ends of the range being integrated,
du

b
f ( x) dx F (b) F (a)
a

(the arbitrary constant in the definition of F ( x) is removed by


calculating the difference).

7.1.3 Infinite and improper integrals

Infinite integrals
If one (or both) of the limits of the integral are infinite, we need to
define the integral slightly more carefully.

If the function f ( x) is integrable for all x a then


b
f ( x) dx lim f ( x) dx ,
a b a

provided the limit


I exists. Treat as the limit of
Obviously, we can do a similar definition for a limit of
a
finite integral
.

© Stuart Dalziel (Michaelmas, 2021) 240


. Integration Basics of integration

Example 68: Integrate to infinity


x it
What is e dx ? e
0 otherwise
b
x 1 x
b
1 b
can be infinitely
Let I (b) e dx e 1 e
0 large
q
0

x 1 b 1
then e dx lim I (b) lim 1 e provided 0.
0 b b

I
to as
e o as
Improper integrals

An improper integral is one in which the integrand is singular


within the range of integration

I
If f ( x) is singular at x x* with a x* b , then the
improper integral is defined as
b x* b
f ( x) dx lim f ( x) dx f ( x) dx
a 0 a x*

provided the limits exist. d


ie avoid the singular
point
Example 69: Improper integral
1 1
12
What are (a) x dx and (b) x 1 dx ?
0 0

1 1
12
Let I ( ) x dx 2 x1 2 2 2
1
12
then x dx lim I ( ) lim 2 2 2
0 0 0

Let J ( )
1
operation after
x 1 dx ln x
1
ln
is still
integration at o
undefined undefined
1
then x 1 dx lim J ( ) lim ln
0 0 0

and so the integral does not exist.

© Stuart Dalziel (Michaelmas, 2021) 241


. Integration Basics of integration

Discontinuous integrands

A discontinuous integrand is one that contains a finite number of


discontinuities over the range of integration. This can still be
integrated.

If f ( x) is discontinuous at x x* with a x* b , then the


integral is
b x* b
f ( x) dx f ( x) dx f ( x) dx .
a a x*

A discontinuity leads to a kink in the indefinite integral at x* .

y y

x
y f ( x) y f (u ) du
a

faster
a b x a
rate
x
of
x* x*
change
Figure 39: A discontinuous integrand (left) leads to a kink in the corresponding
integral.
suddenly

© Stuart Dalziel (Michaelmas, 2021) 242


. Integration Methods of integration

7.2 Methods of integration


We will now review a whole series of common tricks and methods
for evaluating indefinite integrals.

7.2.1 Reversal of differentiation


This is the simplest case, in which the integral can be done on sight
by considering an appropriate derivative. For example,

dx n n 1 m xm 1
nx x dx c, m 1
dx m 1
d 1 1
ln x dx ln x c
dx x x
d 1
exp ax a exp ax exp bx dx exp bx c
dx b
d 1
sin ax a cos ax cos bx dx sin bx c
dx b
d 1
cos ax a sin ax sin bx dx cos bx c
dx b
d 1
tan ax a sec2 ax sec2 bx dx tan bx c
dx b
We can do something similar with the hyperbolic functions
introduced in Chapter 3. Differentiating (82) we see that
d 1 d
cosh x exp( x) exp( x)
dx 2 dx
(160)
1
exp( x) exp( x) sinh x
2
and similarly differentiating (83) yields

© Stuart Dalziel (Michaelmas, 2021) 243


. Integration Methods of integration

d
sinh x cosh x (161)
dx
To differentiate tanh x we use the quotient rule (102) together with
the new results (160) and (161):

d d sinh x
tanh x
dx dx cosh x
d d
cosh x sinh x sinh x cosh x
dx dx
cosh 2 x
cosh 2 x sinh 2 x 1
2 2
sech 2 x,
cosh x cosh x
where the last step has been accomplished using identity (88).
These results lead us to the following standard integrals for
hyperbolic functions:

cosh x dx sinh x c ,

sinh x dx cosh x c ,

sech 2 x dx tanh x c .

7.2.2 Inverse hyperbolic functions

To differentiate y sinh 1 ( x a) we first write sinh y x a , and


then differentiating using the implicit differentiation in section 4.6.
We have

© Stuart Dalziel (Michaelmas, 2021) 244


. Integration Methods of integration

d d x
sinh y ,
dx dx a
dy 1
cosh y ,
dx a
dy 1
dx a cosh y
1
a 1 sinh 2 y
1
2 2
, same method
a x
as normal
d
sinh 1
x 1
.
trig
(162)
dx a a2 x2 functions
In a similar way we can show that
d x 1
cosh 1 . (163)
dx a x 2
a 2

These two results lead us to the standard integrals


dx 1 x
sinh c, (164)
x 2
a 2 a

dx x
2 2
cosh 1

a
c. It a2 (165)
x a
The integrals (164) and (165) should be contrasted with the
corresponding result for circular functions
dx 1 x
sin c. (166)
a 2
x 2 a at y
d for non

cost t Cr complex
© Stuart Dalziel (Michaelmas, 2021) 245
. Integration Methods of integration

7.2.3 Integrands of form f ( x) df dx

The following integral can be completed directly

f ear f
df
en df 1 1
f x dx f x c, (167)
dx 1
when 1 . Instead, when 1 , we have an analogy with
integrating 1 x and replace (167) by

df 1
dx ln f x c.
from dx f x

f ta chafacts de fix
Example 70: Integration of functions to a power
Compute the following: (a) cos x sin 3 x dx , (b) tan 6 x sec 2 x dx ,
(c) x exp x 2 dx , (d) x x2 a dx , (e) tanh x dx .

d 1 d
cos x sin 3 x dx sin x sin 3 x dx sin 4 x dx
dx 4 dx
(a)
1 4
sin x c
4
d 1 d
tan 6 x sec 2 x dx tan 6 x tan x dx tan 7 x dx
dx 7 dx
(b)
1 7
tan x c
7
1 d
x exp x 2 dx exp x 2 dx
2 dx
(c) .
1
c exp x 2
2

© Stuart Dalziel (Michaelmas, 2021) 246


. Integration Methods of integration

1 d 2
x x2 a dx x a x2 a dx
2 dx
(d)
1
ln x 2 a c
2
sinh x 1 d
tanh x dx dx cosh x dx
(e) cosh x cosh x dx
ln cosh x c

7.2.4 Powers of trig functions


Trigonometric identities are often useful. For instance, we can use
the identities
1 (168)
cos 2 x 1 2sin 2 x sin 2 x 1 cos 2 x ,
2
1 (169)
cos 2 x 2cos x 1 2
cos 2 x 1 cos 2 x ,
2
to determine
1 2
sin 4 x dx 1 cos 2 x dx
4
1
1 2 cos 2 x cos 2 2 x dx (170)
4
1 1
1 2 cos 2 x cos 4 x 1 dx,
4 2
where the last step has been accomplished using the identity (169)
but with x replaced by 2x . Each term in the integrand in (170) is
now of an elementary form, and can be evaluated to give
4
sink to to let e ing
to Letty é4 4cew t é 6 I
© Stuart Dalziel (Michaelmas, 2021) 247

I cos 4 t t cosy
. Integration Methods of integration

gee 1 2 1 1
sin 4 x dx x sin 2 x sin 4 x x c
4 2 2 4
3x 1 1
sin 2 x sin 4 x c .
8 4 32
odd
Odd powers can be handled in a similar way:

sin 3 x dx sin x sin 2 x dx sin x 1 cos 2 x dx


d d
odd sin x cos 2 x cos x dx
dx
1 d
sin x cos3 x dx
3 dx
1
cos x cos3 x c .
3
then
Example 71: Integrating powers of trig functions
Complete the following: (a) cos 4 x dx , (b) tan 5 x dx .

1
(a) cos 4 x dx . Recalling that cos 2 x 1 cos 2 x , then
2
2
1
cos 4 x dx 1 cos 2 x dx
2
1
1 2 cos 2 x cos 2 2 x dx
4
1 1
1 2 cos 2 x 1 cos 4 x dx
4 2
1 2 1 1
x sin 2 x x sin 4 x c
4 2 2 4
3 1 1
x sin 2 x sin 4 x c
8 4 32

© Stuart Dalziel (Michaelmas, 2021) 248


. Integration tain seen I Methods of integration

(b) tan 5 x dx

tan 5 x dx tan 3 x tan 2 x dx tan 3 x sec 2 x 1 dx

tan 3 x sec 2 x tan 3 x dx


d
tan 3 x tan x dx tan x tan 2 x dx
dx
the
1 d reapply
tan 4 x dx 2
tan x sec x 1 dx identity
4 dx
1 d
tan 4 x tan x tan x dx tan x dx
4 dx
1 1 sin x
tan 4 x tan 2 x dx
4 2 cos x
1 1 1 d
tan 4 x tan 2 x cos x dx
4 2 cos x dx
1 1
tan 4 x tan 2 x ln cos x c
4 2
There is another way to determine this result. We begin by writing
5 sin 5 x (1 cos 2 x) 2 sin x
I tan x dx 5
dx
cos x cos5 x
1 2cos 2 x cos 4 x
sin x dx
cos5 x
d
and note that cos x sin x so we may rewrite this as
dx
1 2 1 d cos x
I dx x I
cos5 x cos3 x cos x dx
Let u cos x , then

© Stuart Dalziel (Michaelmas, 2021) 249


. Integration Methods of integration

1 2 1 1 1
I du ln u c
u5 u3 u 4u 4 u 2
1 1
ln cos x c
4cos 4 x cos 2 x
4
4 sec x
1
sec 2 x ln cos x c
Is this the same as we had before?
L 1
4 tan 4 x 1
2 tan 2 x ln cos x c
sin 4 x 2sin 2 x cos 2 x
4
ln cos x c
4cos x
Remembering sin 2 x 1 cos 2 x
2
1 cos 2 x 2 1 cos 2 x cos 2 x
L ln cos x c
4cos 4 x
1 4cos 2 x 3cos 4 x
ln cos x c
4cos 4 x
L 1
4 sec4 x sec2 x ln cos x 3
4 c
So the results are the same since we can take c 3
4 c arbitrarily.

Remember, there is always more than one answer to an indefinite


integral, as we can always add an arbitrary constant.

© Stuart Dalziel (Michaelmas, 2021) 250


. Integration Methods of integration

7.2.5 Partial fractions


Let us consider the integral
1
dx (171)
x2 x
We can make progress is we split the integrand into its partial
fractions, i.e.
1 1
, (172)
x2 x x( x 1) x x 1

for constants and . To find and we write (172) as

( x 1) ( x) x( )
x x 1 x( x 1) x( x 1)
and then comparing the numerator of the final expression in (172)
with the integrand in (171), we see that 0 and 1
(implying 1), so that
For today 1 1 1
Vos V A V2 are
x( x 1) x x 1
distinct
The integral (171) then becomes
1 1 1 1
dx dx dx
x2 x x x 1 x x 1
Alternatively
x
ln x ln x 1 c ln c
x 1

for IS II ot In
aot aint az x2
foxy Ca ro
can ca ne
botch Vol Eat
set A Vo
at a ©not
Stuart Dalziel 32
an (Michaelmas, 2021) 251
Do
No N Cro ray
. Integration Methods of integration

Example 72: Integration using partial fractions


x 1
Evaluate dx .
1 x x 2 x3
Begin by factorising the denominator. Noting that x 1 obviously
sets this to zero, then one factor is x 1, so
1 x x2 x3 1 x 1 x2
x 1 x 1 a b cx
dx dx dx
1 x x 2 x3 1 x 1 x2 1 x 1 x2
not
Solving for a, b :
Imaginary
a b cx a 1 x2 b cx 1 x
1 x 1 x2 1 x 1 x2
a b b c x a c x2 x 1
1 x 1 x2 1 x 1 x2
a b 1
b c 1
a c 0
a c 1, b 0
x 1 1 x
1 x 1 x2 1 x 1 x2

x 1 1 x
dx dx
1 x x 2 x3 1 x 1 x2
1
ln 1 x ln 1 x 2 C
2

© Stuart Dalziel (Michaelmas, 2021) 252


. Integration Methods of integration

Cover-up rule a faster way of dealing with partial fractions


***You do not need to use this technique if you do not want to***
Suppose we have a function of the form

a0 a1 x a2 x 2 an x n
f x
x r0 x r1 x r2 x rn

Here, the numerator is a polynomial of at most order n while the


denominator is a polynomial of order n 1. We aim to rewrite this
in the form
b0 b1 b2 bn
f x
x r0 x r1 x r2 x rn

We determine the various bi by considering the behaviour at the


corresponding root x ri of the dominator.

For b0 - x r0 term in f x

a0 a1 x a2 x 2 an x n
x r0 x r1 x r2 x ri x rn

then substitute x r0 into the remainder of the expression. The


result gives us b0 as

a0 a1r0 a2 r02 an r0n


b0 .
x r0 r0 r1 r0 r2 x ri r0 rn

What we are doing here is equating the two expressions for f x


and effectively multiplying both by x r0 ,

b1 b2 bn a0 a1 x a2 x 2 an x n
b0 x r0
x r1 x r2 x rn x r1 x r2 x ri x rn

then setting x r0 so that all the terms on the left-hand side vanish
except for the b0 term.

© Stuart Dalziel (Michaelmas, 2021) 253


. Integration Methods of integration

We do this for each of the roots x ri to determine each of the bi .


First we cover-up the factor in the numerator,

a0 a1 x a2 x 2 an x n
x r0 x r1 x r2 x ri x rn

the substitute in x ri :

a0 a1ri a2 ri 2 an ri n
bi
ri r0 ri r1 ri r2 x ri ri rn

For example, if

1 2 x 3x 2 a b c
f x
x x 1 x 2 x x 1 x 2

For a , we remove the x from the denominator,

1 2 x 3x 2
x x 1 x 2

and substitute x 0 (the corresponding root) so that

1 2(0) 3(0) 2 1
a .
x 0 1 0 2 2

Similarly for b with corresponding root x 1

1 2 x 3x 2 1 2(1) 3(1) 2 6
x 1
b 6
x x 1 x 2 (1) x 1 1 2 1

and the root x 2:

1 2 x 3x 2 1 2(2) 3(2) 2 17
x 2
c .
x x 1 x 2 (2) 2 1 x 2 2

Thus we have

© Stuart Dalziel (Michaelmas, 2021) 254


. Integration Methods of integration

1 2 x 3x 2 1 6 17
f x
x x 1 x 2 2x x 1 2 x 2

However, if we have a repeated root, the cover-up rule only gives us


the coefficient of the highest power, but it can still save time.
Consider
1 x a b c
x2 x 1 x x2 x 1
ax x 1 b x 1 cx 2
x2 x 1
a c x2 a b x b
x2 x 1

a c 0, a b 1, b 1 a 2, b 1, c 2.

Using the cover-up rule we only get


1 1
x 1: c 2,
12
1 0
x 0: b 1.
0 1
To determine a , consider any value of x other than one of the roots
(i.e. not 0 or 1):
1 2 3 a 1 2 a 1
x 2: 2
22 2 1 4 2 22 2 1 2 4

a 2.
As any other value (excluding the roots of the denominator) will
give the same, e.g.
1 1 a 1 2
x 1: 0 a 2 a 2
22 2 1 1 1
2
2

© Stuart Dalziel (Michaelmas, 2021) 255


. Integration Methods of integration

x 0 would be a good choice (but


cannot use that here since x 0 is one of the roots.
7.2.6 Substitution
Often, difficult integrals can be simplified by changing variables.
The trick is to know which substitution to use. Spotting the best
route requires practice. (Examiners sometimes give you a hint.) For
example, consider

1
2
dx .
1 x
a tan u
H tant u see u try
This is actually a very common example, and the substitution to use
is to write x tan u , so differentiating
dx
sec2 u ,
du
which allows the replacement of dx in the integral with

dx sec2 u du .
Again it looks like we have treated the derivative as a quotient to
split the dx and du . The subtlety of why this is not quite the case
is covered next term.

In this way,
1 1
dx sec2 u du 1 du u c,
1 x2 2
1 tan u
where we have used the identity 1 tan 2 u sec2 u . All we need to
do now is recall that x tan u so u tan 1 x to construct the
solution
1
dx tan 1 x c . (173)
1 x2

© Stuart Dalziel (Michaelmas, 2021) 256


. Integration Methods of integration

If we were dealing with a definite integral, we can transform the


limits so that we do not have to do the inverse transformation. For
example, using the same substitution as before,
b u tan 1 b tan 1 b
1 1
2
dx 2
sec 2 u du du tan 1 b tan 1 a
a
1 x u tan 1
a
1 tan u tan 1 a

substitute a values
to
Half u
A useful trick when dealing with integrals of awkward trig.
functions is to use half-angle formula. If we start with the
angle substitution

formula tan( x 2) t ,

we can show that


seek It two
sin x 2sin( x 2) cos( x 2)
2
cosec( x 2)sec( x 2)
cosecht It Coto 2 2t
,
1 t 2
1 t2 1 t2

Similarly, Itt Jutty It t't t't


cos x 2 cos 2 ( x 2) 1
2
1
2443745
2
sec ( x 2)
2 1 t2 Letty
2
1
1 t 1 t2
denominator
and
Att
sin x 2t
tan x
cos x 1 t2
It IF

© Stuart Dalziel (Michaelmas, 2021) 257


. Integration Methods of integration

Example 73: Integral of secant


Use the substitution t tan( x 2) to evaluate sec x dx .

angle formula
75

Using
the half G
seen IE A

dt I see c I do

ICH tai I dt

2
I CH t I da

f seen de
JEFE EI at
a

f fr dt

J t at

L I ht t Wl t t I t c

L IEEE le c

© Stuart Dalziel (Michaelmas, 2021) 258


. Integration Methods of integration

Common substitutions
Denominator involves Substitution Comments

a2 x2 x a tan

(a 2 x2 ) x a sin or Need x a
a a co so
(x 2 2
a ) x a cosh Need x a

(a 2 x2 ) x a sinh u

a2 x2 x a tanh u Need x a

a2 x2 x a coth u Need x a

a2 x2 (a x)(a x) Use partial fractions

Complete the

I
a bx cx 2 or
a bx cx 2 square
or

factor ise partialfractions


The first step for dealing with a general quadratic in the
denominator is to see if it can be factorised (if so, use partial
fractions) or try to complete the square.

For a bx cx 2 , rewrite as p (q rx)2 p q2 2qrx r 2 x 2

r2 c

2qr b q 1
2 br 1
2 b c

p q2 a p a q2 a 1
4 b2 c

© Stuart Dalziel (Michaelmas, 2021) 259


. Integration Methods of integration

Example 74: Complete the square


dx
What is ?
2
3 2x x
The 2x x 2 suggests ( x 1)2 1 2 x x 2 so
dx dx
.
2 2
3 2x x 4 ( x 1)
Use substitution u x 1 du dx 2 rounds of
dx du substitution
3 2 x x2 4 u2
now use u 2sin du 2cos d , so
dx 2cos
d
2 2
3 2x x 4 4sin
2cos
d
2cos
const
1 u
sin const
2
1 x 1
sin const
By parts 2

if g fig t
fg
Rearranging

fg cfp fig
Integrating
Sfg ffg f's
© Stuart Dalziel (Michaelmas, 2021) 260

fg f fig
. Integration Methods of integration

7.2.7 Integration by parts


Integration by parts is closely related to the product rule presented
in section 4.4. We take (101),
d df dg
f g g f ,
dx dx dx
rearrange,
dg d df
f f g g,
dx dx dx
and then integrate. This time we will work out the definite integral
by integrating between the limits a x b . We find
b dg b d fg b df
f dx dx g dx .
a dx a dx a dx
The first integral on the right hand side can be completed (using the
fundamental theorem of calculus), and we are then left with the rule
for integration by parts
b dg b b df
f dx fg a
g dx . (174)
a dx a dx

Example 75: Integration by parts


Evaluate (a) ln x dx and (b) x sec 2 x dx .

Write ln x dx 1 ln x dx

and identify f ln x f 1x
and g 1 g x.
ln x dx fg f g dx
1
Hence x ln x x dx
x
x ln x x c

© Stuart Dalziel (Michaelmas, 2021) 261


. Integration Methods of integration

(b) x sec 2 x dx and identify

f x f 1
g sec2 x g tan x
x sec 2 x dx fg f g dx
x tan x tan x dx
sin x
x tan x dx
cos x
d cos x dx
x tan x dx
cos x
x tan x ln cos x c

7.2.8 Integration using complex numbers


There are a number of occasions where the use of complex numbers
opens up other possible ways of handling an integral. There are
various theorems that can be used to justify some of assumptions we
shall make here; those shall be dealt with in the NST1B
mathematics course (if you do it).

Example 76: Complex partial fractions


1
Rewrite the integrand of dx as complex partial fractions and
x2 1
hence integrate.
First, find the complex constants a, b such that
1 1 a b a ( x i ) b( x i )
x2 1 ( x i)( x i ) x i x i ( x i )( x i )
x a b 0
i Re( a b) 0
a, b

© Stuart Dalziel (Michaelmas, 2021) 262


. Integration Methods of integration

i ( a b) 1 a b i
a i
2 , b i
2

1
i2 i2
x2 1 x i x i
(We could have done this using the cover-up rule.)

We now integrate this as normal


i2 i 2 i x i
dx ln c.
x i x i 2 x i
This looks quite different from what we might have expected from
(173):
1
dx tan 1 x c .
1 x2
Rewriting
i x i i ix i 2 1 ix 1 i
ln ln i ln ln ix 1 ln ix 1
2 x i 2 ix i 2 2 ix 1 2
ads
and not
Giles
1 x
ln(ix 1) ln ix 1 i tan
1
1 x
ln(ix 1) ln ix 1 i tan
1
2i tan 1 x
i x i 1
ln i 2i tan 1 x tan 1 x ,
2 x i 2
so the two expressions are equivalent. (The standard way is much
easier!)

Recall tanh n EL IA
Complex variable is more useful when dealing with mixes of
exponential and trigonometric functions.

© Stuart Dalziel (Michaelmas, 2021) 263


. Integration Methods of integration

Example 77: Complex mixed trig integration


Evaluate e ax cos x dx for a .

We can write cost Deceit 76

feat cosa de
beefeater da

Defeatist do
W

cat
Relate t c

t c
Rec gin etc costtisiut

acosttsiut
art
em t c

Can
get
Im
feasiut da fam c

© Stuart Dalziel (Michaelmas, 2021) 264


. Integration Integrating even and odd functions

7.3 Integrating even and odd functions


When a function is described as being even or odd then (unless it is
explicitly stated to the contrary) this refers to its symmetry or
antisymmetry about x 0 . Specifically
reflectional f x f x even function,
symmetry abt to
rotational symmetry alot f x f x odd function, (175)
too
antisymmetric
see figure 40. For example f ( x) cos x is an even function,
f ( x) sin x is an odd function. Note that for an odd function
f (0) f ( 0) , so that f (0) 0 . cotherwise the odd
at
will be undefined
2

function
1
to 2

20 10 10 20

20 10 10 20

1
1

2 2

Figure 40: Sketch of an even function (left) and an odd function (right).

This can often be an important idea when working out definite


integrals. For instance, without doing detailed calculations we can
see straight away that
4 x odd odd(176)
dx 0 even
4 1 x2

The reason for this is that the integrand in (176) is an odd function
of x , so that the area under the curve in 0 x 4 exactly cancels
out with the area under the curve in 4 x 0 , to give a total area
of zero. Another example, this time involving infinite limits, is
sin x
dx 0
1 x2

© Stuart Dalziel (Michaelmas, 2021) 265


. Integration Integrating even and odd functions

because again the integrand is an odd function of x .


Of course, for even functions things are different because now the
areas on either side of x 0 add up rather than cancel. For example,
1 x2 1x2
enteron even dx 2 dx (177)
1 1 x2 0 1 x2

while
a
cos x cos x
ad
dx 2 dx (178)
even 1 x2 0 1 x2
In (177) the integral on the right hand side can be calculated using
the substitution x tan y , to give

x2
1 4 tan 2 y 4
2 dx 2 2
sec y dy 2 tan 2 y dy
0 1 x2 0 1 tan y2 0

4
2
2 sec y 1 dy
0

4
2 tan y y 0
2 .
2
Unfortunately, the integral on the right hand side in (178) requires
more advanced methods beyond the scope of this course.

© Stuart Dalziel (Michaelmas, 2021) 266


. Integration Reduction Formulae

7.4 Reduction Formulae


Reduction formulae are often used to reduce a complicated integral
down to something more manageable. For instance, consider

I 2n
0
2
sin 2 n x dx NE at (179)

for n an integer. The idea is to relate I 2n to a similar integral with a


lower power of sin x . We begin by writing
2
I 2n sin x sin 2 n 1 x dx
0

g f
and then use integration by parts from equation (174) (with
f sin 2 n 1 x and g sin x ) to see that

2 0
I 2n sin x sin 2 n 1 x dx
1
0
/2 /2
sin 2 n 1 x cos x 2n 1 sin 2 n 2 x cos x cos x dx
0 0
/2
2n 1 sin 2 n 2 x cos 2 x dx
0

Using the identity cos 2 x 1 sin 2 x to rewrite the last term


/2
I 2n 2n 1 sin 2 n 2 x 1 sin 2 x dx
0
/2 /2
2n 1 sin 2 n 2 x dx sin 2 n x dx
0 0

2n 1 I 2 n 2 I 2n

Rearranging gives the recurrence relation


2n 1
I 2n I 2n 2 , (180)
2n
that we can just apply it over and over again, so

© Stuart Dalziel (Michaelmas, 2021) 267


. Integration Reduction Formulae

(2n 1)
I 2n I 2n 2 ,
2n
(2n 1) (2n 3)
I 2n 4 ,
2n 2n 2
(2n 1) (2n 3) (2n 5)
I 2n 6 ,
2n 2n 2 2n 4

Note how the index on the integral goes down by 2 each time. If we
do this operation n times then the index of the integral goes down
2 rather than
to zero and we end up with interval of
(2n 1)(2n 3)(2n 5) 3 1
I 2n I0 (181)
(2n)(2n 2)(2n 4) 4 2

The point now is that I 0 is very easy to calculate, because


2 2
I0 sin 0 x dx dx 2,
0 0

and putting this back into (181) gives us the final result
(2n 1)!!
I 2n . (182)

A
(2n)!! 2

The products 2 4 6 2n and 1 3 5 2n 1 are


sometimes referred to as semifactorials or double factorials
en a I and can be donated as 2n!! 2 4 6 2n and
(2n 1)!! 1 3 5 2n 1 , respectively. For p !! the parity of p
(i.e. whether it is even or odd) determines whether the even or odd
integers are used.

ft
e.g Lct dt

© Stuart Dalziel (Michaelmas, 2021) 268


Fett É fats
. Integration
J four du
Differentiation of integrals

7.5 Differentiation of integrals


Suppose we have the integral
b(q)
I (q) f ( x; q) dx .
a(q)

Clearly, the result is a function of the parameter q . If we want to


find out dI dq (e.g. if we want to find a stationary point for I (q) ),
then we can either perform the integration (if that is possible) to
determine I (q) then the differentiate it, or handle this somewhat
differently (effectively, differentiating first) to produce what may be
a simpler calculation.
For NST1A the key is to understand how to evaluate dI dq
rather than derive the expression
dI b(q ) f
dx b(q) f b(q); q a(q) f a(q); q .
dq a(q) q

However, to ensure you understand the construction, we will go


through the derivation.
7.5.1 Partial differentiation
To be able to differentiate before computing the integral, we need to
understand something about partial differentiation. This will be
dealt with in more detail in Lent term, but it is important here to
understand the basics.
Consider the function h( x, y) . It is clearly a function of two
variables.

Definition of partial derivative

The partial derivative with respect to x is obtained by treating y as


a constant and differentiating what is left
h h( x x, y ) h( x, y)
lim .
x x 0 x

© Stuart Dalziel (Michaelmas, 2021) 269


. Integration Differentiation of integrals

Similarly
h h ( x, y y ) h ( x, y )
lim
y y 0 y

Example: h( x, y) 4 x 2 ( x 1
2 ) y2

h
2x y2 ,
x
h
(2 x 1) y .
y

Chain rule
Suppose we want to consider how h( x, y) changes if we follow a
path given parametrically by x( s), y( s) . Clearly, we could write

h(s) h x(s), y(s) ,

then ask questions like what is the gradient dh ds as we move along


the path x( s), y( s) . One way would be to complete the substitutions
to form h( s) then differentiate.

For example, if

x s 1, y 1
2 (s 2 4) ,

da fegan
day In

© Stuart Dalziel (Michaelmas, 2021) 270


. Integration Differentiation of integrals

h x(s), y(s)

h( x, y)
s

then substitution gives

h ( s) h x( s ), y ( s ) 4 x( s ) 2 ( x( s ) 1
2 ) y( s) 2
2
s2 4
4 ( s 1) ( s 1 1
2 )
2
5 2s 2s 2 2s 3 1
8 s4 1
4 s5

h ( s)

We can now differentiate


dh
3 4s 6s 2 1
2 s3 5
4 s4 .
ds

© Stuart Dalziel (Michaelmas, 2021) 271


. Integration Differentiation of integrals

The alternative is to use the chain rule. For function of more than
one variable, such as h( x, y) h x(s), y(s) , we need to extend the
chain rule we have used previously. As a starting point, we consider
the two partial derivatives (as calculated above),
h
2x y2 ,
x
h in Sh due to
(2 x 1) y . change
y in a
a change
If we were to move by a small amount x, y , then by analogy with
earlier, we would expect h to change by

h
h
y
x
h
y.
x y

But, if we are confined to the path x( s), y( s) , then clearly for a


small movement s , we would expect
dx dy
x s, y s.
ds ds

in a the same css


dy
are
chges

© Stuart Dalziel (Michaelmas, 2021) 272


. Integration
recall that Differentiation of integrals
St
Thus Ts Ss

h dx h dy
h s.
x ds y ds

Finally, dividing by s and taking the limit s 0 , gives

dh h dx h dy
.
ds x ds y ds

For our example,


dx dy
1, s,
ds ds
so
dh h dx h dy
ds x ds y ds
2x y2 1 (2 x 1) y s
2
2( s 1) 1
2 (s2 4) 1 (2( s 1) 1) 12 ( s 2 4) s
2 4s 1 s2 s3
2 2 s 2 s2 1 s2
4
2

3 4s 6s 2 1
2 s3 5
4 s4

as before.
7.5.2 Differentiation with respect to the parameter
We will consider the three ways in which the parameter comes in
separately, before combining their contributions.

© Stuart Dalziel (Michaelmas, 2021) 273


fax qt Sql a
fax g t sq Eq
. Integration Differentiation of integrals

Janek
Integrand depends on parameter original

Consider I (q )
b

a
f ( x; q) dx valve
and how this changes as we change q :

fafcxiqtsqi
fafgltfasg. i
b dI
I (q q) f ( x; q q) dx I (q) q
a dq
f
y f ( x; q q) f ( x; q) q

f
dI b f q
q q dx
dq a q y f ( x; q)

AYEEE
b
I (q) f ( x; q) dx
a

a
4
b
addition
vale
Here,
f
q
is the partial derivative of f ( x; q) with respect to q : of y
f ( x; q) f ( x; q q) f ( x; q)
lim .
q q 0 q

Partial differentiation will be covered further in Lent term, but for


the present we note that for f q we simply treat x as a constant
and differentiate as normal. In the result, however, x may continue
to vary, thus if g f q , then g g ( x; q) .

From the above, we conclude


b
dI f
dx .
dq a
q

© Stuart Dalziel (Michaelmas, 2021) 274


. Integration Differentiation of integrals

Upper limit depends on parameter


Suppose instead
b(q)
I (q) f ( x) dx ,
a

then moving from q to q q gives

b(q q)
I (q q) f ( x) dx F (b(q q)) F (a )
a

db dF
F (b(q )) q F (a)
dq dx x b(q)

change
small
da db
b(q) q b(q) b(q) q
dq
f ( x) dx f ( x) dx dq
f ( x) dx
in integral
a a b(q)

dI
I (q) q
dq
q
q
dI
q
db a
f (b(q ))
heightdb dF
q
Oc sq
dq dq dq dx x b(q) y f ( x; q)

in b
change

b(q)
I (q) f ( x) dx F (b(q)) F (a)
a

a b
b( q
ca
q ) b( q ) q
db
dq
linear
Hence,
approximation
dI db
f b( q ) .
dq dq

© Stuart Dalziel (Michaelmas, 2021) 275


. Integration Differentiation of integrals

Lower limit depends on parameter


b
If I (q) f ( x) dx ,
a(q)

b
I (q q) f ( x) dx F b F a(q q)
a(q q)

da dF
F (b) F a(q) q
dq dx x a(q)
da
b b a(q) q
da f ( x) dx f ( x) dx dq
f ( x ) dx
a(q) q a(q) a(q)
dq

dI
I (q) q
dq
dI da da dF
q q f (a (q )) q
dq dq dq dx x a(q) y f ( x; q)

T I (q)
b
f ( x) dx F (b) F (a(q))
feacqil a(q)

I
a(q) b
da
a(q q) a(q) q
dq

dI da
f a(q) .
dq dq

t
ve because lover limit

© Stuart Dalziel (Michaelmas, 2021) 276


. Integration Differentiation of integrals

u
Combining parameterized eg
b(q)
For I (q) f ( x; q) dx
a(q)

dI b(q ) f
dx b(q) f b(q); q a(q) f a(q); q .
dq a(q) q x x
db
y
y dg
f ( x; q)
dog
b(q ) f ( x; q)
dx
a(q) q

da y f ( x; q q)
f (a; q)
dq db
f (b; q )
dq
a(q) b( q ) x
a(q q) b(q q)
Figure 41: Differentiating an integral with respect to a parameter.

Different perspective
x
Define primitive F ( x, q ) f (u, q) du

I (q) F b(q), q F a(q), q

Chain rule

dI F db F F da F
dq x x b(q) dq q x b(q)
x x a(q) dq q x a(q)
F x F x
f b ( q ),q f ( u ,q ) du f a ( q ),q f ( u ,q ) du
b q a q

b(q) f ( x; q) db da
dx f b(q); q f a(q); q
a(q) q dq dq

© Stuart Dalziel (Michaelmas, 2021) 277


. Integration Differentiation of integrals

Example 78: Differentiation by parameter


2 /
What is the derivative of I cos( t ) 1 dt ?
0

dI 2 / d d 2
d 0
J d
cos( t ) 1 dt
d
cos( t ) 1
t 2 /
doo city
2 / 2
t sin( t ) dt 2
[cos( t ) 1]
0
t 2 /

1
Integrate by parts ( f t, g sin( t ) f 1, g cos( t )

dI 2 / 2
t sin( t ) dt 2
[cos( t ) 1]
d 0
t 2 /
2 /
t 2 / 1 4
cos( t ) cos( t ) dt 2
0
0

2 2 / 4
2
sin( t ) 0 2

2
2

Here, it would have been easier to determine


2 / 2
I cos( t ) 1 dt
0

then differentiate to get


dI 2
2
.
d

© Stuart Dalziel (Michaelmas, 2021) 278


In tie do
. Integration Differentiation of integrals
n In n Io
I n
Example 79: Gamma function
not be
Evaluate xe n x
dx . But n might
0

generateConsider I ( x
integer
1 x 1
) e dx e for 0.
0
0
ptarameter
Differentiate with respect to :
both
dI e x
x
equating
d 1 1
dx xe dx 2
d 0 0 d
Differentiating again
d 2I x d 1 2
xe dx x 2e x
dx .
d 2 0 0 d 2 3
r
Repeating n times
n!
xne x
dx n 1
. u
0

The particular case of 1 gives

( n) x n 1e x
dx (n 1)! ,
0

for n , n 0 . The generalisation of this to the n defines the


gamma function (this is beyond the scope of this course).

Msingularities
undefined

© Stuart Dalziel (Michaelmas, 2021) 279


. Integration Differentiation of integrals

Example 80: Tripos 2007, paper 1, question 10Y*


(a) Let
x a
f ( x) e tt 1
t x dt
0

where 0 . Find df dx and d 2 f dx 2 . [4]


Show that f satisfies the differential equation
d2 f df
x 2 (1 a x) af 0. [4]
dx dx
(b) Consider
x h(t )
g ( x) dt
0
x t
where h(0) 0 . Explain why we cannot obtain dg dx by the direct
application of the method above. [2]
(c) Integrate by parts to show that
x
g ( x) 2h(0) x 2 h (t ) x t dt . [4]
0

(d) Use this to find an expression for dg dx . [6]


Recall
d s(q) s(q) h(t; q) ds dr
h(t; q) dt dt h( s(q); q) h(r (q); q)
dq r ( q ) r (q) q dq dq
s(q)
Here, we identify r 0, s x, q x, f ( x ) h(t; q) dt , and
r (q)
parameter
t a 1 a
h(t , x) e t x
h
ae t t a 1 x ( a 1)
x
dx
and h ( x, x ) e x x 1 .
dx

© Stuart Dalziel (Michaelmas, 2021) 280


. Integration Differentiation of integrals

df x
ae t t a 1 x ( a 1)
dt e x x 1

dx 0

ax 1 f ( x) e x x 1

Differentiating again using the product role on ax 1 f ( x)


d2 f df
ax 2 f ( x) ax 1
e xx 1 e xx 2

dx 2 dx
ax 2 f ( x) ax 1 ax 1 f ( x ) e x x 1
e xx 1
e xx 2

a (1 a) x 2 f ( x) (1 a) x 2e x
x 1e x

Substitute into the first two terms of the ODE


d2 f df
x 2 (1 a x) x a(1 a) x 2 f (1 a) x 2e x
x 1e x

dx dx
(1 a x) ax 1 f e xx 1

a(1 a) x 1 f (1 a) x 1e x
e x

ax 1 f e xx 1

a2 x 1 f ae x x 1

x
af e
af
and thus the ODE is satisfied.
h(t ) x
(b) The integrand of g ( x) dt is singular when x t but
0
x t
integrable, so we can define an improper integral. However, we
cannot apply the above method, where we are relying on the
differentiating the upper limit as that term ( (dx dx) h( x) x x ) is
now singular.

© Stuart Dalziel (Michaelmas, 2021) 281


. Integration Approximating sums as integrals

(c) Integrate by parts. Noting 1 x t 2 d ( x t ) dt , so


x d
g ( x) 2 h(t ) x t dt
0 dt
x x
2 h(t ) x t 2 h (t ) x t dt
0 0
x
2 xh(0) 2 h (t ) x t dt
0

as required.
(d) Find expression for dg dx . The integrand is no longer singular,
so we can differentiate with respect to parameter x :
dg d x
2 xh(0) 2 h (t ) x t dt
dx dx 0

h(0) dx x h (t )
2 h ( x) x x dt
x dx 0
x t
h(0) x h (t )
dt
x 0
x t

7.6 Approximating sums as integrals


Recall from §7.1.1 that the Riemann sum defined the integral as the
limit of a summation,
b N
f ( x) dx lim ( xi xi 1 ) f ( i ) .
a N
i 1

Obviously, we could approximate the integral as a finite sum (with


the accuracy improving as N becomes large), or we could turn this
around and approximate a sum as an integral. This is often useful in
both physical and mathematical applications.

© Stuart Dalziel (Michaelmas, 2021) 282


. Integration Approximating sums as integrals

Example 81: Integral approximated as a sum


Consider a rod of length a with the mass per unit length varying
linearly from to 3 . What is the total mass?
Mass per unit length at distance x from end
2x
m 1 x
a
for x a (i.e., the variation of mass per unit length within an
element of length x is negligible).
Total mass
2x
m lim m lim 1 x
x 0 x 0 a
a 2x
1 dx
0 a
a
x2
x 2 a
a 0

Here, it would have made more sense to integrate rather than


starting with the sum, but there may be cases with more complex
mass distributions where that is not possible.
In this example, the average mass per unit length was obviously
2 so could have guessed the answer.

© Stuart Dalziel (Michaelmas, 2021) 283


. Integration Approximating sums as integrals

Example 82
Find an approximation for ln n! for large n .
Start by noting
ln n! ln(1 2 3 n)
ln1 ln 2 ln 3 ln n
n
ln k
k 1

for n , n 1.
l
y
text
y ln x

one
if

1 2 3 4 n x

We can bound the integral


n 1 n n 1 n n 1
ln k ln x dx ln(k 1) ln k ln n! ln x dx
1 1
k 1 k 1 k 1
n n n
Integrating by parts ln x dx x ln x 1
dy n ln n n 1
1 1

n ln n n 1 ln n! (n 1)ln(n 1) n
For n 1 giving approximation
dunt
ln n! n ln n n n(ln n 1) . en
This is a good approximation with a fractional error
ln n! n(ln n 1)
1n as n .
ln n!

© Stuart Dalziel (Michaelmas, 2021) 284 In


we
. Integration Approximating sums as integrals

Warning: Approximating n! eln n! nn e n is a poor approximation


with fractional error O(n0 ) since small additive error in ln n!
becomes a multiplicative factor in n! .
A better approximation is n! nn e n
2 n which can be derived
from a saddle-point approximation to the integral in n! x n e x dx
0
this is beyond the scope of this course.

for approximating the


Gamma function (see Example 79).
We can use

xn
We can use Stirling s approximation to demonstrate that 0 as
n!
n for any x . Specifically, we note that
can
be very
n
x ve
ln n ln x ln n!
n! a
n ln x n(ln(n) 1) n tht Leng
So, for any x 0 , we can find n such that ln n 1 ln x ln e ln x
xn
and hence
n!
0 for n e1 x . I lug
e y ell
© Stuart Dalziel (Michaelmas, 2021) 285
et
. Integration

7.7
77
Recall p9 121191 cost
R
E 191 191
Ip q1 S

I p 91 E 125 1912 Cp p q q

Exqat pyqytpzqzjscpttpjtpzh cat E


t
qy t 971
Extend to N dimensions

Emig ECE 77 CEE q U

Lint N 7 0 use Riemann


Take
integral f

Lf forgets day's faltering


b

f a guy da

for any fans gets ER


the exist
provided integrals

© Stuart Dalziel (Michaelmas, 2021) 286


. Integration

More formal proof.


q
Note that ( f g ) 2 dx 0 for all real functions f ( x), g ( x) and
p

real . Then
q q q
2
E f 2 ( x) dx 2 f ( x) g ( x) dx g 2 ( x) dx 0
p p p
possibilities
Since true for all , the left-hand-side, which is quadratic in ,
p
must not have to distinct roots (or the sign would swap).
Considering the form
2
a b c 0
implies b2 4ac , then
q 2 q q
4 f ( x) g ( x) dx 4 f 2 ( x) dx g 2 ( x) dx .
p p p

We have equality
q 2 q q
f ( x) g ( x) dx f 2 ( x) dx g 2 ( x) dx
p p p

if and only if f ( x) g ( x) (c.f. parallel vectors).


This similarity with the scalar product leads to a generalisation of

related
q
the scalar product as f ( x) g ( x) dx for an infinite vector space of

just
p

constant
real (square-integrable) functions.
by

quantum physics.

square integrase
I fail do is
finite
f
© Stuart Dalziel (Michaelmas, 2021) 287
. Integration

Example 83: Tripos 2008, paper 1, question 20Y*


(b) A vehicle moving forward with variable speed in one dimension
is at x xi at time t ti and x x f at time t t f , with t f ti and
x f xi . The time average of the speed v dx dt and the space
average are
d 1 tf 1
adisplacement
x f
Vt v dt , Vx v dx .
tf ti ti xf xi xi
Tspeed
Which is greater, Vt or Vx ? d [1]
over
Give a proof of your assertion.time diff difference in speed
[4]
at endpoints2
tf tf tf
v 2 dt 12 dt v 1 dt
ti ti ti

tf tf tf tf 2 tf 2
2 2 2
v dt 1 dt (t f ti ) v dt v 1 dt v dt .
ti ti ti ti ti

dtr It
Changing variables ( t
tf
x)
tf dx
let ve
xf
dy v
v 2 dt v dt v dx putf Af
transition from ti ti dt xi

xf tf 2
pus
time to (t f ti ) v dx v dt ,
spare xi ti

tf
need to
and noting
ti
v dt xf xi
just
the result
xf tf 2 apply
t f
(t f ti ) v dx v dt (x f xi ) v dt
xi ti ti

1 xf 1 tf
Vx v dx v dt Vt
xf xi xi tf ti ti

since x f xi 0 and t f ti 0.
They are equal if and only if v is constant. LHS
RHS I

© Stuart Dalziel (Michaelmas, 2021) 288


. Integration Multiple integration

7.8 Multiple integration


7.8.1 Double integrals
We frequently want to integrate functions of more than one variable.
For example, if h( x, y) is the height of a pile of grain in the region
A , we may wish to know the volume V of grain.

As a sum
We could approximate this by dividing the region into P elements
of area Ai.

double R
region
Ap E SA

E
Ai

A sa
p

da
for
© Stuart Dalziel (Michaelmas, 2021) 289
. Integration Multiple integration

8A
Volume Up Egham gi 78

V
somewhere within Ai
where to
one
yo
Earlier ID Riemann Integral p

Jafar da
Lisse che ti i
fossil
there
differential element
of men
H

p
Sai
phimgkhcxi.gs
v ffphctiglda
9 double integral
2
integration signs N
tune over the 207
literary

© Stuart Dalziel (Michaelmas, 2021) 290


. Integration Multiple integration

Rectangular region
In the simplest case, we could consider the area A as the rectangular
region a x b and c y d .
your
Integrate over R qhcx.gl
Rectangular grid
8 a boy

Sy dnt
St
a t Ty
Sai Sy b
C
g
We could then divide this region into M divisions of size
x (b a) M in the x direction, and N divisions of size
y (d c) N in the y direction. The area of each of the
P M N elements is then A x y and we can rewrite the sum
as
P M N
VMN h xi , yi Ai h xi , y j y x
i 1 i 1 j 1

where a (i 1) x xi a i x and c ( j 1) y yj c j y.
heat gist Lexi
EY Chai gist t
you
Note that the order ofGage sums can1betoreversed:
the two from me
Sys
M N N M
VMN h( xi , y j ) y x h( xi , y j ) x y .
i 1 j 1 j 1 i 1

order doesn't matter


Let M N as i St Sy o

Van
JJ handy
© Stuart Dalziel (Michaelmas, 2021) 291
. Integration Multiple integration

The natural analogy of this sum is the double integral


b d
V h x, y dy dx .
a c

d
We compute the inner integral, h x, y dy first treating x as a
c
constant parameter. The result of the inner integral is independent of
y , but still depends on x . Hence the outer integral is identical to
the normal integration procedure.
As with the order of summation, the order in which we integrate can
be interchanged

b d d b
Hiya
V h x, y dy dx h x, y dx dy
a c c a

so that the inner integral is computed over x while holding y


constant. small partition
Comparing
area v
of at the
height function
A
V
b d
h x, y dy dx .
point
a c

with

V h x, y dA
A
R
shows clearly that dA dy dx and the area A corresponds to that
given by the limits a , b , c and d .

R a Gta 67 A
Jr da Jaff dyda
Ete de
y
© Stuart Dalziel (Michaelmas, 2021)
ffpI 1 day
292

ay ed c
. Integration Multiple integration

This equivalence is analogous to expressing the double integral as


the pair of sums of single integrals:
M d N b
V x h xi , y dy y h x, y j dx .
i 1 c j 1 a

(a) (b)

Lexi grist Sy
3
g

(c)
Figure 42: Approximations of double integral as sums of single integrals (a) & (b),
or double sum of function values (c).

© Stuart Dalziel (Michaelmas, 2021) 293


. Integration Multiple integration

Other notations
We will often write the integral without the brackets as
b d
V h x, y dy dx .
a c

There can be ambiguity as to which limit corresponds to which


variable: most people/fields work outwards from the integrand (here
h( x, y) ) so that the dy corresponds to the inner integral with limits
c and d , while the dx corresponds to the outer integral with limits
a and b . However, sometimes this order is reversed. To avoid the
ambiguity we sometimes write
x by d b d
V h x, y dy dx or V h x, y dy dx
x a y c x ay c

to make it explicit which limits correspond to which variable.


In some fields (e.g. some branches of theoretical physics) it is
common to place the increment immediately after the corresponding
integral sign and write the integral as
b d
V dx dy h x, y
a c

Sometimes this becomes


b d
V dx dy h x, y .
a c
Cta Cd
which runs the risk of interpreting the equation as the product of
c
hotly
two integral resulting in V as a function of x, namely
b d d
V x dx h x, y dy b a h x, y dy .
a c c

© Stuart Dalziel (Michaelmas, 2021) 294


. Integration Multiple integration

Obviously it is best to make your notation unambiguous, even if that


means additional brackets. For this course, if multiple integration
does not make it clear in other ways then you should interpret the
integral in the following manner:
b d b d
V h x, y dy dx h x, y dy dx .
a c a c

Examiners like to set questions using a range of notations to help


reinforce that it is the meaning and techniques that is important,
rather than the precise way an expression is written.

Non-rectangular region
We may readily extend these ideas if the region to be integrated
over is not rectangular.

Yet tolyltreys
to
you
X
go
A
fogies gourdes
L t.ly tolyldy
© Stuart Dalziel (Michaelmas, 2021) 295
. Integration Multiple integration

ex
region you Eye yo
79
or
Integrate I
to stet
for A

Area
f y ca
you da

join
your
dy
da

me L

J fyi
da
his.gr dy F

First compute inner


integral
F

f your
Lune hea c treat a as
y dy though it's
O

constant
Then outer integral
ti
V
f to
I can do

© Stuart Dalziel (Michaelmas, 2021) 296


. Integration Multiple integration

Note that if h( x, y) 1 , then


x1 y1 x x1 y1 x x1
y1 x
V h x, y dy dx 1 dy dx y y0 x
dx
x0 y0 x x0 y0 x x0

x1
y1 x y0 x dx
x0

which is simply the area A over which we are integrating.

Changing the order of integration


The convex region R , defined by y0 ( x) y y1 ( x) for x0 x x1 ,
can, in principle, also be defined as x0 ( y) x x1 ( y ) for
y0 y y1 .
which choice is easier
y1 ( x) y1
x1 ( y )
R x0 ( y) R
y0 ( x)
y0
x0 x1

Consequently, as our region is convex, we could have specified the


region over which we are integrating by giving the boundary of it as
x0 ( y ) and x1 ( y ) over the interval y0 y y1 , expressing the integral
as
y1 x1 y

V h x, y dx dy .
y0 x0 y

Making this change in order may make the integration simpler, but
can only be done analytically if the expressions describing the
boundary can be inverted.

© Stuart Dalziel (Michaelmas, 2021) 297


. Integration Multiple integration

Jj h dy da
f handy

Figure 43: Approximation of double integral over nonrectangular region.

Our choice of the order of integration is often dictated by the need


to express the limits of the inner integral in terms of the independent
variable of the outer integral; it is not always possible to invert
x0 ( y ) and x1 ( y ) into y0 ( x) and y1 ( x) .

If the region is not convex, we may need to work a little harder to


change the order in which we perform the integrals and utilise sums
and differences across different regions.

y1 ( x) y1 x2 ( y )
y2 x3 ( y )
S S
x0
y0 ( x)

x1
y0 x0 ( y) x1 ( y )

x1 y1 ( x )
h( x, y ) dA h( x, y ) dy dx
S x0 y0 ( x )
y2 x1 ( y )
h( x, y ) dx dy
y0 x0 ( y )
y1 x2 ( y ) y1 x1 ( y )
h( x, y ) dx dy h( x, y ) dx dy
y2 x0 ( y ) y2 x3 ( y )

© Stuart Dalziel (Michaelmas, 2021) 298


. Integration
ie doesn't contain a
Multiple integration

Separable integrand or che vanishes


g
y
If we can write f ( x, y) g ( x)h( y) and the limits in x an y are
independent, then we can separate the integral into the product of a
pair of single integrals:
coltan se need to be in
limits b d

If are
I f x, y dy dx in the calculations
constants a c

can't just separate


b d
g x h y dy dx
fangs gun hey a
b
c
d
g x h y dy dx
a c
b d
g x dx h y dy
a c

Example 84: Integration over triangle


Evaluate the integral of xy over the triangle T enclosed by the lines
y = 0, x = 0 and y = 2 2x:

I xy dA xy dx dy xy dy dx
T T T

y=2 2x

© Stuart Dalziel (Michaelmas, 2021) 299


. Integration Multiple integration

We may evaluate this integral in two different ways.


Specifying the inner integral in terms of y:
1 2 2x
I xy dA xy dy dx
T 0 0
1 y 21 x 1
1 2 2
xy dx 2x 1 x dx
0
2 y 0 0
1
2x 4x2 2 x 3 dx yea
0
1
2 4 3 1 4 6 8 3
x x x
3 2 0 6
1
6
Specifying the inner integral in terms of x:
y 2(1 x) x 1 y 2
1
2 1 2
y

I xy dA xy dx dy
T 0 0
1
2 x 1 y 2
1 2 2
1
dy
2
x y dx 1 1
2 y y dx
2 2
0
2
x 0
dy 0

1
2 y 1
2 y2 1
8 y 3 dy ay
0
2
1 2 1 3 1 4 4 1 6 8 3
y y y 1
4 6 32 0 3 2 6
1
6

© Stuart Dalziel (Michaelmas, 2021) 300


. Integration Multiple integration

Example 85: Integral in a circle


By evaluating a double integral, find the area within the circle of
radius a centred on the origin. (Call this region C.)

y = (a2 x2)1/2

y = (a2 x2)1/2

As we saw before, the area is the double integral of the function


f ( x, y) 1 over the region (C). In terms of x , the upper and lower
bounds on y are y1 (a 2 x 2 )1/2 and y0 (a 2 x 2 )1/2 .
Hence we are interested in the integral
12
a a2 x2

I dA dx dy dy dx
C C
12
a a2 x2

a 12 a
a2 x2 12
y 2 12
dx 2 a2 x2 dx
a2 x
a a

Let x a sin dx a cos d


/2
vale
1
2 2
I 2a 1 sin a cos d
the new
of
/2
/2

when 2a 2
cos 2 d a2
integral to
substituent a /2

original
tch cos EO
© Stuart Dalziel (Michaelmas, 2021) 301
. Integration Integration in 2D polar coordinates

7.9 Integration in 2D polar coordinates

SA St 80
so far used try Sy S

da da
dy
dA ahcx.gl dady
hexing B
Jfa
v

O is easier
But for some
region wing
r

than try
y eat da x2

T you date
SA Sa Sy SA r so fr
V

Is fern
If
Up On 8A EM 8 so
fevi Oj tri w

Sr re So it
R

V for on da
fff
on order do
Jf
Jiff
do
for on
© Stuart Dalziel (Michaelmas, 2021) rdr
302
. Integration Integration in 2D polar coordinates

Example 86: Integrate over a circle (2)


Integrate f(x,y) = x2 + y2 over a circle C of radius a centred on the
origin.

I x2 y 2 dx dy .
r cost
C
r since
Now in polar coordinates, r 2 x2 y2 g
f ( x, y) r 2 f (r , )
and

I x2 y 2 dx dy r 2 r dr d
C C

These two integrals are just different ways of writing the same
thing. We have the freedom to choose either; obviously choosing
the second will be easier!
a
3
I r dr d r 3 dr d
C 0

4 a a4
1
4 r d d
0 4
a4
2
Alternatively, we could have performed the integrations in the
opposite order:
a a
3 3
I r dr d r d dr r3 d dr
C 0 0
a a
3 4

0
2 r dr
2
r
0
separable
a4
2

© Stuart Dalziel (Michaelmas, 2021) 303


. Integration Triple integrals

In the above we have made use of the fact that the integrand is
independent of over the region (i.e. the integrand is circularly
symmetric). If computing the volume as a sum, then we could have
used many small circles of radius r, thickness dr and area 2 rdr and
started from
a a
2 2 3 a4
I r dA r 2 rdr 2 r dr .
C 0 0
2

Aside You do not need to know this.


The integral computed here is the second moment of area. In
particular, it is the integral of the area weighted by the square of
the distance from the centroid. This quantity is closely related to
the moment of inertia per unit mass of a circular disk of unit radius
a. If rotating about the origin with an angular velocity then the
kinetic energy of the disk will be ½I 2. [This expression should
be compared with ½mu2, the kinetic energy of a mass m moving
with velocity u.]

7.10 Triple integrals


We may extend the ideas of double integrals to triple integrals (and
indeed even more nested integrals). Whereas the double integrals
can be interpreted as determining a quantity integrated over an area,
a triple integral can be viewed as representing a quantity integrated
over a volume.
to 3D 40
Extend from 2D
da
da
dy
3D
fffupctig.tl
perdu
fffu Yosition vector
© Stuart Dalziel (Michaelmas, 2021) 304
. Integration Triple integrals

Instead of an elemental area dA that can be expressed as dx dy , we


can consider an elemental volume dV that can be expressed as
dx dy dz . In particular, we can write a triple integral as

I f x, y, z dV f x, y, z dx dy dz
V V

corresponding to the limit of the sum


Svi 0
P
SP f xi , yi , zi Vi as
i 1
Ros
where the point ( xi , yi , zi ) falls within the elemental volume Vi .

In the special case of f ( x, y, z ) 1 , then I is just the volume.

The elemental volume dV can be expressed in Cartesian


coordinates as dx dy dz (as above), or we can use some other
coordinate system.

17ft
Cylindrical polar coordinates
Youth
fticyiz f
nocy
Y
7
dadydz
In cylindrical polar coordinates, we replace ( x, y, z ) with (r , , z )
and replace dV dx dy dz with dV r dr d dz . Note the similarity
with two-dimensional polar coordinates. Also note that r 0 and
select .

Tsar z

y
I r

sat O

8th x

gu sour 8 Sz
© Stuart Dalziel (Michaelmas, 2021) 305 durdrdodz
. Integration Triple integrals

Spherical polar coordinates


In spherical polar coordinates (r , , ) we use
dV r 2 sin dr d d . This is effectively the volume of a cuboid
with sides dr , r d and r sin d . It is important to remember
that r 0 , 0 and (or equivalently 0 2 ).

z r
sin of
0
r
since
y I
Iso
y

x Sr

Strategy
1 Choose the coordinate system taking into account the shape of the
volume V and the form of the integrand f ( x, y, z ) to make the
calculation as simple as possible;
2 Determine limits, e.g. y0 ( x) y y1 ( x) and x0 x x1 , or
0 r a and 0 2;
3 Rewrite the integrals (including integrand) in terms of the selected
coordinate system;
4 Look to see if the integrand is separable and the limits
independent of each other;
5 Decide on order in which to integrate;
6 Integrate with respect to one variable at a time, working our way
outward through all variables. Each integration eliminates one of
the variables.

© Stuart Dalziel (Michaelmas, 2021) 306


. Integration Triple integrals

Example 87: Mass of a sphere


Calculate the mass of a sphere with uniform density 0 and radius a.
M 0 dV .
V

It will obviously be easiest if we choose the origin at the centre of


the sphere. Moreover, we expect spherical polar coordinates to be
the best choice.
The sphere is therefore the region 0 r a , 0 and
, and the volume element is dV r 2 sin dr d d , so
a
M 0 dV 0 r 2 dr sin d d
V
0 0

Since the limits are all independent, and the integrand can be
factorised into parts containing no more than one of the
independent variables, then we can rewrite this as
a
M 0 r 2 dr sin d d
0

3 a
0r cos
1
3 0 0

1
3 0 a3 2 2
4
0 a3
3
Not surprisingly, the mass is just the product of the density and the
volume.
We could have evaluated the integral in Cartesian coordinates by
noting that the sphere is the region
(a 2 y2 z 2 )1/2 x (a 2 y2 z 2 )1/2 ,
(a 2 z 2 )1/2 y (a 2 z 2 )1/2 ,
a z a.

© Stuart Dalziel (Michaelmas, 2021) 307


. Integration Triple integrals

z
2 2
x0 r y
a2 z2 y2 x1 r2 y2
a2 z2 y2

r a2 z2
y

r a

Thus
1/ 2 1/ 2
a a2 z 2 a2 y2 z 2

M 0 dV 0 dx dy dz
V
a 2 1/ 2 2 1/ 2
a2 z a2 y2 z

1/ 2
a a2 z 2 1/ 2
a2 y2 z 2
0 x 1/ 2 dy dz
a2 y2 z 2
a 2 1/ 2
a2 z

1/ 2
a a2 z 2
1/2
0 2 a2 y2 z2 dy dz
a 2 1/ 2
a2 z

Making the substitution


y = (a2 z2)1/2 sin dy = (a2 z2)1/2 cos d
a /2 a
2 2 2
M 0 2 a z cos d dz 0 a2 z2 dz
a /2 a

a 4
0 a2 z 1
3 z3 0 a3
a 3

© Stuart Dalziel (Michaelmas, 2021) 308


. Integration Triple integrals

Example 88: Mass of cylinder


Suppose the density of a cylinder of radius a and height 2h ,
centred on the origin, varies as ( x, y, z ) 1 c( x 2 z 2 ) . Calculate
the mass of the cylinder.

a roost
due rdrdodz
OE sa

2h Tra s t

h s z eh
M dV x, y, z dx dy dz .
V V

The circular symmetry of the domain suggest using cylindrical polar


coordinates

M dV 1 c x2 z 2 dx dy dz
V V
z h r a
1 cx 2 cz 2 rdr d dz
z h r 0
z h r a
1 cr 2 cos 2 cz 2 rdr d dz
z h r 0
z h
a
1
2 r2 1
4 cr 4 cos 2 1
2 cr 2 z 2 d dz
0
z h

© Stuart Dalziel (Michaelmas, 2021) 309


. Integration The Gaussian integral

z h
1
2 a2 1
4 ca 4 cos 2 1
2 ca 2 z 2 d dz
z h
z h
a2 1
4 ca 4 ca 2 z 2 dz
z h
h
a2 z 1
4 ca 4 z 1
3 ca 2 z 3
h

2 a2h 1 1
4 ca 2 1
3 ch 2
In the special case of c 0 this recovers the expected result of the
volume of the cylinder 2 a 2 h .
Note that the integrations above could have been performed in
any order.
We could also have performed the integration in Cartesian
coordinates, but it would have been more difficult.

7.11 The Gaussian integral


The integral of exp( x 2 ) crops up frequently in science. We will
encounter this as the normal distribution in §8.10 in the next
chapter. Suppose
a
x2
Ia e dx .
a

Unfortunately, normal tools do not work. However, we can compute


this analytically in the limit a :
x2
I e dx

How?
It
© Stuart Dalziel (Michaelmas, 2021) 310
. Integration The Gaussian integral

Let Ia
fait de limit as as 81

consider cat
If e do I t is
dummy
variable

tan
Jae Lfa toy e I

J fjaé
é
dy on

Safia EY dy da

mga
let Jean
JI f é dree

Jca Iaf J cha

Consider Contribution four re Ca Ja at


A
Ka J cha J ca

watch in
fifty é do I é
or

mat value within


a o
giggle the annulus

therefore As a 30 I a
Jca
Is Indo f
© Stuart Dalziel (Michaelmas, 2021) é't 311
ar a e I
Is NE e TU
. Integration The Gaussian integral

Error function
You do not need to know the details of this for NST1A.
The frequency in which Gaussians need to be integrated has led to a
special function being defined in terms of the integral, the error
function
z
2 x2
erf z e dx ;
0

where the factor in front means lim erf( z ) 1.


z

We can determine the Taylor Series expansion by integrating that


2
for e x and noting erf( x 0) 0 :
n
x4 x6 1 x2n
exp( x 2 ) 1 x 2
2! 3! n!
2 z
x2
erf( z ) e dx
0

n
2 z x4 x6 1 x2n
1 x2 dx
0 2! 3! n!
n
2 1 3 z5 z7 1 z 2n 1

z z
3 5(2!) 7(3!) (2n 1)( n!)

© Stuart Dalziel (Michaelmas, 2021) 312


. Integration Worked examples

7.12 Worked examples


Normal integration tripos questions

Example 89: Tripos 2005, paper 2, question 11F


(a) By expressing the integrand in partial fractions, evaluate
2 3x 2 5 x 1
dx [7]
1 x( x 1)( x 2)
(b) Evaluate the definite integral
1 4
d [6]
0 1 cos 2
(c) Using your results from (b), or otherwise, evaluate the definite
integral
2 1
d [7]
0 1 sin
Express integrand as partial fractions
3x 2 5 x 1 a b c
.
x x 1 x 2 x x 1 x 2
-
1 1 3 5 1 12 10 1 3
a ,b 1, c
1 2 2 1 1 2 1 2

© Stuart Dalziel (Michaelmas, 2021) 313


. Integration Worked examples

2 3x 2 5 x 1 2 1 1 32
dx dx
1 x( x 1)( x 2) 1 2x x 1 x 2
2
1 3
ln x ln x 1 ln x 2
2 2 1

1 3 3 4
ln 2 ln ln
2 2 2 3
1 4 3 4
ln 2 ln ln ln
2 3 2 3
3 1 4
ln 2 ln
2 2 3
1 4
ln 8 ln
2 3
1 32
ln
2 3
4 1
(b) d
0 1 cos 2
Noting the identity 1 cos 2 2cos 2 ,
4 1 /4 1
d d
0 1 cos 2 0 2 cos 2
1 /4 1 /4 1
sec 2 d tan 0
1 0
2 0 2 2
1
2
2 1
(c) d .
0 1 sin
Want to transform into a similar form for that in (b).
Noting that sin A 2 cos A and consider A 2 .
Let 2 2 2 4 d 2d
Transform limits: 0 4, 2 4 4 0

© Stuart Dalziel (Michaelmas, 2021) 314


. Integration Worked examples

2 1
I d
0 1 sin
0 2d
integration /4 1 sin 2 1
2
via substitution 0 1
2 d
/4 1 cos 2

0 4
As integrand even then
4 0

1 /4
I 2 d
0 1 cos 2

1
2 b 2
2
1

Example 90: Tripos 2004, paper 1, question 4B


(a) By expressing the integrand in partial fractions, evaluate
b x 1
dx ,
a x( x 1)
where a and b are positive, giving your answer as a natural
logarithm of a rational function of a and b . [7]
(b) Evaluate
tan 2 x dx [7]

(c) Sketch the function ln x for 1 x e and use your sketch to put
the following integrals in ascending order of numerical value:
e e e
I1 lnx dx I2 ln( x 2 ) dx I3 (lnx) 2 dx [6]
1 1 1

© Stuart Dalziel (Michaelmas, 2021) 315


. Integration Worked examples

b x 1
(a) dx
a x( x 1)
By cover-up rule
x 1 p q 1 2
x x 1 x x 1 x x 1
b x 1 b 1 2
dx dx
a x x 1 a x x 1
b
ln x 2 ln x 1 a
2
a b 1
ln 2
a 1 b

(b) tan 2 x dx

Recalling the identity tan 2 x sec2 x 1,


tan 2 x dx sec 2 x 1 dx tan x x c
e e e
2
(c) I1 lnx dx I2 ln( x ) dx I3 (lnx) 2 dx
1 1 1

The function ln x passes through zero at x 1 and unity at x e .


The curvature of this function is negative ( d 2 ln x dx 1 x2 )
y 1

x 1 x e

y 0

© Stuart Dalziel (Michaelmas, 2021) 316


. Integration Worked examples

The integrand is positive over the range for all three integrals and
monotonically increasing with x .
As x 2 x , then ln x 2 2ln x ln x and I 2 I1 .
Since the integrand is less than unity (except at the upper bound)
2
for I1 and I 2 , then ln x ln x , except at the boundaries. Hence
I 3 I1 . Thus we have the order
I3 I1 I2 .

Multiple integration tripos questions

Example 91: Tripos 2004, paper 1, question 12F


A solid right circular cone C of height h and base radius a is
bounded by the surfaces r = a(1 z/h) and z = 0 where r and z are
cylindrical polar coordinates so that r is the distance from the axis
of the cone. If the density is given by
r
r 0 1 ,
a

find the total mass M dV of the cone. [10]


C

Find also the distance d of the centre of mass of the cone from its
base, using the formula
Md z dV . [10]
C

OE r E all EW
Te LO EN
O E z Sh
© Stuart Dalziel (Michaelmas, 2021) 317
. Integration Worked examples

82

T
o

W
0

S
a
c

© Stuart Dalziel (Michaelmas, 2021) 318


. Integration Worked examples

A
t

h
d

© Stuart Dalziel (Michaelmas, 2021) 319


. Integration Worked examples

T
r
t

W
c

T
p

© Stuart Dalziel (Michaelmas, 2021) 320


. Integration Worked examples

Example 92 : Tripos 2005, paper 1, question 8D


(a) Evaluate
2 2 2 dx dy dz
2 3 4
. [3]
1 1 1 x y z
(b) Evaluate using 2-D polar coordinates
yx 2 x2 y 2
dx dy 2 e . [6]
0 0 x y2
83

A
c
w

© Stuart Dalziel (Michaelmas, 2021) 321


. Integration Worked examples

b as
interpret (

city
2
JJ L
W
e
clyde u

My petty
try
so faster than

increases
try
as
foxy try
so as
N
0
let arcoso dardrdle d

using
ye

I
sinocosoréirdrdo
J
N
f

If sinocotodoliffé'd i

d
0 1 0
© Stuart Dalziel (Michaelmas, 2021) 322
t
by pats
. Integration Worked examples

for let
f pé dr

u r u I
T

v ret v ter
i
o
w

integrate uv
fur nu

Fret ft é or

o
If é or

EE
Recall
fgé or E

I
t.IE TE I

© Stuart Dalziel (Michaelmas, 2021) 323

You might also like