Chapter 4 S1 21-22
Chapter 4 S1 21-22
Chapter 4 INTEGRATION
4.1 Areas under Curves
4.2 The Definite Integral
4.3 Properties of the Definite Integral
4.4 The Fundamental Theorem of Calculus
4.5 Integration by Substitution
4.6 Integration by Parts
4.7 Additional Techniques of Integration.
Partial Fractions
4.8 Integration Using Tables and Computer
Algebra Systems
4.9 Numerical Integration
4.10 Improper Integrals
1
Introduction
3
DISTANCE PROBLEM: Variable velocity
Suppose the velocity
varied as shown.
The total distance traveled
would be the sum of the
areas of the rectangles.
We can:
• approximate the region by rectangles
• sum the areas of these rectangles
• take the limit of the sum as the number of
rectangles increases
5
Example 1
Use rectangles to estimate the
area A of the region S under
the parabola y = x2 from 0 to 1.
6
Example 1, cont.
y = x2
Each rectangle has width ¼.
The height of each rectangle
is the value of f(x) = x2 at the
right-hand side of each strip,
i.e. the heights are
(¼)2, (½)2, (¾)2, and 12.
15
The area
32 A of S is less than R4, so A < 0.46875
7
Example 1, cont.
Alternatively, we could
draw rectangles using
left-hand endpoints.
2 2 2
L4 1 02
4
1 1
4 4
1 1
4 2
1 3
4 4
0.21875
From the graph, we see that A > L4.
Thus we have lower and upper estimates for A:
0.21875 < A < 0.46875 8
Example 1, cont.
9
Example 1, cont.
Using a
computer we
get these
results:
11
Example 2, cont.
Divide the interval into n strips.
Each rectangle has width 1/n
The heights are the values of
f(x) = x2 at the points 1/n, 2/n,
3/n, …, n/n.
That is, the heights are
(1/n)2, (2/n)2, (3/n)2, … , (n/n)2.
2 2 2 2
11 12 13 1n
So, Rn ...
nn nn nn nn
n
1 2 2 2 1
3 (1 2 3 ... n ) 3 i 2
2
n n i 1 12
Example 2, cont.
Using the formula given, we have
1 n 2 1 n(n 1)(2n 1) (n 1)(2n 1)
Rn 3 i 3
n i 1 n 6 6n2
1 1 1 1 1
So, lim Rn lim 1 2 (1)(2)
n n 6 n n 6 3
We have proved the required result.
Notes
• It can similarly be shown that lim Ln 13
n
• As n increases, Rn and Ln become better and better
approximations to the area A.
That is, A lim Rn lim Ln 13 .
n n 13
AREA PROBLEM – Generalised
What is the area A of region S under a non-negative
function y = f(x) between x = a and x = b ?
• S has width (b – a).
• Subdivide it into n
strips of equal width
ba
x .
n
• [a, b] is divided into n subintervals:
[x0, x1], [x1, x2], . . . [xi-1, xi] . . . [xn-1, xn] with x0 = a, xn = b.
• Approximating each strip by a rectangle using right
hand end points, we have n
Rn = f(x1)∆x + f(x2)∆x + … + f(xn)∆x
f ( xi ) x
i 1 14
As n → ∞, the area of the rectangles becomes closer to A.
8
0
4
b) 2 f ( x) dx d) f ( x) dx
21
Writing an integral as a Riemann sum
For a function f(x) continuous on [a, b], taking
• sub-intervals Δx of equal width, and
• the sample points to be right endpoints, xi* = xi ,
the definition on slide 19 simplifies to:
n
b
a f ( x)dx lim
n
f ( xi )x
i 1
ba xi a i x.
where x and
n
E.g. for 0 sin x dx we have f ( x) sin x on [0, ]
0
so x n n , xi 0 i n .
n
Hence
0 sin x dx nlim
i 1 n
sin( i ).
n
Example 4
4
a) Write the integral I (2 x 1)dx as the limit of a Riemann
sum, and thus evaluate it. You may use the result i n(n 1) .
1 n
i 1 2
23
b) Confirm your answer to part (a) by sketching a graph of
the area represented by integral I, and using geometry to
evaluate it.
24
4.3 Properties of the Definite Integral
If f and g are integrable on an interval containing a, b and c,
a
a f ( x)dx 0
b a
a f ( x)dx b f ( x)dx
b b b
a [f ( x) g ( x)]dx a f ( x)dx a g ( x)dx
b c c
a f ( x)dx b f ( x)dx a f ( x)dx
a
If fo is an odd function then
a
f o ( x)dx 0
a a
If fe is an even function then a
f e ( x)dx 2 f e ( x)dx
0
25
Comparison Properties
b
If f(x) ≥ 0 for a ≤ x ≤ b then a
f ( x)dx 0.
b b
If f(x) g(x) and a b then
a
f ( x)dx g ( x)dx.
a
b b
If a b then
a
f ( x )dx f ( x ) dx.
a
26
Example 5
2 x2
Show that
0
e dx 2
and find a lower limit to the value of the integral.
27
4.3 A Mean Value Theorem for Integrals
If f is continuous on [a, b] then there exists
b
c [a, b] such that f ( x)dx f (c)(b a)
a
29
4.4 The Fundamental Theorem
of Calculus
Finding integrals by using Riemann sums can be slow!
Thankfully there is an easier way, which relies on the
relationship between integration and differentiation.
Revision:
• An antiderivative, F, of function f is a function such
that F (x) = f(x).
• Antiderivatives are not unique: If F(x) is an antiderivative
of f(x) then so is G(x) = F(x) + C for any constant C.
30
The Fundamental Theorem of Calculus (FTC) has 2 parts.
FTC – Part A
I.e. d x
dx a
f (t ) dt f ( x )
dx 1
31
Example 6 Find the following
a) d
x
1 e t
dt
dx 5
d u
2
b) sin( r ) dr
du 2
d 20
2
c) sin( t ) dt
dx x
32
Proof of FTC – Part A
x
F ( x) f (t )dt is an antiderivative of f.
a
F ( x) lim
h 0
F ( x h) F ( x )
h
lim
1 xh
h 0 h a
x
f (t )dt f (t )dt
a
1 xh
lim f (t )dt
h 0 h x
1
lim f (c )h for some c between x and x + h
h 0 h
a f ( x)dx f ( x)dx a
b b (Newton Leibnitz
formula.)
34
Example 8
1
Evaluate a) 0
x 2 dx
/2
b)
0
cos x dx
Note
b
a
f ( x)dx F (b) F (a) is the definite integral of f on [a, b]
x
From Part A, F ( x) a
f (t )dt is an antiderivative of f on J
37
Example 10
c) Find the area under the curve y = sin 2x, above y = 0
between x = 0 and x = /2.
38
The Net Change Theorem & Practical Applications
• From the FTC we know that
dF b
if f ( x)
dx
then a f ( x) dx F (b) F (a)
• If F(x) is a quantity, f = dF/dx is its rate of change.
41
Example 12
The marginal cost in producing x computer chips (in units
of 1000) is C ( x) 150 x 2 3000 x 17500 ($ per 1000 chips).
a) Find the cost of increasing production from 10,000 to
15,000 chips.
b) Assuming set up costs were $35,000, that is C(0) =
35,000, find the total cost of producing 15,000 chips.
42
Displacement and Distance Traveled
Earlier we said the area under a velocity-time graph (for positive
velocities) represents distance travelled. Now we can prove this.
44
4.5 Integration by Substitution
• By the FTC, we can evaluate an integral if we can find
an antiderivative of the integrand.
• Sometimes we can find an antiderivative by inspection.
To be able to do this, you should memorize elementary
derivatives and integrals.
• But many integrals cannot be solved by inspection.
Finding antiderivatives is generally harder than finding
derivatives – indeed sometimes it is impossible!
• There are two main techniques which enable us to
evaluate many common integrals.
• The substitution rule (section 4.5)
• The method of integration by parts (section 4.6)
45
The Substitution Rule for Indefinite Integrals
Let f and g be functions and let F be an antiderivative of f.
The Chain Rule of differentiation (2.3.2). can be written
F g ( x) F g ( x) g ( x) f g ( x) g ( x)
d
dx
Integrating both sides we get
f g ( x)g ( x)dx F g ( x) C
Using the substitution u = g(x), so du = g(x)dx, we can
rewrite this: f (u) du F (u) C
Substitution Rule:
xe
x2
a) Find dx
2 3 7
b) Find x (2 x 1) dx
1)dx
2
a) Find x sin( x
2
x
b) Find
x3 1 dx
48
The Substitution Rule for Definite Integrals
50
Example 17
3
Find the area under the curve y on [1, 2].
5x 1
51
Example 18
Prove that for all positive integers n,
/2 /2
cos x dx
n
sin n x dx
0 0
Solution
/2 /2
I cos x dx
n n
sin ( x) dx
0 0 2
Let u = /2 – x . Then du = – dx.
The limits of integration become u(0) = /2, u(/2) = 0,
so
0 /2 /2
I sin u du
n
sin u du
n
sin n x dx
/2 0 0
52
Inverse Substitution
• So far we have used direct substitutions: we have
replaced a function in the integrand with a new variable.
• Sometimes it is more helpful to do inverse substitution:
replace the variable of integration with a function of a
new variable.
Example 19
dx
Find 1 / 2 using the inverse substitution x = u6.
x (1 x1 / 3 )
53
4.6 Integration by Parts
Suppose U(x) and V(x) are two differentiable functions.
The Product Rule of differentiation is:
d
U ( x)V ( x) U ( x) V ( x)
dV dU
dx dx dx
This can be rearranged:
U ( x)
dV
d
U ( x)V ( x) V ( x) dU
dx dx dx
Integrating both sides w.r.t. x gives
dV dU
U ( x) dx
dx U ( x)V ( x) V ( x)
dx
dx
or more simply,
UdV UV VdU
54
Example 20 Find the following integrals:
a) x tan 1 x dx
3
b) ln x dx
1
55
e
c) x 6 ln x dx
1
Integral of ln x
By parts it is easily shown that
ln x dx x ln x x C
56
4.7 Additional Techniques of
Integration
Integrals of tan, cot, sec and cosec.
• We know tan x dx ln cos x C (Example 15c)
59
4.7 Partial Fractions
In this section we learn how to evaluate integrals of
the form P( x) dx where P and Q are polynomials.
Q( x)
60
Introduction to Partial Fractions
In a fraction p/q, p is called the numerator, q is the
denominator.
To add or subtract fractions, we use a common
denominator. For example,
2 1 2( x 2) 1( x 1) x5
2
x 1 x 2 ( x 1)( x 2) x x2
Using this result in reverse enables us to integrate
the function on the RHS above:
x5 2 1
x 2 x 2 dx x 1 x 2 dx = 2ln|x – 1| – ln|x + 2| + C
This is the idea of the method of partial fractions: to
integrate a rational function, P(x)/Q(x), we first
express it as a sum of simpler terms. 61
Theory of Partial Fractions: Case 1
Case 1: Degree of P degree of Q
A theory states:
Any rational function P(x) / Q(x) can be
expressed in the form P( x) P ( x) R( x)
1
Q( x ) Q( x )
where P1 is a polynomial and R is a polynomial
of degree less than that of Q.
Given a rational function with degree of P degree of Q,
first we use long division, or some other method, to
simplify the expression: to get a polynomial P1 (easily
integrated) plus a new rational function R(x)/Q(x) which
can be handled as described in Case 2, below.
62
x 2 dx x3 x dx
Example 27 Find a) 2 b)
x 1 x 1
x3 x 2
b) By long division, x x2
2
x 1 x 1
Thus we can find the integral:
x3 x 2
x 1 dx x x 2 x 1 dx
2
3 2
x x
2 x 2 ln | x 1| C
3 2 63
Theory of Partial Fractions: Case 2
Case 2: Degree of P < degree of Q
In this case, we rewrite P(x)/Q(x) as a sum of simpler
fractions, called ‘partial fractions’ (which we can
integrate).
A theory states that any polynomial can be factorised
into a product of a
• constants
• linear factors of the form (x – a)
• quadratic factors of the form (x2 + bx + c) which
have no real roots (i.e. cannot be factorised into
linear factors).
For any Q(x) we can write partial fractions by the
following method: 64
Case 2, cont.
Method
1. Factorise Q as far as possible.
2. Decompose P/ Q into simpler (partial) fractions:
For each factor (x – a)n in Q, write fractions
A1 A2 An
...
x a ( x a) 2
( x a) n
For each factor (x2 + bx + c)n in Q which has no real
roots, write fractions
B1 x C1 B2 x C 2 Bn x C n
...
x bx c
2
( x bx c)
2 2
( x 2 bx c) n
3. Find the constants A, B, C, etc. (see example below).
65
Case 2, cont.
Examples of Step 2
Factorized form of P/Q Partial Fractions
1 A B
( x 1)(2 x 3) x 1 2x 3
2x2 3 A B C
x(3x 4)( x 1) x 3x 4 x 1
2x2 3 A B C
x( x 1) 2 x x 1 ( x 1) 2
5x3 7 x 3 Ax B Cx D
( x 2 2) 2 x 2
2
( x 2 2) 2
66
Example 28 ( x 4) dx
Find I 2
x 5x 6
69
x2
x 4 x 2 dx
Example 30 Find
70
4.8 Integration Using Tables
Inside the back cover of Stewart is a table of 120
common integrals. More extensive tables may be
found in other books. In practice, scientists often
refer to such tables of intervals.
71
Example 31
Find I x 2 2 x 4 dx.
You may use the following result (where a is a constant):
2
u a
)C
2 2 2 2 2 2
a u du a u ln( u a u
2 2
We can write I x 2 2 x 4 dx ( x 1) 2 3 dx
x 1 2 3
I x 2 x 4 ln( x 1 x 2 2 x 4) C
2 2
72
Integration Using Computer Algebra Systems
Nowadays computer programs such as Maple and
Mathematica can evaluate a wide range of integrals.
dx
3 x2
1 ln 3 x 2
3 C 1 ln(3 x 2)
3
1 x18 5 x16 50 x14 1750 x12
x ( x 5) dx 18 ( x 5) C 18
1
2 8 2 9
2 3
4375 x10 21875 x8 218750
3
x 6
156250 x 4 390625
2 x 2
b
length x
n
, then
a
f ( x) dx
i 1
f ( xi *) x
th
where xi* is any point in the i subinterval [xi-1, xi].
We already met two common types of Riemann Sum:
• If xi* is chosen to be the right endpoint
of [xi-1, xi] then xi* = xi and we have the
right endpoint approximation:
n
f ( x) dx Rn f ( xi ) x.
b
a
i 1
76
Trapezoidal Rule
Another approximation results from taking the average of
Ln and Rn:
f ( x)dx x f ( x0 ) f ( x1 ) f ( x1 ) f ( x2 )
b
a 2
f ( xn 1 ) f ( xn )
So
1 x
Tn ( Ln Rn ) f ( x0 ) 2 f ( x1 ) f ( x2 ) f ( xn 1 ) f ( xn )
2 2
where x b a and xi a i x
n
d) midpoints with n = 3
78
Example 33
2
Find an approximate value of the integral 1 x dx using n = 5
1
and a) the midpoint rule, b) the trapezoidal rule.
80
Example 35
0.8
Use midpoint rule with n = 4 to estimate I 0 sin( x 2) dx.
81
Relative Accuracy
Note that the Midpoint Rule generally gives more accurate
results than the Trapezoidal Rule.
As shown in the figure below, the midpoint error (red) is
smaller than the trapezoidal error (blue).
The errors in the Midpoint and Trapezoidal Rules are also
opposite in sign.
82
Simpson’s Rule
Another approximation, which is much better than either
Trapezoidal or Midpoint Rule, is known as Simpson’s Rule.
In this case we again divide the interval into n strips of equal
width x = (b – a)/n, but this time n must be even. Then,
b x
a
f ( x)dx S n [ f ( x0 ) 4 f ( x1 ) 2 f ( x2 ) 4 f ( x3 ) 2 f ( x4 )
3
2 f ( xn 2 ) 4 f ( xn 1 ) f ( xn )]
where x b a , xi a i x and n is even.
n
Note the pattern of coefficients: 1, 4, 2, 4, 2, … 4, 2, 4, 1.
It can be shown that Simpson’s Rule (with 2n strips) is a
weighted average of the results of the Trapezoidal and
Midpoint Rules (each with n strips): 1 2
S2 n 3 Tn 3 M n
83
Example 36
2
a) Approximate 1 1 dx using Simpson’s Rule with n = 10.
x
Taking f(x) = 1/x, n = 10, and ∆x = 0.1, we have:
2 1 dx S x [ f (1) 4 f (1.1) 2 f (1.2) 4 f (1.3) ...
1 x 10 3
2 f (1.8) 4 f (1.9) f (2)]
0.1 [ 1 4 2 4 2 4
3 1 1.1 1.2 1.3 1.4 1.5
1.6
2 4 2 4 1 ] 0.693150
1.7 1.8 1.9 2
[Note: The exact answer is ln 2 = 0.693147…]
30
b) Estimate 0 f ( x)dx x 0 5 10 15 20 25 30
by Simpson’s rule. f(x) 1 1.7 2.2 1.9 1.6 1.1 0.7
84
Simpson’s Rule is derived as follows.
• Consider a ‘double-subinterval’, [xi, xi+2].
• On that interval, approximate the curve by a parabola
y = Ax2 + Bx + C passing through points (xi, f(xi)), (xi+1, f(xi+1)),
(xi+2, f(xi+2)), as shown below. Solve for A, B and C.
• Calculate the area under the parabola. It can be shown that
the area on [xi, xi+2] is x [ f ( xi ) 4 f ( xi 1 ) f ( xi 2 )] .
3
• Add together the areas for all the double subintervals. This
gives the formula above. (See Stewart for full derivation.)
85
4.10 Improper Integrals
So far we have studied definite integrals of form
b
I f ( x)dx
a
where [a, b] is a finite interval and f is continuous
and bounded on [a, b]. These are called proper
integrals.
Now we extend the concept of the definite integral to
cover other possibilities.
• We have an improper integral of type I if the
interval is infinite
• We have an improper integral of type II if f is
unbounded on [a, b]
86
Type I Improper Integrals
Example 40
1
Find the area A of the region under the curve y 2
and above the x -axis to the right of x = 1. x
Solution
The area between x = 1 and x = t (t > 1) is:
1
t
t dx 1
A(t ) 2 1
1 x
x 1 t
It is reasonable then to say A lim A(t ) 1 unit 2
t
dx t dx
And to write A 2
lim
1 x t 1 x2
This illustrates how integrals over infinite intervals
are defined.
87
Type I Improper Integrals: Definition
t
• If a f ( x)dx exists for every t a, then
t
a f ( x)dx lim
t a
f ( x )dx
provided this limit exists as a finite number.
b
• If t f ( x)dx exists for every t b, then
b b
f ( x)dx tlim
t
f ( x)dx
b)
cos x dx
89
Example 42 Evaluate the integral or show that it diverges:
dx
a) 1 x
dx
b)
1 x x
90
Example 43 2 x2
Evaluate xe dx
The following is a well-known result:
dx
1 x p is convergent for p > 1 and divergent for p 1.
Proof
dx t 1
lim dx lim ln x 1 lim ln t
t
For p = 1, p t 1 x t t
1 x
t
dx t 1 p 1
lim x dx lim
p
For p ≠ 1, x
p t p 1
1 x t 1
1
1 1 1
lim 1 if p 1
t p 1 p 1
t 1 p
if p 1
Thus the integral is convergent for p > 1, divergent for p 1.
92
Type II Improper Integrals
Example 43
1
Find the area A of the region lying under the curve y
x
and above the x-axis between x = 0 and x = 1.
Solution
As x 0+, y , i.e. y is unbounded, so we cannot
use the earlier definition of the definite integral.
But consider the area between x = t and x = 1:
1 dx 1
A(t ) 2 x 2(1 t )
t x t
t
• If a f ( x)dx exists for every t [a, b) and f is possibly
b t
unbounded near b, then a f ( x)dx lim a f ( x)dx
t b
provided this limit exists as a finite number.
b
• If t f ( x)dx exists for every t (a, b] and f is possibly
b b
unbounded near a, then a f ( x)dx lim t f ( x)dx
t a
provided this limit exists as a finite number.
b c b
then we define:
a
f ( x)dx a
f ( x)dx f ( x)dx
c
94
Example 44 Evaluate the integral or show that it diverges:
5 dx
2 x2
95
Example 45 Evaluate the integral or show that it diverges:
3 dx
I
0 x 1
98