Professional Documents
Culture Documents
Solutions of Equation in One Variable Motivation: Mohsin Raza/Handout 2 - 1-Numerical Analysis CS-572
Solutions of Equation in One Variable Motivation: Mohsin Raza/Handout 2 - 1-Numerical Analysis CS-572
Lecture 3
Solutions of equation in one variable
Motivation
In this lecture, we consider one of the most basic problems of numerical approximation, the
root-finding problem. This process involves finding a root, or solution, of an equation of the
form ( ) 0 f x = , for a given function f . A root of this equation is also called a zero of the
function f .
The problem of finding an approximation to the root of an equation can be traced back at
least as far as 1700 B. C.
The first technique, based on the Intermediate Value Theorem, is called the Bisection, or
Binary-search, method. Suppose f is a continuous function defined on the interval [a, b],
with ( ) f a and ( ) f b of opposite sign. By the Intermediate Value Theorem, there exists a
number p in (a, b) with ( ) 0 f p = . Although the procedure will work when there is more than
one root in the interval (a, b), we assume for simplicity that the root in this interval is unique.
The method calls for a repeated halving of subintervals of [a, b] and, at each step, locating
the half containing p.
To begin, set
1
a a = and
1
b b = , and let
1
p be the midpoint of | |
, ; a b that is,
1 1 1 1
1 1
.
2 2
b a a b
p a
+
= + =
If ( )
1
0, f p = then
1
p p = , and we are done. If ( )
1
0, f p = then ( )
1
f p has the same sign as
either ( )
1
f a or ( )
1
. f b When ( )
1
f p and ( )
1
f a have the same sign, ( )
1 1
, , p p b e and we set
2 1
a a = and
2 1
. b p = when ( )
1
f p and ( )
1
f a have the opposite signs, ( )
1 1
, p a p e and we set
2 1
a a = and
2 1
. b p = we then reapply the process to the interval | |
2 2
, a b . This produces the
method described in Algorithm 2.1.(See Figure 2.1).
Mohsin Raza/Handout 2 -2- Numerical Analysis CS-572
Bisection
Algorithm
2.1
Mohsin Raza/Handout 2 -3- Numerical Analysis CS-572
Exercise 2.1
.
Mohsin Raza/Handout 2 -4- Numerical Analysis CS-572
Assignment
Find an approximation to 3 correct to within
4
10