You are on page 1of 10

Open Methods

MECE 2450
Numerical Methods and Statistics
Open vs. Bracketing
Methods
Must specify interval when
using bracketing method
Bracketing methods are
always convergent
Open methods do not
bounded interval
Open methods may not
converge
When they converge, they
usually do so more quickly
than bracketing methods
1
2
Sunday, February 13, 2011
Simple Fixed-Point
Iteration
The Two-Curve
Graphical Method
Alternative approach is
to separate function
into two components
Graphic the
components
Identify where the
components intersect
3
4
Sunday, February 13, 2011
Convergence and
Divergence of Method
(a) and (b) depict
convergence
(c) and (d) depict
divergence
(a) and (c) are called
monotone patterns
(b) and (d) are spiral
patterns
Fixed-Point Pseudocode
Note other open
methods can be cast in
this general format
5
6
Sunday, February 13, 2011
Test Your Mettle
FLOWCHART THE FIXED-POINT METHOD
Fixed-Point Iteration
(Problem 6.1)
0.5 1 1.5 2
!0.5
0
0.5
1
1.5
2
2.5
x
f
(
x
)
Iteration 0


f (x) = 2 si n

x x = f1(x) f2(x)
f(x)
f
1
(x)
f
2
(x)
0.5 1 1.5 2
!0.5
0
0.5
1
1.5
2
2.5
x
f
(
x
)
Iteration 0


f (x) = 2 si n

x x = f1(x) f2(x)
f(x)
f
1
(x)
f
2
(x)
7
8
Sunday, February 13, 2011
Newton-Raphson
Method
Next estimates are
determined by using
the slope of the
function at the current
estimate
Truncated Taylor Series
can be used to
approximate the slope
in terms of next and
current step
Newton-Raphson
Converging (Prob. 6.2)
1 1.5 2 2.5 3
!4
!3
!2
!1
0
1
2
3
4
x
f
(
x
)
f (x) = 2x
3
11. 7x
2
+ 17. 7x 5
Iteration 0
1 1.5 2 2.5 3
!4
!3
!2
!1
0
1
2
3
4
x
f
(
x
)
f (x) = 2x
3
11. 7x
2
+ 17. 7x 5
Iteration 0
x
0
=1.25

s
=0.01
9
10
Sunday, February 13, 2011
Potential Pitfalls of
Newton-Raphson
(a) Inection near vicinity of
root causes divergence
(b) Tendency to oscillate
around a local max or min
(c) Initial guess close to one
root can jump to several
roots away
(d) Zero slope is a disaster
Algorithm for Newton-
Raphson
1. A plotting routine should be included in the program.
2. At the end, the solution should be substituted to insure
result is close to zero. This is to guard against slow or
oscillating convergence which may lead to small relative
error but a false root.
3. The program should always include an upper limit on
iterations to guard against oscillating, slowly convergent, or
divergent solutions.
4. The program should alert the user and take into account
that df/dx might equal zero.
11
12
Sunday, February 13, 2011
The Secant Method
Eliminates the need for
knowing the derivative
of the function
Derivative
approximated from
backward difference
Two, instead of one,
initial guesses are
needed
f

(x
i
)

=
f (x
i1
) f (x
i
)
x
i1
x
i
x
i+1
= x
i

f (x
i
)(x
i1
x
i
)
f (x
i1
) f (x
i
)
Secant vs. False-
Position
The two estimates in
False-Position always
bracket the root
insuring convergence
Secant uses two
previous iterations to
approx. derivative and
can diverge
13
14
Sunday, February 13, 2011
Modied Secant Method
Eliminate the need for
two arbitrary initial
guesses
! is a small perturbation
fraction
Must be careful with
choice of perturbation
f

(x
i
)

=
f (x
i
+x
i
) f (x
i
)
x
i
x
i+1
= x
i

x
i
f (x
i
)
f (x
i
+x
i
) f (x
i
)
MATLAB Root-Finding
Functions
fzero: Finds root of continuous function of one
variable (i.e. f (x) = 0).
fsolve: Solves a problem specied by F(x) = 0 for
x, where x is a vector and F(x) is a function that
returns a vector value.
roots: Returns the roots of a polynomial.
15
16
Sunday, February 13, 2011
Brents Method
Combine the reliability of bracketing and the speed
of open methods
Most often the Bisection Method is used in
combination with the Secant Method or Inverse
Quadratic Interpolation
Inverse Quadratic
Interpolation
17
18
Sunday, February 13, 2011
Inverse Quadratic
Interpolation Continued
Similar to Secant Method which is sometimes
referred to as linear-interpolation method
If you have three points instead of two, you can
use t a quadratic equation through the point and
see where it crosses the x-axis
The advantage is that the quadratic t often yields
a better estimate than the linear t
19
Sunday, February 13, 2011

You might also like