Week03 Open Methods
Week03 Open Methods
Week03 Open Methods
x 2
3
x 2x 3 0 x
2
sin x 0 x sin x x
5
Iterative method
• New estimate of x is expressed by iterative formula
xi 1 g ( xi )
• formula to predict the value of x as a function of x
i.e. it can be used to estimate the new value xi+1
knowing or having an initial guess xi (an old value).
xi 1 xi
• Calculation of error as a 100%
xi 1
Example:
Use simple fixed-point iteration to locate the root of
f(x)=e-x –x .Use initial guess of x0 = 0.
6
Two curve graphical method
How to overcome?
1. Choose different initial
guess.
2. Modify the function g(x)
into another form.
3. Choose another method.
f ( xi ) 0
f ' ( xi )
xi xi 1
rearrangin g,
f ( xi )
xi 1 xi
f ( xi )
11
Although NR is often very efficient,
there are situations where it performs
poorly and slow convergence due to
nature of the function and other
difficulties:
a) Iterations beginning at x0
progressively diverge from the root.
12
Example
e xi xi
xi 1 xi xi
e 1
13
Secant method
14
f ( xi 1 ) f ( xi )
f ( xi )
xi 1 xi
f ( xi )
xi 1 xi
f ( xi )
f ( xi )( xi 1 xi )
xi 1 xi i 1,2,3,
f ( xi 1 ) f ( xi )
15
• Requires two initial estimates of x , e.g, xo,
x1. However, because f(x) is not required to
change signs between estimates, it is not
classified as a “bracketing” method.
• The secant method has the same properties
as Newton’s method. Convergence is not
guaranteed for all xo.
16
Example
xi f ( xi )
xi 1 xi
f ( xi xi ) f ( xi )
18
Example
19
False position and secant method
• The similarity
– Use two initial estimates to compute an
approximation of the slope of the function that is
used to project to the x axis for a new estimate of
the root
• The difference
– How one of the initial values replaced by the new
estimate
20
Comparison of the False
position and the secant
methods.
21
Exercise
(6.2) Determine the highest real root of
f(x) = 2x3 – 11.7x2 + 17.7x – 5
23