Chapter 4 201 Integration

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

Chapter 4.

Integration

Prof. Nguyen Dinh and Prof. J.-J Strodiot

INTERNATIONAL UNIVERSITY

Ngày 13 tháng 1 n´m 2021

Prof. Nguyen Dinh and Prof. J.-J Strodiot Chapter 4. Integration


Calculus I
Chapter 4 Integration

Assoc. Prof. N. Dinh and Prof. J.-J. Strodiot

INTERNATIONAL UNIVERSITY HCMC

N. DINH and J.J.STRODIOT (IU) Calculus I 1 / 59


Integration is the inverse of Di↵erentiation

Given a total quantity, di↵erentiation enables us to find its rate of


change

Given a rate of change, integration allows us to find a total quantity

Derivative is related to the slope of the tangent to a curve


Integral is related to the area under a curve

N. DINH and J.J.STRODIOT (IU) Calculus I 2 / 59


Contents

1. Areas under curves


2. The definite integral
3. Properties of definite integrals
Mean value theorems for integrals
4. The fundamental theorem of calculus
5. Substitutions
6. Integration by Parts
7. Additional Techniques of Integration. Partial Fractions
8. Integration Using Tables and Computer Algebra Systems
9. Numerical Integration
10. Improper Integrals

N. DINH and J.J.STRODIOT (IU) Calculus I 3 / 59


1. Area under Curves

Given a nonnegative continuous function f (x), find the area of the region
R lying
under the curve y = f (x)
above the x-axis
between the vertical lines x = a and x = b, where a < b

y = f(x)

a b x

N. DINH and J.J.STRODIOT (IU) Calculus I 4 / 59


Area under y = x 2 from 0 to 1

the area is between 0 and 1 because R is contained in a square with


side length 1
we can do better than that
suppose we divide R into four strips S1 , S2 , S3 and S4

y y (1,1)
(1,1)

y=x2
y = x2

S
4
R
S1 S
3
S2

0 1 x 0 1/4 1/2 3/4 1 x

N. DINH and J.J.STRODIOT (IU) Calculus I 5 / 59


Area under y = x 2 from 0 to 1

Each strip is approximated by a rectangle


whose base is the same as the strip
whose height is the same as the right edge of the strip

0 1/4 1/2 3/4 1 x

N. DINH and J.J.STRODIOT (IU) Calculus I 6 / 59


Area under y = x 2 from 0 to 1

0 1/4 1/2 3/4 1 x

the sum of the areas of these approximating rectangles is


✓ ◆2 ✓ ◆2 ✓ ◆2
1 1 1 1 1 3 1
R4 = · + · + · + · 12 = 0.46875
4 4 4 2 4 4 4

the area A of R is less than R4 , so A < 0.46875


N. DINH and J.J.STRODIOT (IU) Calculus I 7 / 59
Area under y = x 2 from 0 to 1

We can also use smaller rectangles whose heights are the values of f at
the left endpoints of the subintervals

y (1,1)

y=x2

0 1/4 1/2 3/4 1 x

N. DINH and J.J.STRODIOT (IU) Calculus I 8 / 59


Area under y = x 2 from 0 to 1

y (1,1)

y=x2

0 1/4 1/2 3/4 1 x

the sum of the areas of these approximating rectangles is


✓ ◆2 ✓ ◆2 ✓ ◆2
1 2 1 1 1 1 1 3
L4 = · 0 + · + · + · = 0.21875
4 4 4 4 2 4 4

the area A of R is larger than L4 , so A > 0.21875


N. DINH and J.J.STRODIOT (IU) Calculus I 9 / 59
Area under y = x 2 from 0 to 1

finally we have : 0.21875 < A < 0.46875


we repeat this procedure with a larger number of strips
if we increase the number n of strips, we obtain

n Ln Rn
10 0.2850000 0.3850000
20 0.3087500 0.3587500
30 0.3168519 0.3501852
50 0.3234000 0.3434000
100 0.3283500 0.3383500
1000 0.3328335 0.3338335

1
from this table, we see that Ln and Rn are approaching 3

N. DINH and J.J.STRODIOT (IU) Calculus I 10 / 59


Area under y = x 2 from 0 to 1

Exercise : calculate the limit of Rn


indication : the following formula is useful
n
X n(n + 1)(2n + 1)
i 2 = 12 + 22 + · · · + n2 =
6
i=1

N. DINH and J.J.STRODIOT (IU) Calculus I 11 / 59


Area under y = x 2 from 0 to 1

Exercise : calculate the limit of Rn


indication : the following formula is useful
n
X n(n + 1)(2n + 1)
i 2 = 12 + 22 + · · · + n2 =
6
i=1

Solution :
n n
1 X i2 1 X 2 (n + 1)(2n + 1)
Rn = = 3 i =
n n2 n 6n2
i=1 i=1

1
lim Rn =
n!1 3

N. DINH and J.J.STRODIOT (IU) Calculus I 11 / 59


Area under Curves

Let f be a nonnegative continuous function on [a, b]

y y

y = f(x)
y = f(x)

0 a x x2 x x4 x5 b x
a b x 1 3

N. DINH and J.J.STRODIOT (IU) Calculus I 12 / 59


Area under Curves

Let f be a nonnegative continuous function on [a, b]


Apply the idea of the previous example
b a
Divide [a, b] into n subintervals of equal width x= n

[x0 , x1 ], [x1 , x2 ], · · · , [xn 1 , xn ] with x0 = a, xn = b

Definition The area of the region R that lies under the graph of a
nonnegative continuous function f is the limit of the sum of the areas of
approximating rectangles :

A = lim Rn = lim [f (x1 ) x + f (x2 ) x + · · · + f (xn ) x]


n!1 n!1

N. DINH and J.J.STRODIOT (IU) Calculus I 13 / 59


Area under Curves

Under the assumption that f is continuous, it can be proved that the


limit always exists,
The same value is obtained if the left endpoints are used instead of
the right endpoints

A = lim Ln = lim [f (x0 ) x + f (x1 ) x + · · · + f (xn 1) x]


n!1 n!1

In fact, instead of using the left endpoints or the right endpoints, we


could take the height of the ith rectangle to be the value of f at any
number xi⇤ in the interval [xi 1 , xi ]
The numbers x1⇤ , x2⇤ , . . . , xn⇤ are called the sample points

N. DINH and J.J.STRODIOT (IU) Calculus I 14 / 59


Area under Curves
y
Îx

f(x *)
i

0 a ⁄ ¤ ‹ xi-1 xi xn-1 b x

x¡* x™* x£* x i* x n*

• Using the points x1⇤ , x2⇤ , . . . , xn⇤ , we have

A = lim [f (x1⇤ ) x + f (x2⇤ ) x + · · · + f (xn⇤ ) x]


n!1

N. DINH and J.J.STRODIOT (IU) Calculus I 15 / 59


f has positive and negative values
If f takes on both positive and negative values, then the Riemann sum is
the sum of the areas of the rectangles that lie above the x-axis and the
negatives of the areas of the rectangles that lie below the x-axis (called
net area)

y = x3 − 6x +

+
0 x
__
__
__ __

Here for each i, ci = xi is the right endpoint of [xi 1 , xi ]


N. DINH and J.J.STRODIOT (IU) Calculus I 16 / 59
The distance problem

Assume the velocity of an object is known all the times. Find the
distance travelled by this object during a certain time period
If the velocity remains constant, then
distance = velocity ⇥ time
Otherwise
Time (s) 0 5 10 15 20 25 30
Velocity (ft/s) 25 31 35 43 47 46 41

Approximation of the distance

25 ⇥ 5 + 31 ⇥ 5 + 35 ⇥ 5 + 43 ⇥ 5 + 47 ⇥ 5 + 46 ⇥ 5 = 1135 ft

31 ⇥ 5 + 35 ⇥ 5 + 43 ⇥ 5 + 47 ⇥ 5 + 46 ⇥ 5 + 41 ⇥ 5 = 1215 ft

N. DINH and J.J.STRODIOT (IU) Calculus I 17 / 59


The distance problem

40

20

0 t
10 20 30

b a
Consider a = t0 < t1 < · · · < tn = b and t= n . Then the distance
can be calculated as
n
X n
X
d = lim f (ti 1 ) t = lim f (ti ) t
n!1 n!1
i=1 i=1

N. DINH and J.J.STRODIOT (IU) Calculus I 18 / 59


2. The Definite Integral

Let f be a continuous function on [a, b]


Divide the interval [a, b] into n subintervals of width x = (b a)/n
Let a = x0 < x1 < . . . , < xn = b be the endpoints of the subintervals
Choose sample points x1⇤ , x2⇤ , . . . , xn⇤ in the subintervals

Definition (Definite integral)


Then the definite integral of f from a to b is defined as the number
Z b n
X
f (x) dx = lim f (xi⇤ ) x
a n!1
i=1

N. DINH and J.J.STRODIOT (IU) Calculus I 19 / 59


Terminologies

R
The symbol is called an integral sign
f (x) is called the integrand and a and b the limits of integration
a is the lower limit and b is the upper limit
x is the variable of integration
the process of finding an integral is called integration
Rb
a f (x)dx is a number ; it does not depend on x.

So Z Z Z
b b b
f (x)dx = f (t)dt = f (r )dr
a a a

N. DINH and J.J.STRODIOT (IU) Calculus I 20 / 59


Geometric interpretation

Rb
If f is positive on [a, b], the definite integral a f (x)dx can be interpreted
as the area under the curve y = f (x) from a to b
y

y = f(x)

a b x

N. DINH and J.J.STRODIOT (IU) Calculus I 21 / 59


Geometric interpretation
If f takes on both positive and negative values, then the definite integral
can be interpreted as a net area, i.e., a di↵erence of areas A1 A2 where
A1 is the area above the x-axis and A2 the area below the x-axis

y
y=ƒ

0 a b x

N. DINH and J.J.STRODIOT (IU) Calculus I 22 / 59


Examples
R5
Evaluate 1 (2 + 3x) dx by using the integral as the limit of a sum
P
indication : the following formula is useful ni=1 i = n(n+1)
2

R1 p
Evaluate the integral 0 1 x 2 dx by interpreting it in terms of
areas

y
y= œ„„„„„
1-≈
1 or
≈+¥=1

0 1 x

N. DINH and J.J.STRODIOT (IU) Calculus I 23 / 59


3. Properties of the Definite Integral - Mean value
theorem

Ra
a f (x) dx = 0
Rb Ra
a f (x) dx = b f (x) dx
Rb Rb Rb
a [↵f (x) + g (x)] dx = ↵ a f (x) dx + a g (x) dx
Rb Rc Rc
a f (x) dx + b f (x) dx = a f (x) dx
Rb Rb
if f (x)  g (x) and a  b, then a f (x) dx  a g (x) dx
Rb Rb
if a  b, then | a f (x) dx|  a |f (x)| dx
Ra
if f is an odd function, then a f (x) dx = 0
Ra Ra
if f is an even function, then a f (x) dx = 2 0 f (x) dx

N. DINH and J.J.STRODIOT (IU) Calculus I 24 / 59


Another Property of the Definite Integral
If m  f (x)  M for a  x  b, then
Z b
m(b a)  f (x) dx  M(b a)
a

y
M
y=ƒ

0 a b x

N. DINH and J.J.STRODIOT (IU) Calculus I 25 / 59


The Mean Value Theorem for Integrals

Theorem
If f is continuous on [a, b], then there exists c 2 [a, b] such that
Z b
f (x) dx = f (c) (b a)
a
y
y=ƒ

f(c)=fave

0 a c b x
N. DINH and J.J.STRODIOT (IU) Calculus I 26 / 59
The Mean Value Theorem for Integrals

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

2
y=x

A1 = A2

A1

f(c)

A
2

0 c 1 x

f (c) is the average value of f on [0, 1]


N. DINH and J.J.STRODIOT (IU) Calculus I 27 / 59
Average value of a function

Definition (Average value of a function)


If f is integrable on [a, b], then the average value of the function f on this
interval is Z b
1
f (x) dx
b a a

y
(2, 5)

y=1+≈

(_1, 2)

fave=2

_1 0 1 2 x

N. DINH and J.J.STRODIOT (IU) Calculus I 28 / 59


Applications

• Cholesterol Level. A physician finds that the cholesterol level of a patient


on a diet can be approximated by
0.1t
C (t) = 200 + 40e ,

where t is the time (in months) since the patient began the diet.
Find the average cholesterol level for the patient over the first six months.
• Typing Speed. The function W (t) = 3.75t 2 + 30t + 40 describes a
typist’s speed (in words per minute) over a time interval [0, 5].
(a) Find the maximum W value and the time t when it occurs.
(b) Find the average speed over [0, 5].

N. DINH and J.J.STRODIOT (IU) Calculus I 29 / 59


Proof of the Mean Value Theorem for integrals

• let m and M be the minimum and maximum values of f


• m  f (x)  M for all x 2 [a, b]
Rb R
• m(b a)  a f (x) dx  M(b a) (by monotonicity of )
Rb
• m  b 1 a a f (x) dx  M
• Intermediate Value Theorem ) f (x) must take on every value between
m and M at some point between a and b
• So, by the intermediate theorem R b for continuous function, there exists
c 2 [a, b] such that f (c) = b 1 a a f (x) dx

N. DINH and J.J.STRODIOT (IU) Calculus I 30 / 59


4. The Fundamental Theorem of Calculus

Taking the limit of Riemann sums is often long and difficult. We will use
the relationship between integration and di↵erentiation.

Definition (Antiderivative)
On an interval J, an antiderivative of a function f is a function F whose
derivative is equal to f , i.e., F 0 (x) = f (x) for all x 2 J

The Fundamental Theorem of Calculus (FTC) has two parts

Theorem ((FTC) Part A)


Suppose f is Rcontinuous on an interval containing a.
x
Then F (x) = a f (t) dt is an antiderivative of f

N. DINH and J.J.STRODIOT (IU) Calculus I 31 / 59


Proof of (FTC) part A

Part A Suppose
R xf is continuous on an interval containing a.
Then F (x) = a f (t) dt is an antiderivative of f

F (x+h) F (x)
F 0 (x) = limh!0
⇣R h Rx ⌘
1 x+h
F 0 (x) = limh!0 h a f (t)dt a f (t)dt
R
1 x+h
F 0 (x) = limh!0 h x f (t)dt
F 0 (x) = limh!0 h1 f (c) h for some c between x and x + h
F 0 (x) = limh!0 f (c) = f (x) since c ! x as h ! 0

N. DINH and J.J.STRODIOT (IU) Calculus I 32 / 59


Examples Find the derivative of
R3 2
F (x) = x e t dt
R x3 2
G (x) = x 2 e t dt
Ru 2
Hint : use H(u) = 0 e t dt

N. DINH and J.J.STRODIOT (IU) Calculus I 33 / 59


The Fundamental Theorem of Calculus : Part B

Theorem ((FTC) Part B)


If G (x) is any antiderivative of f (x) on J, i.e., G 0 (x) = f (x), then
Rb
a f (x) dx = G (b) G (a) for any a, b 2 J

N. DINH and J.J.STRODIOT (IU) Calculus I 34 / 59


Proof ((FTC) Part B)

If G (x) is any antiderivative of f (x) on J, i.e., G 0 (x) = f (x), then


Rb
a f (x) dx = G (b) G (a) for any a, b 2 J

If F and G are antiderivatives of f , then F G is a constant and


G (b) G (a) = F (b) + C F (a) C = F (b) F (a)
Rx
R x B : Part A ) F (x) = a f (t)dt is an antiderivative of
Proof of Part
f . Hence a f (t)dt = G (x) + C
Letting
Rx x = a gives 0 = G (a) + C , so C = G (a) and
a f (t)dt = G (x) G (a)
Rb
Then putting x = b gives a f (t)dt = G (b) G (a)

N. DINH and J.J.STRODIOT (IU) Calculus I 35 / 59


More on notations

b
It is convenient to define the symbol F (x) a = F (b) F (a)
We define the indefinite integral of f as the set of antiderivatives of f
R R
Notation : f (x) dx. So f (x) dx = F (x) + C where F is any
antiderivative and C is an arbitrary constant, often called constant of
integration
Part B of the FTC can be written (Newton Leibniz formula)
Z b ✓Z ◆ b
f (x) dx = f (x) dx
a a

Di↵erence between these two integrals


The definite integral is a number
The indefinite integral is a (set of) function(s)

N. DINH and J.J.STRODIOT (IU) Calculus I 36 / 59


Examples

Find the area under the curve y = sin x, above y = 0 between x = 0


and x = ⇡
Find the average value of f (x) = e x + cos x on the interval [ ⇡/2, 0]
Rb
Reminder : The average value of f on [a, b] is b 1 a a f (x) dx

Finding antiderivatives is not as easy as finding derivatives. In the rest of


the chapter, a few techniques are developed to evaluate as many integrals
as possible

N. DINH and J.J.STRODIOT (IU) Calculus I 37 / 59


Applications : Net change or total change as the integral
of a rate

Theorem (Net change as the integral of a rate)


The net change (total change) in F (t) over an interval [a, b] is given by
the integral
Z b
F 0 (x)dx = F (b) F (a)
a
,

Example 1. At 7 AM, water begins leaking from a tank at a rate


s 0 (t) = 2 + 0.25t gal/hour (t is the number of hour after 7 AM). How
much water is lost between 9 nd 11 AM ? [Note : 1 gallon = 4.54 liters in
England and 1 gallon = 3.78 liters in USA]. ANS. s(4) s(2) = 5.5gal.
Example 2. Traffic flow [see Example 2, page 338, textbook (Rogawski)].

N. DINH and J.J.STRODIOT (IU) Calculus I 38 / 59


Applications : The integral of velocity

Theorem
If an object moves along a straight line with velocity v (t), then
• The displacement of the object during the time from t1 to t2 is :
Z t2
s(t2 ) s(t1 ) = v (t)dt.
t1

• The total distance traveled during [t1 , t2 ] is :


Z t2
|v (t)|dt.
t1

N. DINH and J.J.STRODIOT (IU) Calculus I 39 / 59


Applications

If we want to calculate the distance traveled, we have to consider the


intervals when v (t) 0 (the particle moves to the right) and also the
intervals when v (t)  0 (the particule moves to the left). So the
distance is computed by integrating |v (t)| :
Z t2
|v (t)|dt = total distance traveled
t1

Example : A particle moves along a line so that its velocity at time t is


v (t) = t 2 t 6 (in meters per second)
Find the displacement of the particle during the time period 1  t  4
Find the distance traveled during this time period.

N. DINH and J.J.STRODIOT (IU) Calculus I 40 / 59


Applications : Total versus marginal cost

In economics, the cost function C (x) is defined as the cost of producing x


units of a commodity and the marginal cost is its derivative C 0 (x). We
then have :
Z b
Cost of increasing production from a to b = C 0 (x)dx.
a

Example. The marginal cost of producing x computer chips (in units of


1,000) is C 0 (x) = 150x 2 3000x + 17, 500 (dollars per thousand chips).
(a) Find the cost of increasing production from 10,000 to 15,000 chips ?
(b) Determine the total cost of producing 15,000 chips, assuming that
C (0) = 35, 000 (i.e., it costs $ 35,000 to set up the manufacturing run)
ANS. (a) C (15) C (10) $18, 750 ; (b) C (15) C (0) = $93, 750. What
do you see from these number ?

N. DINH and J.J.STRODIOT (IU) Calculus I 41 / 59


5. Substitution rules

The Substitution Rule for Indefinite Integrals


Z Z
f (g (x)) g 0 (x) dx = f (u) du where u = g (x)

Examples

R
Find (2x 3 + 1)7 x 2 dx
R
Find x sin (x 2 + 1) dx
R
Find tan x dx

N. DINH and J.J.STRODIOT (IU) Calculus I 42 / 59


Proof of the Substitution Rule

Let f and g be two functions and F an antiderivative of f .


The Chain Rule of di↵erentiation can be written as :
d
F (g (x)) = F 0 (g (x)) g 0 (x) = f (g (x)) g 0 (x)
dx
Integrating both sides, we get
Z
f (g (x)) g 0 (x) dx = F (g (x)) + C

Using the substitution u = g (x) and so du = g 0 (x) dx, we have


Z Z
0
f (g (x)) g (x) dx = f (u) du = F (u) + C = F (g (x)) + C

N. DINH and J.J.STRODIOT (IU) Calculus I 43 / 59


The Substitution Rule for Definite Integrals

The Substitution Rule for Indefinite Integrals


Applying the Newton Leibniz formula, we get
Rb b
a f (g (x)) g 0 (x) dx = F (g (x)) a = F (g (b)) F (g (a))
g (b) R g (b)
= F (u) g (a) = g (a) f (u) du

Hence the Substitution Rule for Definite Integrals :

If g is di↵erentiable on [a, b], f is continuous on the range of g , and


u = g (x), then
Z b Z g (b)
f (g (x)) g 0 (x) dx = f (u) du
a g (a)

N. DINH and J.J.STRODIOT (IU) Calculus I 44 / 59


Examples

R2 p
• Evaluate 0 x 2 x 3 + 1dx,
• Calculate the area under the curve
x
y=
x2 +1
over [1, 3].

N. DINH and J.J.STRODIOT (IU) Calculus I 45 / 59


Examples

R 10
Find p3dx . Set u = 5x 1
2 5x 1

Re ln x
Evaluate 1 x dx

R ⇡/2 R ⇡/2
Prove that 0 cosn x dx = 0 sinn x dx for all positive integers n
Hint : cos x = sin ( ⇡2 x)

N. DINH and J.J.STRODIOT (IU) Calculus I 46 / 59


Inverse Substitution

So far we have used direct substitutions : some function in the


integrand has been replaced by a new variable

Sometimes it is more helpful to do the opposite : to replace the


variable of integration with a function of a new variable This is called
inverse substitution

R dx
Example. Find x 1/2 (1+x 1/3 )
by using the inverse substitution x = u 6

N. DINH and J.J.STRODIOT (IU) Calculus I 47 / 59


Inverse Substitution in definite integrals

If x = (t) is di↵erentiable, monotone, say increasing, on [↵, ] with


(↵) = a, ( ) = b. If f is is continuous on [a, b] then
Z b Z
0
f (x) dx = f ( (t)) (t) dt
a ↵

R8 dx
Example. Find 1 x 1/2 (1+x 1/3 ) by using the inverse substitution x = u 6

N. DINH and J.J.STRODIOT (IU) Calculus I 48 / 59


Trigonometric Substitutions

The integrals of tan x, cot x, sec x and csc x

We know the integrals of cos x and sin x


The integral of tan x and cot x can be found by substitution
We can observe that
d sec x tan x + sec2 x
ln | sec x + tan x| = = sec x
dx sec x + tan x
Thus Z
sec x dx = ln | sec x + tan x| + C

Similarly Z
csc x dx = ln | csc x + cot x| + C

N. DINH and J.J.STRODIOT (IU) Calculus I 49 / 59


R
The integrals sinm x cosn x dx (m, n 2 IN)

m or n is odd ! use substitution


E.g., suppose n = 2k + 1. Then use sin2 x + cos2 x = 1
to rewrite
Z Z
sinm x cosn x dx = sinm x (1 sin2 x)k cos x dx

R
Letting u = sin x, so du = cos x dx, we get u m (1 u 2 )k du
m and n are both even then use the half-angle formulae

sin2 x = 1/2 (1 cos 2x) and cos2 x = 1/2 (1 + cos 2x)

Example
R
Find R sin3 x cos8 x dx
Find sin4 x dx

N. DINH and J.J.STRODIOT (IU) Calculus I 50 / 59


Inverse Trigonometric Substitutions (I)

p
Integrals involving a2 x 2 (a > 0)
! use x = a sin t

p
a2 x 2 makes sense if |x|  a, i.e., if |t|  ⇡/2
Thus cos t > 0, so
p p p
a2 x 2 = a 1 sin2 t = a cos2 t = a cos t
R
Example 1 Find I = (5 dxx 2 )3/2

N. DINH and J.J.STRODIOT (IU) Calculus I 51 / 59


Inverse Trigonometric Substitutions (II)

p 1
Integrals involving a2 + x 2 or x 2 +a2
(a > 0)
! use x = a tan t

All values of x are obtained by limiting t to |t| < ⇡/2


So sec t > 0 and
p p
a2 + x 2 = a 1 + tan2 t = a sec t
R dx
Example 4.4.8 Find I = p4+x 2

N. DINH and J.J.STRODIOT (IU) Calculus I 52 / 59


Inverse Trigonometric Substitutions (III)

p
Integrals involving x2 a2 (a > 0)
! use x = a sec t
p p p
We have x 2 a2 = a sec2 t 1=a tan2 t = a | tan t|

p
If x a, then 0  t  ⇡/2, so tan t 0 and x2 a2 = a tan t

p
If x  a, then ⇡/2  t  ⇡, so tan t  0 and x2 a2 = a tan t

R
Example 2 Find I = p dx
x 2 a2

N. DINH and J.J.STRODIOT (IU) Calculus I 53 / 59


Solution Example 2

If x a and x = a sec t then


p
dx = a sec t tan t dt and x 2 a2 = a tan t
R R
So I = a sec t tan t
a tan t dt = sec t dt = ln | sec t + tan t| + C
p
2 2 p
= ln xa + x a a + C = ln x + x 2 a2 + C1
where C1 = C ln a
If x  a first let u = x so that u a then
R p
I = p du = ln u + u 2 a2 C1
u 2 a2
p
x+ x 2 a2
p
= ln a2
C1 = ln x + x2 a2 + C2
where C2 = C1 2 ln a

N. DINH and J.J.STRODIOT (IU) Calculus I 54 / 59


The tan 2t Substitution

R
Integrals of the form R(sin t, cos t) dt where
R(u, v ) is a rational function in u and v
! use x = tan 2t

x = tan 2t , so cos2 t
2 = 1/ sec2 t
2 = 1/[1 + tan2 2t ] = 1/(1 + x 2 )
Thus cos t = 2 cos2 2t 1 = 2/(1 + x 2 ) 1 = (1 x 2 )/(1 + x 2 )
sin t = 2 sin 2t cos 2t = 2 tan 2t cos2 t
2

= 2x /(1 + x 2 )
1
dx = 2 sec2 2t dt ) dt = 2 cos2 2t dx = 2 dx
1+x 2

N. DINH and J.J.STRODIOT (IU) Calculus I 55 / 59


The tan 2t Substitution. Summary

If x = tan 2t then

1 x2 2x 2 dx
cos t = sin t = dt =
1 + x2 1 + x2 1 + x2

R dt
Example 3 Find I = 4 sin t+3 cos t+5

N. DINH and J.J.STRODIOT (IU) Calculus I 56 / 59


Integration by Parts

Suppose U(x) and V (x) are two di↵erentiable functions. The Product
Rule is
d dV dU
U(x) V (x) = U(x) + V (x)
dx dx dx
i.e.,
dV d dU
U(x) = U(x) V (x) V (x)
dx dx dx
Integrating both sides one obtains
Z Z
dV dU
U(x) = U(x) V (x) V (x) dx
dx dx
R R
or more simply U dV = U V V dU

JJS (IU) Calculus I 2007 52 / 93


R R
Integration by Parts : U dV = U V V dU

Example 4.5.1
R 1x
(a) x tan dx

R
(b) ln x dx

Re
(c) 1 x 3 (ln x)2 dx

JJS (IU) Calculus I 2007 53 / 93


Integration by Parts : Reduction Formulae

Using the method of integration by parts we can sometimes obtain what


are called reduction formulae
Example 4.5.2
R
Find a reduction formulae for In = sinn x dx
hint : use integration by parts with
U = sinn 1
x and dV = sin x dx

A formula expressing In as a function of integral(s) involving lower


power(s), is called a reduction formula
By repeated
R application of this
R formula, with
I0 = dx = x + C and I1 = sin x dx = cos x + C
we can find In for all n

JJS (IU) Calculus I 2007 54 / 93


The Method of Partial Fractions

R P(x)
We consider Q(x) dx where P and Q are polynomials
A polynomial is a function P of the form

P(x) = an x n + an 1x
n 1
+ · · · + a2 x 2 + a1 x + a0

where n is a positive integer and an 6= 0


an , an 1 , . . . a0 are called coefficients and n is called the degree of
the polynomial
A function of the form P(x)/ Q(x), where P and Q are polynomials,
is called a rational function

JJS (IU) Calculus I 2007 55 / 93


Introductory Example

In a fraction p/q, p is the numerator, q is the denominator


Fractions are added or substracted by using a common denominator
For example

2 1 2(x + 2) 1(x 1) x +5
= = 2
x 1 x +2 (x 1)(x + 2) x +x 2

Using this result in reverse enables us to calculate


R x+5 R 2 1
x 2 +x 2
dx = x 1 x+2 dx

= 2 ln |x 1| ln |x + 2| + C

Basic idea : before integrating P/Q, express it as a sum of simpler


terms

JJS (IU) Calculus I 2007 56 / 93


Case 1 : Degree of P degree of Q

Any rational function P(x)/Q(x) can be expressed in the form

P(x) R(x)
= P1 (x) +
Q(x) Q(x)

where P1 is a polynomial and R is a polynomial of degree less than that


of Q
strategy : when degree of P degree of Q, the first step is to use a
long division to get a polynomial P1 (easy to integrate) plus a new
rational function R(x)/Q(x) (which can be handled as described in
Case 2)

JJS (IU) Calculus I 2007 57 / 93


Case 1 : Degree of P degree of Q. Example

R x 3 +x
Example 4.6.1 Find x 1 dx

First we perform a long division

Thus we can write Z


x3 + x
dx =
x 1

JJS (IU) Calculus I 2007 58 / 93


Case 2 : Degree of P < degree of Q

Factorize the expression Q(x) as far as possible


Decompose P(x)/Q(x) into simpler fractions as follows :
For each factor (x a)n in Q(x), write fractions

A1 A2 An
+ + ··· +
x a (x a)2 (x a)n

For each factor (x 2 + bx + c)n in Q(x) which has no real roots, write
fractions
B1 x + C1 B2 x + C2 Bn x + Cn
+ 2 + ··· + 2
x 2 + bx + c (x + bx + c)2 (x + bx + c)n

Find the constants A, B, C , etc. (see example below)

JJS (IU) Calculus I 2007 59 / 93


R (x+4) dx
Example 4.6.2. Find I = x 2 5x+6

We factorize the denominator and write partial fractions as follows :


x +4 x +4 A B
= = +
x2 5x + 6 (x 2)(x 3) x 2 x 3

To find A and B, add these partial fractions together and write

x +4 A(x 3) + B(x 2)
=
(x 2)(x 3) (x 2)(x 3)

The numerators of the two sides must be equal :

x + 4 = A(x 3) + B(x 2) for all x

Two methods to find A and B :

JJS (IU) Calculus I 2007 60 / 93


x + 4 = A(x 3) + B(x 2) for all x

Method 1 : Equate the coefficients of x and equate the constant


terms on the two sides of the equation :

coe↵. of x : 1 = A + B constants : 4 = 3A 2B

Solving these equations gives A = 6, B = 7


Method 2 : Substitute particular values of x in the equation
For example : x = 3 gives 7 = B and x = 2 gives 6 = A
Hence we have
R (x+4) dx R 6 7
x 2 5x+6
= x 2 + x 3 dx
= 6 ln |x 2| + 7 ln |x 3| + C

JJS (IU) Calculus I 2007 61 / 93


Example 4.6.3

R x+2
Find I = x 4 +x 2
dx
We can factorize x 4 + x 2 =
Then we can decompose into partial fractions :
x+2
x 4 +x 2
=
Add the fractions and equate the numerators of both sides :
Find the coefficients :
So the integral becomes : I =
Remark : sometimes another approach is quicker : for example
R x2
(x 1)5
dx can be found more easily by using the substitution u = x 1

JJS (IU) Calculus I 2007 62 / 93


Integration using Tables
R p
Using a table of integrals, find I = x 2 + 2x + 4 dx

p p
The table includes forms such as x 2 + a2 but not x 2 + bx + c
First we complete the square : x 2 + 2x + 4 = (x + 1)2 + 3
Then we use the substitution u = x + 1
R p R p
The integral becomes I = (x + 1)2 + 3 dx = u 2 + 3 du
In the table (see Formula 21 in Stewart) we find
R p p 2 p
a2 + u 2 du = u2 a2 + u 2 + a2 ln (u + a2 + u 2 ) + C
p p
So I = u2 3 + u 2 + 32 ln (u + 3 + u 2 ) + C
p p
I = x+12 x 2 + 2x + 4 + 3 ln (x + 1 + x 2 + 2x + 4) + C
2

JJS (IU) Calculus I 2007 63 / 93


Integration using Computer Algebra Systems

Three widely used CASs are Derive, Mathematica and Maple

R
Example : Find x (x 2 + 5)8 dx
By hand, using the substitution u = x 2 + 5 :
Z
(x 2 + 5)9
x (x 2 + 5)8 dx = +C
18
Maple and Mathematica give the solution :

x 18 5 x 16 1750 x 12
+ + 50 x 14 + + 4375 x 10 + 21875 x 8
18 2 3
218750 x 6
+ + 156250 x 4 + 390625 x 2
3

JJS (IU) Calculus I 2007 64 / 93


Can we integrate all continuous functions ?

The answer is NO !

If 0
R f is an elementary function, then f is an elementary function but
f (x) dx is not necessarily elementary

R 2 R R p
Examples : e x dx, sin x 2 dx, x 3 + 1 dx

Such integrals can be evaluated at least approximately using infinite


series or numerical methods

JJS (IU) Calculus I 2007 65 / 93


Approximate Integration

Sometimes it is impossible to find the exact value of a definite integral. It


is the case

1) When it is impossible to find an antiderivative. For example :


Z 1 Z 1 p
x2
e dx 1 + x 3 dx
0 1

2) When the function is not known everywhere

JJS (IU) Calculus I 2007 66 / 93


Example
A radar gun was used to record the speed of a runner during the first 5
seconds of a race (see the table). Estimate the distance the runner covered
during those 5 seconds.

t (s) v (m!s) t (s) v (m!s)

0 0 3.0 10.51
0.5 4.67 3.5 10.67
1.0 7.34 4.0 10.76
1.5 8.86 4.5 10.81
2.0 9.73 5.0 10.81
2.5 10.22

We need to find approximate values of definite integral


We already know one such method : the midpoint approximation
JJS (IU) Calculus I 2007 67 / 93
Midpoint Rule
Z b
f (x) dx ⇡ x[f (x̄1 ) + · · · + f (x̄n )]
a
b a
where x= n and x̄i = midpoint of [xi 1 , xi ]

0 x¡
– –
x™ –
x£ –
x¢ x

Fig.:
JJS (IU) Calculus I 2007 68 / 93
Trapezoidal Rule
Z b
x
f (x) dx ⇡ [f (x0 ) + 2f (x1 ) + · · · + 2f (xn 1) + f (xn )]
a 2
b a
where x= n and xi = a + i x.
Each strip is approximated by a trapezoid.
y

0 x¸ ⁄ x™ x£ x¢ x

JJS (IU) Calculus I 2007 69 / 93


Example
Use the Trapezoidal
R 2 1 Rule and the Midpoint Rule with n = 5 to
approximate 1 x dx. The true value is ln 2 ⇡ 0.693147...

The Trapezoidal Rule gives (with x = 1/5)


Z 2
1
dx ⇡ 0.1[f (1) + 2f (1.2) + · · · + 2f (1.8) + f (2)] ⇡ 0.695635
1 x

1
y=
x

1 2
JJS (IU) Calculus I 2007 70 / 93
Example (Cont’d)
The midpoints are 1.1, 1.3, 1.5, 1.7, 1.9 and the Midpoint Rule gives
(with x = 1/5)
Z 2
1
dx ⇡ 0.2[f (1.1) + f (1.3) + · · · + f (1.7) + f (1.9)] ⇡ 0.691908
1 x

1
y=
x

1 2
JJS (IU) Calculus I 2007 71 / 93
Simpson’s Rule
Use parabola instead of straight line segments to approximate the curve.
Rb x
a f (x) dx ⇡ 3 [f (x0 ) + 4f (x1 ) + 2f (x2 ) + · · · + 2f (xn 2 ) + 4f (xn 1 )
b a
+f (xn )] where x= n and n is even.

P¸ P¡
P∞ Pß

P™

0 a=x¸ ⁄ x™ x£ x¢ x∞ xß=b x

JJS (IU) Calculus I 2007 72 / 93


Evaluation of the Area of an Element
Let y = Ax 2 + Bx + C be the parabola passing through
y0 = f ( h), y1 = f (0) and y2 = f (h) where h > 0.
Then
Z h
h h
[Ax 2 + Bx + C ] dx = [2Ah2 + 6C ] = [y0 + 4y1 + y2 ]
h 3 3

P¸ (_h, y¸) P¡ (0, › )

P™ (h, fi )

_h 0 h x

JJS (IU) Calculus I 2007 73 / 93


Example
Use the Simpson’s
R 1 x 2Rule and the Midpoint Rule with n = 10 to
approximate 0 e dx.
1) The Simpson’s Rule gives (with x = 0.1)
Z 1
2 0.1
e x dx ⇡ [f (0)+4f (0.1)+2f (0.2)+· · ·+4f (0.9)+f (1)] ⇡ 1.462681
0 3
y

y=e ≈

0 x
1
JJS (IU) Calculus I 2007 74 / 93
Example (Cont’d)

2) The midpoints are 0.05, 0.15, . . . , 0.85, 0.95 and the Midpoint Rule
gives (with x = 0.1)
Z 1
2
e x dx ⇡ 0.1[f (0.05) + f (0.15) + · · · + f (0.85) + f (0.95)] ⇡ 1.460393
0

2
y=e x

0 1 x

JJS (IU) Calculus I 2007 75 / 93


Function Known on Discrete Points. An example

The data throughput D(t) (in Mb/s) transmitted to a network is


measured each hour. Estimate the total amount of data transmitted from
noon to midnight.

t !hours" t !seconds" D!t" t !hours" t !seconds" D!t"


0 0 3.2 7 25,200 1.3
1 3,600 2.7 8 28,800 2.8
2 7,200 1.9 9 32,400 5.7
3 10,800 1.7 10 36,000 7.1
4 14,400 1.3 11 39,600 7.7
5 18,000 1.0 12 43,200 7.9
6 21,600 1.1

JJS (IU) Calculus I 2007 76 / 93


Example (Cont’d)

Here we only know D at time t = 0 sec, t = 3600 sec, t = 7200 sec, . . .


So we can use Simpson’s rule with n = 12 and t = 3600 to estimate the
integral :
R 43,200
0 D(t) dt
t
⇡ 3 [D(0) + 4D(3600) + 2D(7200) + · · · + D(43, 200)]
= 143, 880 megabits

JJS (IU) Calculus I 2007 77 / 93


Application

A radar gun was used to record the speed of a runner during the first 5
seconds of a race (see the table). Use Simpson’s Rule to estimate the
distance the runner covered during those 5 seconds.

t (s) v (m!s) t (s) v (m!s)

0 0 3.0 10.51
0.5 4.67 3.5 10.67
1.0 7.34 4.0 10.76
1.5 8.86 4.5 10.81
2.0 9.73 5.0 10.81
2.5 10.22

JJS (IU) Calculus I 2007 78 / 93


Application. Solution

Use Simpson’s Rule with n = 10 and t = 0.5

R5
distance = 0 v (t)dt ⇡ 16 [v (0) + 4v (0.5) + 2v (1) + · · · + 4v (4.5) + v (5)]

1
= 6 (268.41) = 44.735 metres.

JJS (IU) Calculus I 2007 79 / 93


SECTION 7.7 APPROXIMATE INTEGRATION |||| 497

TRAPEZOIDAL RULE

#x
y
y
b
f %x& dx ! Tn ! $ f %x0 & " 2 f %x1 & " 2 f %x2 & " % % % " 2 f %xn!1 & " f %x n &'
a 2
where #x ! %b ! a&(n and xi ! a " i #x.

The reason for the name Trapezoidal Rule can be seen from Figure 2, which illustrates
the case f %x& $ 0. The area of the trapezoid that lies above the ith subinterval is

0 x¸ ⁄ ¤ ‹ x¢ x #x " f %x i!1 & " f %x i &


2
# !
#x
2
$ f %x i!1 & " f %x i &'

FIGURE 2 and if we add the areas of all these trapezoids, we get the right side of the Trapezoidal
Trapezoidal approximation Rule.

EXAMPLE 1 Use (a) the Trapezoidal Rule and (b) the Midpoint Rule with n ! 5 to
approximate the integral x12 %1(x& dx.
1
y= SOLUTION
x
(a) With n ! 5, a ! 1, and b ! 2, we have #x ! %2 ! 1&(5 ! 0.2, and so the Trape-
zoidal Rule gives
1 0.2
y
2
dx ! T5 ! $ f %1& " 2 f %1.2& " 2 f %1.4& " 2 f %1.6& " 2 f %1.8& " f %2&'
1 x 2

! 0.1 " 1
1
"
2
1.2
"
2
1.4
"
2
1.6
"
2
1.8
"
1
2
#
1 2 ! 0.695635
FIGURE 3 This approximation is illustrated in Figure 3.
(b) The midpoints of the five subintervals are 1.1, 1.3, 1.5, 1.7, and 1.9, so the Midpoint
Rule gives
2 1
y=
1
x
y1 x dx ! #x $ f %1.1& " f %1.3& " f %1.5& " f %1.7& " f %1.9&'
!
1
5
" 1
1.1
"
1
1.3
"
1
1.5
"
1
1.7
"
1
1.9
#
! 0.691908
This approximation is illustrated in Figure 4. M

In Example 1 we deliberately chose an integral whose value can be computed explicitly


1 2 so that we can see how accurate the Trapezoidal and Midpoint Rules are. By the Funda-
FIGURE 4 mental Theorem of Calculus,
1
y dx ! ln x]1 ! ln 2 ! 0.693147 . . .
2 2
1 x
y
b

a
f %x& dx ! approximation " error The error in using an approximation is defined to be the amount that needs to be added to
the approximation to make it exact. From the values in Example 1 we see that the errors
in the Trapezoidal and Midpoint Rule approximations for n ! 5 are
ET ! !0.002488 and EM ! 0.001239
498 |||| CHAPTER 7 TECHNIQUES OF INTEGRATION

In general, we have

ET ! y f %x& dx ! Tn EM ! y f %x& dx ! Mn
b b
and
a a

TEC Module 5.2/7.7 allows you to The following tables show the results of calculations similar to those in Example 1, but
compare approximation methods. for n ! 5, 10, and 20 and for the left and right endpoint approximations as well as the
Trapezoidal and Midpoint Rules.

1
Approximations to y n Ln Rn Tn Mn
2
dx
1 x
5 0.745635 0.645635 0.695635 0.691908
10 0.718771 0.668771 0.693771 0.692835
20 0.705803 0.680803 0.693303 0.693069

Corresponding errors n EL ER ET EM
5 !0.052488 0.047512 !0.002488 0.001239
10 !0.025624 0.024376 !0.000624 0.000312
20 !0.012656 0.012344 !0.000156 0.000078

We can make several observations from these tables:


1. In all of the methods we get more accurate approximations when we increase the
value of n. (But very large values of n result in so many arithmetic operations that
we have to beware of accumulated round-off error.)
2. The errors in the left and right endpoint approximations are opposite in sign and
appear to decrease by a factor of about 2 when we double the value of n.
N It turns out that these observations are true 3. The Trapezoidal and Midpoint Rules are much more accurate than the endpoint
in most cases. approximations.
4. The errors in the Trapezoidal and Midpoint Rules are opposite in sign and appear
to decrease by a factor of about 4 when we double the value of n.
5. The size of the error in the Midpoint Rule is about half the size of the error in the
Trapezoidal Rule.
Figure 5 shows why we can usually expect the Midpoint Rule to be more accurate than
the Trapezoidal Rule. The area of a typical rectangle in the Midpoint Rule is the same as
the area of the trapezoid ABCD whose upper side is tangent to the graph at P. The area of
this trapezoid is closer to the area under the graph than is the area of the trapezoid AQRD
used in the Trapezoidal Rule. [The midpoint error (shaded red) is smaller than the trape-
zoidal error (shaded blue).]
C C
R
P P

B B

A D A D
FIGURE 5 x i-1 x–i xi
SECTION 7.7 APPROXIMATE INTEGRATION |||| 499

These observations are corroborated in the following error estimates, which are proved
in books on numerical analysis. Notice that Observation 4 corresponds to the n 2 in each
denominator because %2n&2 ! 4n 2. The fact that the estimates depend on the size of the
second derivative is not surprising if you look at Figure 5, because f )%x& measures how
much the graph is curved. [Recall that f )%x& measures how fast the slope of y ! f %x&
changes.]

) )
3 ERROR BOUNDS Suppose f )%x& ( K for a ( x ( b. If ET and EM are the
errors in the Trapezoidal and Midpoint Rules, then

K%b ! a&3 K%b ! a&3


)E ) (
T
12n 2
and )E ) (
M
24n 2

Let’s apply this error estimate to the Trapezoidal Rule approximation in Example 1. If
f %x& ! 1(x, then f *%x& ! !1(x 2 and f )%x& ! 2(x 3. Since 1 ( x ( 2, we have 1(x ( 1, so

) f )%x& ) ! * *
2
x 3 (
2
13
!2

Therefore, taking K ! 2, a ! 1, b ! 2, and n ! 5 in the error estimate (3), we see that

K can be any number larger than all the


N
2%2 ! 1&3 1
) )
values of f )%x& , but smaller values of K
give better error bounds.
) )
ET (
12%5&2 !
150
! 0.006667

Comparing this error estimate of 0.006667 with the actual error of about 0.002488, we see
that it can happen that the actual error is substantially less than the upper bound for the
error given by (3).

V EXAMPLE 2 How large should we take n in order to guarantee that the Trapezoidal
and Midpoint Rule approximations for x12 %1(x& dx are accurate to within 0.0001?

) )
SOLUTION We saw in the preceding calculation that f )%x& ( 2 for 1 ( x ( 2, so we can
take K ! 2, a ! 1, and b ! 2 in (3). Accuracy to within 0.0001 means that the size of
the error should be less than 0.0001. Therefore we choose n so that

2%1&3
' 0.0001
12n 2

Solving the inequality for n, we get

2
n2 &
12%0.0001&

1
N It’s quite possible that a lower value for n or n& ! 40.8
would suffice, but 41 is the smallest value for s0.0006
which the error bound formula can guarantee us
accuracy to within 0.0001. Thus n ! 41 will ensure the desired accuracy.
500 |||| CHAPTER 7 TECHNIQUES OF INTEGRATION

For the same accuracy with the Midpoint Rule we choose n so that
2%1&3
' 0.0001
24n 2
1
which gives n& ! 29 M
s0.0012

y V EXAMPLE 3
(a) Use the Midpoint Rule with n ! 10 to approximate the integral x01 e x dx.
2

(b) Give an upper bound for the error involved in this approximation.
SOLUTION
2
y=e x (a) Since a ! 0, b ! 1, and n ! 10, the Midpoint Rule gives

y
1 2
e x dx ! #x $ f %0.05& " f %0.15& " % % % " f %0.85& " f %0.95&'
0

! 0.1$e 0.0025 " e 0.0225 " e 0.0625 " e 0.1225 " e 0.2025 " e 0.3025
" e 0.4225 " e 0.5625 " e 0.7225 " e 0.9025'
0 1 x ! 1.460393

FIGURE 6 Figure 6 illustrates this approximation.


2 2 2
(b) Since f %x& ! e x , we have f *%x& ! 2xe x and f )%x& ! %2 " 4x 2 &e x . Also, since
2
0 ( x ( 1, we have x ( 1 and so
2
0 ( f )%x& ! %2 " 4x 2 &e x ( 6e
Taking K ! 6e, a ! 0, b ! 1, and n ! 10 in the error estimate (3), we see that an upper
N Error estimates give upper bounds for bound for the error is
the error. They are theoretical, worst-case
scenarios. The actual error in this case turns 6e%1&3 e
2 ! ! 0.007 M
out to be about 0.0023. 24%10& 400

SIMPSON’S RULE

Another rule for approximate integration results from using parabolas instead of straight
line segments to approximate a curve. As before, we divide $a, b' into n subintervals of
equal length h ! #x ! %b ! a&(n, but this time we assume that n is an even number. Then
on each consecutive pair of intervals we approximate the curve y ! f %x& $ 0 by a parabola
as shown in Figure 7. If yi ! f %x i &, then Pi %x i , yi & is the point on the curve lying above x i .
A typical parabola passes through three consecutive points Pi , Pi"1 , and Pi"2 .
y y

P¸ P¡ P¸(_h, y¸)
P∞ Pß P¡ (0, ›)

P™
P¢ P™ (h, fi)

0 a=x¸ ⁄ x™ x£ x¢ x∞ xß=b x _h 0 h x

FIGURE 7 FIGURE 8
SECTION 7.7 APPROXIMATE INTEGRATION |||| 501

To simplify our calculations, we first consider the case where x 0 ! !h, x 1 ! 0, and
x 2 ! h. (See Figure 8.) We know that the equation of the parabola through P0 , P1 , and P2
is of the form y ! Ax 2 " Bx " C and so the area under the parabola from x ! !h to
x ! h is

Here we have used Theorem 5.5.7.


y %Ax 2 " Bx " C& dx ! 2 y %Ax 2 " C& dx
N h h
Notice that Ax 2 " C is even and Bx is odd. !h 0

!2 A+ x3
3
" Cx, h

!2 A" h
3
3

#h
" Ch ! %2Ah 2 " 6C&
3

But, since the parabola passes through P0%!h, y0 &, P1%0, y1 &, and P2%h, y2 &, we have

y0 ! A%!h&2 " B%!h& " C ! Ah 2 ! Bh " C


y1 ! C
y2 ! Ah 2 " Bh " C

and therefore y0 " 4y1 " y2 ! 2Ah 2 " 6C

Thus we can rewrite the area under the parabola as

h
%y0 " 4y1 " y2 &
3

Now, by shifting this parabola horizontally we do not change the area under it. This means
that the area under the parabola through P0 , P1 , and P2 from x ! x 0 to x ! x 2 in Figure 7
is still
h
%y0 " 4y1 " y2 &
3

Similarly, the area under the parabola through P2 , P3 , and P4 from x ! x 2 to x ! x 4 is

h
%y2 " 4y3 " y4 &
3

If we compute the areas under all the parabolas in this manner and add the results, we get

h h h
y
b
f %x& dx ! %y0 " 4y1 " y2 & " %y2 " 4y3 " y4 & " % % % " %yn!2 " 4yn!1 " yn &
a 3 3 3

h
! %y0 " 4y1 " 2y2 " 4y3 " 2y4 " % % % " 2yn!2 " 4yn!1 " yn &
3

Although we have derived this approximation for the case in which f %x& $ 0, it is a rea-
sonable approximation for any continuous function f and is called Simpson’s Rule after
the English mathematician Thomas Simpson (1710–1761). Note the pattern of coeffi-
cients: 1, 4, 2, 4, 2, 4, 2, . . . , 4, 2, 4, 1.
502 |||| CHAPTER 7 TECHNIQUES OF INTEGRATION

SIMPSON SIMPSON’S RULE


Thomas Simpson was a weaver who taught
"x
himself mathematics and went on to become one
y
b
f !x# dx % Sn ! ( f !x 0 # ! 4 f !x 1 # ! 2 f !x 2 # ! 4 f !x 3 # ! # # #
of the best English mathematicians of the 18th a 3
century. What we call Simpson’s Rule was
actually known to Cavalieri and Gregory in the ! 2 f !xn$2 # ! 4 f !xn$1 # ! f !xn #)
17th century, but Simpson popularized it in his
best-selling calculus textbook, A New Treatise where n is even and "x ! !b $ a#"n.
of Fluxions.

EXAMPLE 4 Use Simpson’s Rule with n ! 10 to approximate x12 !1"x# dx.


SOLUTION Putting f !x# ! 1"x, n ! 10, and "x ! 0.1 in Simpson’s Rule, we obtain

1
y
2
dx % S10
1 x
"x
! ( f !1# ! 4 f !1.1# ! 2 f !1.2# ! 4 f !1.3# ! # # # ! 2 f !1.8# ! 4 f !1.9# ! f !2#)
3

!
0.1
3
& 1
1
!
4
1.1
!
2
1.2
!
4
1.3
!
2
1.4
!
4
1.5
!
2
1.6
!
4
1.7
!
2
1.8
!
4
1.9
!
1
2
'
% 0.693150 M

Notice that, in Example 4, Simpson’s Rule gives us a much better approximation


!S10 % 0.693150# to the true value of the integral !ln 2 % 0.693147. . .# than does the
Trapezoidal Rule !T10 % 0.693771# or the Midpoint Rule !M10 % 0.692835#. It turns out
(see Exercise 48) that the approximations in Simpson’s Rule are weighted averages of
those in the Trapezoidal and Midpoint Rules:

S2n ! 13 Tn ! 23 Mn

(Recall that ET and EM usually have opposite signs and $ EM $ is about half the size of $ ET $.)
In many applications of calculus we need to evaluate an integral even if no explicit for-
mula is known for y as a function of x. A function may be given graphically or as a table
of values of collected data. If there is evidence that the values are not changing rapidly,
then the Trapezoidal Rule or Simpson’s Rule can still be used to find an approximate value
for xab y dx, the integral of y with respect to x.

V EXAMPLE 5 Figure 9 shows data traffic on the link from the United States to SWITCH,
the Swiss academic and research network, on February 10, 1998. D!t# is the data through-
put, measured in megabits per second !Mb"s#. Use Simpson’s Rule to estimate the total
amount of data transmitted on the link up to noon on that day.
D
8

FIGURE 9
0 3 6 9 12 15 18 21 24 t (hours)
SECTION 7.7 APPROXIMATE INTEGRATION |||| 503

SOLUTION Because we want the units to be consistent and D!t# is measured in megabits
per second, we convert the units for t from hours to seconds. If we let A!t# be the
amount of data (in megabits) transmitted by time t, where t is measured in seconds, then
A'!t# ! D!t#. So, by the Net Change Theorem (see Section 5.4), the total amount of data
transmitted by noon (when t ! 12 & 60 2 ! 43,200) is

A!43,200# ! y
43,200
D!t# dt
0

We estimate the values of D!t# at hourly intervals from the graph and compile them in
the table.

t !hours# t !seconds# D!t# t !hours# t !seconds# D!t#


0 0 3.2 7 25,200 1.3
1 3,600 2.7 8 28,800 2.8
2 7,200 1.9 9 32,400 5.7
3 10,800 1.7 10 36,000 7.1
4 14,400 1.3 11 39,600 7.7
5 18,000 1.0 12 43,200 7.9
6 21,600 1.1

Then we use Simpson’s Rule with n ! 12 and "t ! 3600 to estimate the integral:

"t
y
43,200
A!t# dt % (D!0# ! 4D!3600# ! 2D!7200# ! # # # ! 4D!39,600# ! D!43,200#)
0 3
3600
% (3.2 ! 4!2.7# ! 2!1.9# ! 4!1.7# ! 2!1.3# ! 4!1.0#
3
! 2!1.1# ! 4!1.3# ! 2!2.8# ! 4!5.7# ! 2!7.1# ! 4!7.7# ! 7.9)

! 143,880

Thus the total amount of data transmitted up to noon is about 144,000 megabits, or
144 gigabits. M

The table in the margin shows how Simpson’s Rule compares with the Midpoint Rule
n Mn Sn for the integral x12 !1"x# dx, whose true value is about 0.69314718. The second table shows
4 0.69121989 0.69315453 how the error Es in Simpson’s Rule decreases by a factor of about 16 when n is doubled.
8 0.69266055 0.69314765 (In Exercises 27 and 28 you are asked to verify this for two additional integrals.) That is
16 0.69302521 0.69314721 consistent with the appearance of n 4 in the denominator of the following error estimate for
Simpson’s Rule. It is similar to the estimates given in (3) for the Trapezoidal and Midpoint
Rules, but it uses the fourth derivative of f .
n EM ES

4 0.00192729 $0.00000735 4 ERROR BOUND FOR SIMPSON’S RULE Suppose that f !4#!x# % K for $ $
8 0.00048663 $0.00000047 a % x % b. If ES is the error involved in using Simpson’s Rule, then
16 0.00012197 $0.00000003
K!b $ a#5
$E $ %
S
180n 4
504 |||| CHAPTER 7 TECHNIQUES OF INTEGRATION

EXAMPLE 6 How large should we take n in order to guarantee that the Simpson’s Rule
approximation for x12 !1"x# dx is accurate to within 0.0001?
SOLUTION If f !x# ! 1"x, then f !4#!x# ! 24"x 5. Since x * 1, we have 1"x % 1 and so

$f !4#
!x# ! $ * *
24
x5
% 24

N Many calculators and computer algebra sys- Therefore we can take K ! 24 in (4). Thus, for an error less than 0.0001, we should
tems have a built-in algorithm that computes an choose n so that
approximation of a definite integral. Some of
these machines use Simpson’s Rule; others use 24!1#5
) 0.0001
more sophisticated techniques such as adaptive 180n 4
numerical integration. This means that if a func-
tion fluctuates much more on a certain part of 24
the interval than it does elsewhere, then that This gives n4 (
part gets divided into more subintervals. This 180!0.0001#
strategy reduces the number of calculations
required to achieve a prescribed accuracy. 1
or n( % 6.04
s 0.00075
4

Therefore n ! 8 (n must be even) gives the desired accuracy. (Compare this with
Example 2, where we obtained n ! 41 for the Trapezoidal Rule and n ! 29 for the
Midpoint Rule.) M

EXAMPLE 7
(a) Use Simpson’s Rule with n ! 10 to approximate the integral x01 e x dx.
2

(b) Estimate the error involved in this approximation.


SOLUTION
(a) If n ! 10, then "x ! 0.1 and Simpson’s Rule gives
"x
y
1
N Figure 10 illustrates the calculation in 2
e x dx % ( f !0# ! 4 f !0.1# ! 2 f !0.2# ! # # # ! 2 f !0.8# ! 4 f !0.9# ! f !1#)
Example 7. Notice that the parabolic arcs are
2
0 3
so close to the graph of y ! e x that they are
practically indistinguishable from it. 0.1 0
! (e ! 4e 0.01 ! 2e 0.04 ! 4e 0.09 ! 2e 0.16 ! 4e 0.25 ! 2e 0.36
3
y
! 4e 0.49 ! 2e 0.64 ! 4e 0.81 ! e 1 )
% 1.462681
x2 2
y=e (b) The fourth derivative of f !x# ! e x is
2
f !4#!x# ! !12 ! 48x 2 ! 16x 4 #e x
and so, since 0 % x % 1, we have
0 % f !4#!x# % !12 ! 48 ! 16#e 1 ! 76e
Therefore, putting K ! 76e, a ! 0, b ! 1, and n ! 10 in (4), we see that the error is at
0 x most
1
76e!1#5
FIGURE 10 % 0.000115
180!10#4
(Compare this with Example 3.) Thus, correct to three decimal places, we have

y
1 2
e x dx % 1.463 M
0
Improper Integrals

Rb
So far we have considered definite integrals like I = a f (x) dx where
[a, b] is a finite interval and f is continuous and bounded on [a, b]

Such integrals are called proper integrals

Now we extend this concept to cover other possibilities

the interval is infinite ! improper integrals of type I

f is unbounded on [a, b] ! improper integrals of type II

JJS (IU) Calculus I 2007 80 / 93


Improper Integrals of Type I

Example 4.8.1 : What is the area A of the region under the curve
y = 1/x 2 and above the x-axis to the right of x = 1 ?

First find the area between x = 1 and x = t (t > 1)


Rt
A(t) = 1 dx x2
=

It is reasonable then to say : A = limt!1 A(t) =

R1 dx
Rtdx
It is reasonable to write A = 1 x2
= limt!1 1 x2

JJS (IU) Calculus I 2007 81 / 93


Improper Integrals of Type I. Definition

Rt
If a f (x) dx exists for every t a, then
Z 1 Z t
f (x) dx = lim f (x) dx
a t!1 a

provided this limit exists as a finite number

Rb
If t f (x) dx exists for every t  b, then
Z b Z b
f (x) dx = lim f (x) dx
1 t!1 t

provided this limit exists as a finite number

JJS (IU) Calculus I 2007 82 / 93


Improper Integrals of Type I. Definition

R1 Ra
If both a f (x) dx and 1 f (x) dx exist then
Z 1 Z a Z 1
f (x) dx = f (x) dx + f (x) dx
1 1 a

An improper integral is said to be

convergent if the corresponding limit exists as a finite number

divergent otherwise

JJS (IU) Calculus I 2007 83 / 93


Example 4.8.2
R1 dx
Evaluate 1 1+x 2 (hint : use a = 0)

Solution : we can write


Z 1 Z 0 Z 1
dx dx dx
2
= +
1 1+x 1 1 + x2 0 1 + x2

We have
R0 dx
R 11 1+x 2 =
dx
0 1+x 2 =

Both integrals are convergent, so we have


R 1 dx
1 1+x 2 =

JJS (IU) Calculus I 2007 84 / 93


Example 4.8.3
Z 1
dx
is convergent for p > 1 and divergent for p  1
1 xp

For p = 1, Z Z
1 t
dx dx
= lim =
1 x t!1 1 x

For p 6= 1, Z Z
1 t
dx dx
= lim =
1 xp t!1 1 xp

if p > 1

if p < 1

JJS (IU) Calculus I 2007 85 / 93


Improper Integrals of Type II

Example 4.8.4 : What is the area A of the region under the curve
p
y = 1/ x and above the x-axis between x = 0 and x = 1 ?

We have y ! 1 when x ! 0+ , i.e., y is unbounded


We consider the area between x = 0 and x = t
Z 1
dx p 1 p
A(t) = p = 2 x t = 2 (1 t)
t x

It is reasonable to take

A = lim+ A(t) = 2
t!0

JJS (IU) Calculus I 2007 86 / 93


Improper Integrals of Type II. Definition

Rt
If a f (x) dx exists for every t 2 [a, b) and f is possibly unbounded
near b, then Z b Z t
f (x) dx = lim f (x) dx
a t!b a
provided this limit exists as a finite number

Rb
If t f (x) dx exists for every t 2 (a, b] and f is possibly unbounded
near a, then Z b Z b
f (x) dx = lim+ f (x) dx
a t!a t
provided this limit exists as a finite number

JJS (IU) Calculus I 2007 87 / 93


Improper Integrals of Type II. Definition

Rc
If f has an infinite discontinuity at c 2 (a, b), and both a f (x) dx
Rb
and c f (x) dx are convergent, then we define
Z b Z c Z b
f (x) dx = f (x) dx + f (x) dx
a a c

JJS (IU) Calculus I 2007 88 / 93


Example 4.8.5

R3 dx
Evaluate, if possible, 0 x 1

Note that the integrand has an infinite discontinuity at x = 1

We must use
Z 3 Z 1 Z 3
dx dx dx
= +
0 x 1 0 x 1 1 x 1
R1 dx
Now 0 x 1 =

R1 dx
R3 dx
So 0 x 1 diverges and hence 0 x 1 diverges

JJS (IU) Calculus I 2007 89 / 93


Note : if we do not notice the discontinuity at x = 1, we might make the
following erroneous calculation :
Z 3
dx 3
= ln |x 1| 0 = ln 2 ln 1 = ln 2
0 x 1

Example 4.8.6 Evaluate Z 5


dx
p
2 x 2

JJS (IU) Calculus I 2007 90 / 93


A Comparison Test for Convergence

Sometimes we cannot find the exact value of an improper integral but we


can determine whether or not it is convergent

Comparison Test
Suppose that
for x a, f and g are continuous and non-negative

there is a positive constant K such that f (x)  K g (x)


Then Z 1 Z 1
g (x) dx convergent ) f (x) dx convergent
a a
Z 1 Z 1
f (x) dx divergent ) g (x) dx divergent
a a

JJS (IU) Calculus I 2007 91 / 93


Example 4.8.6

R1 x2
Determine whether or not 0 e dx converges
We cannot compute an elementary antiderivative

We can write
Z 1 Z 1 Z 1
x2 x2 x2
e dx = e dx + e dx
0 0 1

R1 x2
0 e dx is clearly convergent (it is a proper integral)

R1 x2
1 e dx

Hint : e x2 e x for every x 1

JJS (IU) Calculus I 2007 92 / 93


Example 4.8.6. Solution
R1 x2
The integral 1 e dx converges. Indeed

e x2 e x for every x 1

R1 x
Rt x 1 t)
1 e dx = limt!1 1 e dx = limt!1 (e e
= 1/e

x2 x
R1 x
e e for every x 1 and 1 e dx converges

R1 x2
By the comparison test, 1 e dx converges

R1 x2
Therefore 0 e dx converges

JJS (IU) Calculus I 2007 93 / 93


Applications: Pollutant

Example.
The rate at which a pollutant is being dumped into a small stream
at time t is given by P0 e kt , where is the amount of pollutant
released into the stream. Suppose that P0 = 1000 and k = 0.06.
Find the total amount of the pollutant that will be released into
the stream into the indefinite future.

The total amount of the pollutant that will be released into the
stream into the indefinite future is calculated as:
Z 1 Z 1
kt
P0 e dt = 1000e 0.06t dt.
0 0

Assoc. Prof. Nguyen Dinh Prof. J-J. Strodiot CALCULUS 2 (BA)


Applications: Pollutant

We have
Z 1 Z b
0.06t 0.06t
1000e dt = lim 1000e dt
0 b!1 0
✓ ◆ b
1000 0.06t
= lim e
b!1 0.006 0
✓ ◆
1000 1000 0
= lim e
b!1 0.06e 0.06b 0.06
1000
=
0.06
⇡ = 16, 667.

A total of 16,667 units of pollutant eventually will be released.

Assoc. Prof. Nguyen Dinh Prof. J-J. Strodiot CALCULUS 2 (BA)


Applications: Capital value

The capital value of an asset (property) is sometimes defined as


the present value of all future net earning of the asset. If R(t) give
the annual rate at which earnings are produced by by an asset at
time t, then the present value formula [see section continuous
money flow] gives the capital value as
Z 1
R(t)e rt dt
0

where r is the annual rate of interest, computed continuously, and


the first payment is assumed to be made in one year.

Assoc. Prof. Nguyen Dinh Prof. J-J. Strodiot CALCULUS 2 (BA)


Applications: Capital value
Example.
Suppose income from a rental property is generated at the annual
rate of $ 4000 per year. Find the capital value of this property at
an interest rate 10% computed continuously.

This is a continuous income stream with a rate of flow of $4000 per


year, or R(t) = 4000. Also, r = 0.1 The capital value is given by
Z 1 Z b
rt 0.1t
4000e dt = lim 4000e dt
0 b!1 0
✓ ◆ b
4000 0.1t
= lim e
b!1 0.1 0
⇣ ⌘
0.1b
= lim 40, 000e + 40, 000
b!1
= 40, 000.

The capital value is $40,000.


Assoc. Prof. Nguyen Dinh Prof. J-J. Strodiot CALCULUS 2 (BA)

You might also like