- +
Suppose f(x) is a continuous function of x within interval [a, b]. f(a) = - ive and f(b) = + ive There exist at least a number p in [a, b] with f(p) = 0. Meaning, p is a root of the equation f(x) = 0
- +
The Bisection Method calls for a repeated halving of subintervals of [a, b] each time locating the half containing p. Bisection Method (Binary Search)
Bisection Algorithm
Set a 1 = a and b 1 = b. Find the midpoint between a 1 and b 1. Midpoint,
If f(p 1 ) = 0, then p 1 is the root of the equation within [a, b]. If f(p 1 ) 0, then what? Then find if f(p 1 ) has the same sign as either f(a 1 ) or f(b 1 ).
Bisection Algorithm
IF f(p 1 ) has the same sign as f(a 1 ), then the root is in [p 1, b 1 ]. Set a 2 = p 1 and b 2 = b 1. IF f(p 1 ) has the same sign as f(b 1 ), then the root is in [a 1, p 1 ]. Set a 2 = a 1 and b 2 = p 1.
The root is in the interval [a 2, b 2 ]. Divide the interval in two halves and repeat the process.
When do we stop?
has a root in [1, 2]. nanan pnpn bnbn 11.0 (-)1.5 (+)2.0 (+) 21.0 (-)1.25 (-)1.5 (+) (-)1.375 (+)1.5 (+) (-) (-)1.375 (+) (-) (-)1.375 (+)
The Method of False Position The method is based on bracketing the root between two points. At the beginning choose two points, so that Now draw a line joining The x-intercept of the line is
Now bracket the root between either Which pair to choose? On the other hand Let us assume that This means that the root is between
Now draw a line joining The x-intercept of the line is and the process continues …
has a root in [1, 2]. n
Fixed-Point Iteration Rewrite f(x) = 0 in the form of x = g(x) and iterate. has a root in [1, 2].
We can rewrite f(x) in the form of x = g(x) in the following ways.
Start with x = 1.5
Results of the Fixed-point Iteration n(a)(b)(c)(d)
Why some expressions failed to deliver the root? To deliver the root, g(x) for all x in [a, b] must stay within [a, b].
Newton’s Method
Consider the triangle (p 2, 0), (p 1, 0) and (p 1, f(p 1 )).
Newton’s Method
Consider the triangle (p 2, 0), (p 1, 0) and (p 1, f(p 1 )). (p 2, 0) (p 1, 0) (p 1, f(p 1 ))
(p 2, 0) (p 1, 0) (p 1, f(p 1 )) The slope,
A sequence can be generated as:
Example: