Sie sind auf Seite 1von 21

Chapter 2

Roots of Equations
- Simple Fixed-Point
Iteration

Learning Outcome
At

the end the lecture students should


be able to use the Simple Fixed-Point
Iteration to estimate the root of the
equation.

Open Methods
Open

methods involve one or more


initial guesses, but there is no need for
them to bracket the root. The open
methods do not always work (they can
diverge) but when they do they usually
converge quickly.

Open Methods
The
a)
b)
c)

three main open methods are


Simple Fixed-Point Iteration Method
Newton-Raphson Method
Secant Method

Simple Fixed-Point
Iteration
A

formula can be developed for simple


fixed-point iteration by rearranging the
function f(x)=0 so that x is on one side of the
x g (x)
equation:

This

transformation can be accomplished


either by algebraic manipulation or by
simply adding x to both sides of the original
equation.

Simple Fixed-Point
Iteration
Example:

x of
g (x)
form

Convert x 2 2 x 3 0
x2 2x 3 0
x2 3
x
2
or x 2 x 3
3
or x 2
x
or x x 2 x 3

in the

Simple Fixed-Point
Iteration
utility ofx g (x)
is that it provides a
formula to predict a new value of x as a
function of an old value of x. Thus, given
an initial guessesxi
the equationx g (x)
xi 1
can be used to compute a new
estimate
as expressed by the
iterative formula

The

xi 1 g ( xi )

Simple Fixed-Point
Iteration
The

algorithm is as follows:
x0
Initial guess =
First iteration:

x1 g ( x0 )

Second iteration:

x2 g ( x1 )

Third iteration:

x3 g ( x2 )

Fourth iteration:

x4 g ( x3 )

Simple Fixed-Point
Iteration
This

method is depicted in the diagram


yx
below:
g ( x1 )

g ( x1 ) x2
g ( x2 )

g ( x0 )

g ( x0 ) x1

root

This

x0

g (x)

graph is called oscillating or spiral


pattern.
The root estimate we obtained forx g (x)
is also the root estimate for f(x)=0.

Simple Fixed-Point
Iteration
The

Simple fixed-point iteration can also be


depicted as follows:
yx

g (x)

g ( xi ) xi 1

g ( xi )
g ( xi 1 ) xi 2
g ( xi 2 ) xi 3

g ( xi 1 )
g ( xi 2 )

root
This

xi

graph is called monotone pattern

Simple Fixed-Point
Iteration
The

graphical is either a spiral or


monotone depends on the function g(x)
that we employ.
The approximate error for this equation
can be determined using the error
estimator:
xi 1 xi
a
100%
xi 1

Divergence of Fixed-Point
Iteration
This

method is not always converged to


the root, they sometimes diverge or
move away from the true root as the
computation progresses.

Convergence of Fixed-Point
Iteration
(a)

and (b)
converged to
true root.
(c) and (d)
diverged away
from true root.
Convergence
occurs if in the
region of interest
g ' ( x) 1

Example 1
Use

simple fixed-point iteration to locate


the root of f ( x) 2 sin( x ) x
where
x0 0of
.5
x is in radians. Use an initial guess
a 0.001%
and iterate until
.

Solution
Rearranging

as

the equation f ( x) 2 sin( x ) x 0


x 2 sin( x )

The formula for simple fixed-point iteration


xi 1 2 sin( xi )
is
x0 0.5

x1 guess
2 sin( of
x0 )
Using an initial
, the first
iteration is
2 sin( 0.5 ) 1.299274
a

x1 x0
1.299274 0.5
100%
100% 61.517%
x1
1.299274

Solution

The remaining iterations are displayed in the


following table:
i

xi

a (%)

0.5

1.299274

61.517

1.817148

28.499

1.950574

6.840

1.969743

0.973

1.972069

0.118

1.972344

0.014

1.972377

0.002

1.9723805

0.00018

After 8 iterations a 0.001% and the approximate


value of the root is 1.9723805.

Example 2
Use

simple fixed-point iteration to locate


the root of
f ( x) e x x
employing an initial guess ofx0 0 .
a until
1.5%
Iterate
. Use the true
t
value 0.56714329 to compute
.

Solution
Rearranging

as

x
f
(
x
)

e
x0
the equation
x e x

xi
x

e
1
The formula for isimple
fixed-point iteration
x0 0
is

0.56714329 0
100% 100%
0.56714329
initial
guess of
,

Using an

Solution
First

iteration:

x1 e x0 e 0 1
1 0
a
100% 100%
1

t
Second

iteration:

0.56714329 1
100% 76.3%
0.56714329

x2 e x1 e 1 0.367879
0.367879 1
a
100% 171.8%
0.367879

0.56714329 0.367879
100% 35.1%
0.56714329

Solution
All

the remaining iterations are displayed in


the following table:
a (%)

t (%)

xi

100.0

76.3

0.367879

171.8

35.1

0.692201

46.9

22.1

0.500473

38.3

11.8

0.606244

17.4

6.89

0.545396

11.2

3.83

0.579612

5.9

2.20

0.560115

3.48

1.24

0.571143

1.93

0.71

10

0.564879

1.11

0.40

100.0

Solution
10 iterations, a 1.5%
and the
computation is terminated. The
approximate value of the root is
0.564879. Thus, each iteration brings
the estimate closer to the true value of
the root 0.56714329.

After

Das könnte Ihnen auch gefallen