Upload
marilyn-black
View
227
Download
0
Tags:
Embed Size (px)
Citation preview
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)
If f(p1) = 0, then p1 is the root of the equation within [a, b].
If f(p1) 0, then what?
Then find if f(p1) has the same sign as either f(a1) or f(b1).
IF f(p1) has the same sign as f(a1) , then the root is in [p1, b1]. Set a2 = p1 and b2 = b1.
IF f(p1) has the same sign as f(b1) , then the root is in [a1, p1]. Set a2 = a1 and b2 = p1.
0104 23 xx)x(f hasa root in [1, 2].
n an pn bn1 1.0 (-) 1.5 (+) 2.0 (+)
2 1.0 (-) 1.25 (-) 1.5 (+)
3 1.25 (-) 1.375 (+) 1.5 (+)
4 1.25 (-) 1.3125 (-) 1.375 (+)
5 1.3125 (-) 1.34375 (-) 1.375 (+)
The Method of False Position
The method is based on bracketing the root between two points.
At the beginning choose two points, 0 1 and p p
so that 0 1 0f p f p
Now draw a line joining 0 0 1 1 and p , f p p , f p
The x-intercept of the line is 2p
Now bracket the root between either 0 2 1 2 or p , p p , p
Which pair to choose?
0 2If 0 then choosef p f p 0 2p , p
1 2if 0 then choosef p f p On the other hand
1 2p , p
Let us assume that 0 2 0f p f p
This means that the root is between 0 2p , p
Now draw a line joining 0 0 2 2 and p , f p p , f p
The x-intercept of the line is 3p
and the process continues …
Fixed-Point Iteration
Rewrite f(x) = 0 in the form of x = g(x) and iterate.
0104 23 xx)x(f has
a root in [1, 2].
We can rewrite f(x) in the form of x = g(x) in the following ways.
2
1
4
2
13
3
2
1
2
231
410(d)
102
1(c)
410(b)
104(a)
x/)x(gx
x)x(gx
xx/)x(gx
xxx)x(gx
104(a) 231 xxx)x(gx
Start with x = 1.5
8750
10514515151 231
.
...).(gx
7326
108750487508750
875023
1
.
...
).(gx
Results of the Fixed-point Iteration
n (a) (b) (c) (d)
1 1.5 1.5 1.5 1.5
2 -0.875 0.8165 1.2869537 1.3483997
3 6.732 2.9969 1.4025408 1.3673763
4 -469.7 1.3454583 1.3649570
5 1.3751702 1.3652647
6 1.3600941 1.3652255
7 1.3678469 1.3652305
8 1.3638870 1.3652299
9 1.3659167 1.3652300
810031 . 21658.
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].
b g a a
b g b a