Docsity

Open Methods for Root Location, Study notes of Calculus for Engineers

Toggle sidebar
bg1
6
CHAPTER
145
Open Methods
For the bracketing methods in Chap. 5, the root is located within an interval prescribed
by a lower and an upper bound. Repeated application of these methods always results
in closer estimates of the true value of the root. Such methods are said to be convergent
because they move closer to the truth as the computation progresses (Fig. 6.1a).
In contrast, the open methods described in this chapter are based on formulas
that require only a single starting value of x or two starting values that do not
FIGURE 6.1
Graphical depiction of the
fundamental difference between
the (a) bracketing and (b) and
(c) open methods for root
location. In (a), which is the
bisection method, the root is
constrained within the interval
prescribed by xl and xu. In
contrast, for the open method
depicted in (b) and (c), a
formula is used to project from
xi to xi11 in an iterative fashion.
Thus, the method can either (b)
diverge or (c) converge rapidly,
depending on the value of the
initial guess.
f(x)
x
(a)
xlxu
xlxu
f(x)
x
(b)
xi
xi + 1
f(x)
x
(c)
xi
xi + 1
xlxu
xlxu
xlxu
[39]
pf3
pf4
pf5

Partial preview of the text

Download Open Methods for Root Location and more Study notes Calculus for Engineers in PDF only on Docsity!

C H A P T E R 6

Open Methods

For the bracketing methods in Chap. 5, the root is located within an interval prescribed

by a lower and an upper bound. Repeated application of these methods always results

in closer estimates of the true value of the root. Such methods are said to be convergent

because they move closer to the truth as the computation progresses (Fig. 6.1 a ).

In contrast, the open methods described in this chapter are based on formulas

that require only a single starting value of x or two starting values that do not

FIGURE 6.

Graphical depiction of the fundamental difference between the ( a ) bracketing and ( b ) and ( c ) open methods for root location. In ( a ), which is the bisection method, the root is constrained within the interval prescribed by xl and xu. In contrast, for the open method depicted in ( b ) and ( c ), a formula is used to project from xi to xi 11 in an iterative fashion. Thus, the method can either ( b ) diverge or ( c ) converge rapidly, depending on the value of the initial guess. f ( x ) x

( a )

xl xu xl xu f ( x ) x

( b )

xi xi + 1 f ( x ) x

( c )

xi xi + 1 xl xu xl xu xl xu

146 OPEN METHODS

necessarily bracket the root. As such, they sometimes diverge or move away from

the true root as the computation progresses (Fig. 6.1 b ). However, when the open

methods converge (Fig. 6.1 c ), they usually do so much more quickly than the brack-

eting methods. We will begin our discussion of open techniques with a simple version

that is useful for illustrating their general form and also for demonstrating the con-

cept of convergence.

6.1 SIMPLE FIXED-POINT ITERATION

As mentioned above, open methods employ a formula to predict the root. Such a formula

can be developed for simple i xed-point iteration (or, as it is also called, one-point it-

eration or successive substitution) by rearranging the function f ( x ) 5 0 so that x is on

the left-hand side of the equation:

x 5 g ( x ) (6.1)

This transformation can be accomplished either by algebraic manipulation or by simply

adding x to both sides of the original equation. For example,

x^2 2 2 x 1 3 5 0

can be simply manipulated to yield

x 5

x^2 1

whereas sin x 5 0 could be put into the form of Eq. (6.1) by adding x to both sides

to yield

x 5 sin x 1 x

The utility of Eq. (6.1) 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 guess at the root xi , Eq. (6.1) can

be used to compute a new estimate xi 11 as expressed by the iterative formula

xi 11 5 g ( xi ) (6.2)

As with other iterative formulas in this book, the approximate error for this equation can

be determined using the error estimator [Eq. (3.5)]:

e a 5 `

xi 11 2 xi

xi 11

` 100%

EXAMPLE 6.1 Simple Fixed-Point Iteration

Problem Statement. Use simple ixed-point iteration to locate the root of f ( x ) 5 e^2 x^ 2 x.

Solution. The function can be separated directly and expressed in the form of Eq. (6.2) as

xi 11 5 e^2 xi

148 OPEN METHODS

These points are plotted in Fig. 6.2 b. The intersection of the two curves indicates a root

estimate of approximately x 5 0.57, which corresponds to the point where the single

curve in Fig. 6.2 a crosses the x axis.

Solution. Reformulate the equation as y 1 5 x and y 2 5 e^2 x. The following values can

be computed:

x y 1 y 2 0.0 0.0 1. 0.2 0.2 0. 0.4 0.4 0. 0.6 0.6 0. 0.8 0.8 0. 1.0 1.0 0. FIGURE 6. Two alternative graphical methods for determining the root of f ( x ) 5 e^2 x^ 2 x. ( a ) Root at the point where it crosses the x axis; ( b ) root at the intersec- tion of the component functions. f ( x ) f ( x ) x x Root Root f ( x ) = e –^ x^ – x f (^) 1 ( x ) = x f (^) 2 ( x ) = e –^ x

( a )

( b )

6.1 SIMPLE FIXED-POINT ITERATION 149

The two-curve method can now be used to illustrate the convergence and divergence

of ixed-point iteration. First, Eq. (6.1) can be reexpressed as a pair of equations y 1 5 x

and y 2 5 g ( x ). These two equations can then be plotted separately. As was the case with

Eqs. (6.3) and (6.4), the roots of f ( x ) 5 0 correspond to the abscissa value at the inter-

section of the two curves. The function y 1 5 x and four different shapes for y 2 5 g ( x )

are plotted in Fig. 6.3.

For the irst case (Fig. 6.3 a ), the initial guess of x 0 is used to determine the corre-

sponding point on the y 2 curve [ x 0 , g ( x 0 )]. The point ( x 1 , x 1 ) is located by moving left

horizontally to the y 1 curve. These movements are equivalent to the i rst iteration in the

i xed-point method:

x 1 5 g ( x 0 )

Thus, in both the equation and in the plot, a starting value of x 0 is used to obtain an

estimate of x 1. The next iteration consists of moving to [ x 1 , g ( x 1 )] and then to ( x 2 , x 2 ).

This iteration is equivalent to the equation

x 2 5 g ( x 1 )

FIGURE 6.

Iteration cobwebs depicting convergence ( a and b ) and divergence ( c and d ) of simple fixed-point iteration. Graphs ( a ) and ( c ) are called monotone patterns, whereas ( b ) and ( d ) are called oscillating or spiral patterns. Note that convergence occurs when | g 9 ( x )| , 1. x 1 x y 1 = x y 2 = g ( x ) x 2 x 0 y

( a )

x y 1 = x y 2 = g ( x ) x 0 y

( b )

x y 1 = x y 2 = g ( x ) x 0 y

( c )

x y 1 = x y 2 = g ( x ) x 0 y

( d )

6.2 THE NEWTON-RAPHSON METHOD 151

FUNCTION Fixpt(x0, es, imax, iter, ea) xr 5 x iter 5 0 DO xrold 5 xr xr 5 g(xrold) iter 5 iter 1 1 IF xr? O THEN ea 5 ` xr^2 xrold xr

`? 100

END IF

IF ea , es OR iter $ imax EXIT END DO Fixpt 5 xr END Fixpt

FIGURE 6.

Pseudocode for fixed-point iteration. Note that other open methods can be cast in this general format. f ( x ) f ( xi ) f ( xi ) – 0 Slope = f ' ( xi ) (^0) x xi +1 xi xi – xi +

FIGURE 6.

Graphical depiction of the Newton-Raphson method. A tangent to the function of xi [that is, f 9 ( xi )] is extrapolated down to the x axis to provide an estimate of the root at xi 11.