Вы находитесь на странице: 1из 23

Numerical Methods

Finding Roots
Fixed Point Iteration

Rewrite f(x) = 0 to x = g(x)


To solve x = g(x), we iteratively calculate
xi+1 = g(xi)
The problem is how to choose g(x) so as
to ensure convergence
y = f(x)
y = g(x) and y = x
12
5
10
4
8
3
6
2
4
f(x )

y
2
0
0 -3 -2 -1 0 1 2 3
-1
-3 -2 -1 0 1 2 3
-2
-2
-4
-3
-6
-4
x x
Fixed Point Iteration
The equation f(x) = 0, where f(x) = x3 7x + 3, may be re-
arranged to give x = (x3 + 3)/7.
Intersection of the graphs of y = x and y = (x3 + 3)/7
represent roots of the original equation x3 7x + 3 = 0.
4
y = (x3 + 3)/7
3

0
y

-5 -4 -3 -2 -1 0 1 2 3 4 5
-1

y=x -2

-3

-4
x
Fixed Point Iteration
The rearrangement x = (x3 + 3)/7 leads to the iteration
xn 3 + 3
x n +1 = , n = 0, 1, 2, 3, ...
7
To find the middle root , let initial approximation x0 = 2.
x0 3 + 3 23 + 3
x1 = = = 1 .57143
7 7
x13 + 3 1 .57143 3 + 3
x2 = = = 0 .98292
7 7

x23 + 3 0 .98292 3 + 3
x3 = = = 0 .56423
7 7

x3 3 + 3 0 .56423 3 + 3 etc.
x4 = = = 0 .45423
7 7

The iteration slowly converges to give = 0.441 (to 3 s.f.)


Fixed-point Iteration
Example(1)
Fixed-point Iteration
Example(2)
Convergence of Fixed Point Iteration

|g(x)| < 1: (a), (b)


|g(x)| > 1: (c), (d)
Example

Find a root of x3 - x2 - 1 = 0 with x0 = 1.5

x - 1 - x-2 = 0 x3 = 1 + x2 x2(x - 1) = 1

g(x) 1 + x-2 (1 + x2)1/3 (x - 1)-1/2

g(x) -2x-3 2x / [3(1+x2)2/3] -1 / [2(x-1)3/2]

|g(x)| < 1 for |g(x)| < 1 for |g(x)| > 1 for


Comment
x > 1.3 1x2 x < 1.6
Fixed Point Iteration
The rearrangement x = (x3 + 3)/7 leads to the iteration
xn 3 + 3
x n +1 = , n = 0, 1, 2, 3, ...
7
For x0 = 2 the iteration will converge on the middle root , since g() < 1.

n x 2

0 2
1 1.57143 1.5
2 0.98292 y=x
3 0.56423 y = (x3 + 3)/7
y 1
4 0.45423
5 0.44196
6 0.4409 0.5

7 0.44082
8 0.44081 0
0 0.5 1 1.5 2
x3 xx 2 x1 x0

= 0.441 (to 3 s.f.)

Вам также может понравиться