Chapter 3
Roots of Equations
In this chapter we shall discuss one of the oldest approximation problems
which
consists of finding the roots of an equation.
It is also one of the most commonly
occurring problems in applied mathematics.
The root-finding problem consists
of the following: given a continuous function f,
find the values of x that satisfy the equation
f(x) = 0 (3.1)
The solutions of this equation are called the zeros of f or the roots of the
equation.
In general, Eqn. (3.1) is impossible to solve exactly. Therefore, one must
rely on
some numerical methods for an approximate solution.
“An introduction to numerical methods, A matlab approach“ , Third edition Slide 1 - 3
Contents of the chapter
3.1 The Bisection Method
3.3 Fixed Point Iteration
3.5 Newton’s Method
“An introduction to numerical methods, A matlab approach“ , Third edition Slide 1 - 4
3.1
Bisection Method
“An introduction to numerical methods, A matlab approach“ , Third edition Slide 1 - 5
3.1 Bisection Method
Objectives:
Verify that a function has exactly one root in an open interval by
using bisection method
Count the number of iteration needed to find the root of an
equation by using bisection method
Determine the root is correct to a decimal using the bisection
method
Use the matlab to solve a problem by using bisection method
“An introduction to numerical methods, A matlab approach“ , Third edition Slide 1 - 6
3.1 THE BISECTION METHOD
Let f(x) be a given function, continuous on an
interval [a, b], such that
f(a) f(b) < 0. (3.4)
Using the Intermediate Value Theorem, it
follows that there exists at least one zero
of f in (a, b). To simplify our discussion, we
assume that f has exactly one root α.
“An introduction to numerical methods, A matlab approach“ , Third edition Slide 1 - 7
The bisection method is based on:
(1) halving the interval [a, b] to determine a smaller
and smaller interval within which α must lie.
(2)The procedure is carried out by first defining the midpoint of [a, b], c = (a + b)/2
and then computing the product f(c)f(b).
(3)If the product is negative, then the root is in the interval [c,b].
(4)If the product is positive, then the root is in the interval [a, c]. Thus, a new
interval containing α is obtained.
(5)The process of halving the new interval continues until the root is located as
accurately as desired.
“An introduction to numerical methods, A matlab approach“ , Third edition Slide 1 - 8
, that is
where an and bn are the endpoints of the nth interval [an, bn]
and is a specified
tolerance value.
Some other stopping criteria that one can use, other than
(3.5), are given by
“An introduction to numerical methods, A matlab approach“ , Third edition Slide 1 - 9
An algorithm statement of this method:
Suppose f(a)f(b) ≤ 0. Let
a0 = a and b0 = b.
for n = 0, 1, . . . ,ITMAX
“An introduction to numerical methods, A matlab approach“ , Third edition Slide 1 - 10
Solution
“An introduction to numerical methods, A matlab approach“ , Third edition Slide 1 - 11
“An introduction to numerical methods, A matlab approach“ , Third edition Slide 1 - 12
Theorem 3.1
Proof :
“An introduction to numerical methods, A matlab approach“ , Third edition Slide 1 - 13
Solution
“An introduction to numerical methods, A matlab approach“ , Third edition Slide 1 - 14
Now it’s your turn
>> Bis
enter the value of a: 1
enter the value of b: 2
enter the tolerance level: 0.000001
enter the number of iteration: 20
0 1.500000000000000
1 1.250000000000000
2 1.375000000000000
3 1.437500000000000
4 1.406250000000000
5 1.390625000000000
6 1.382812500000000
7 1.386718750000000
“An introduction to numerical methods, A matlab approach“ , Third edition Slide 1 - 15
8 1.388671875000000
9 1.387695312500000
10 1.388183593750000
11 1.387939453125000
12 1.388061523437500
13 1.388122558593750
14 1.388153076171875
15 1.388137817382813
16 1.388130187988281
17 1.388126373291016
18 1.388124465942383
19 1.388125419616699
“An introduction to numerical methods, A matlab approach“ , Third edition Slide 1 - 16
“An introduction to numerical methods, A matlab approach“ , Third edition Slide 1 - 17
“An introduction to numerical methods, A matlab approach“ , Third edition Slide 1 - 18
Exercise set:1,2,3,7,10
Computer problem:1
“An introduction to numerical methods, A matlab approach“ , Third edition Slide 1 - 19