che 555 open methods
TRANSCRIPT
by Lale Yurttas, Texas A&M University
Chapter 2 1
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 2ROOTS OF EQUATION:
OPEN METHODS
by Lale Yurttas, Texas A&M University
Chapter 2 2
Open Methods
• Open methods are based on formulas that require only a single starting value of x or two starting values that do not necessarily bracket the root.
Figure 6.1
SIMPLE FIXED-POINT ITERATION
• Sometime “diverge”• Depending on the stating point (initial
guess) and how the function behaves.
by Lale Yurttas, Texas A&M University
Chapter 2 3
Procedures
by Lale Yurttas, Texas A&M University
Chapter 2 4
xxgxf )(0)(1. Rearrange the function so that x is on
the left side of the equation:2. Guess the initial at the root xi to
compute xi+1 (new). Thus xi+1 = g (xi).3. Compare es with ea . If ea< es, stop.
Otherwise repeat the process.%100
1
1
i
iia x
xx
by Lale Yurttas, Texas A&M University
Chapter 2 5
xxg
orxxg
orxxg
xxxxf
21)(
2)(
2)(
02)(2
2
Example:
Convergence• Fixed-point iteration converges if
• When the method converges, the error is roughly proportional to or less than the error of the previous step, therefore it is called “linearly convergent.”
by Lale Yurttas, Texas A&M University
Chapter 2 6
x)f(x) line theof (slope 1)( xg
by Lale Yurttas, Texas A&M University
Chapter 2 7
Procedures• x = g(x) can be expressed
as a pair of equations:y1 = xy2 = g(x) (component equations)
• Plot them separately.
Figure 6.2
Example 1a) Use simple fixed-point iteration to
find the root of f(x) = e-x – x.b) Separate the equation e-x – x = 0
into two parts and determine its root graphically.
by Lale Yurttas, Texas A&M University
Chapter 2 8
by Lale Yurttas, Texas A&M University
Chapter 2 9
NEWTON-RAPHSON METHOD
• Most widely used method.• Based on Taylor series expansion:
)()(
)(0g,Rearrangin
0)f(x when xof value theisroot The!2
)()()()(
1
1
1i1i
32
1
i
iii
iiii
iiii
xfxfxx
xx)(xf)f(x
xOxxfxxfxfxf
Newton-Raphson formula
Solve for
by Lale Yurttas, Texas A&M University
Chapter 2 10
• A convenient method for functions whose derivatives can be evaluated analytically.
• It may not be convenient for functions whose derivatives cannot be evaluated analytically.
Fig. 6.5
Pitfalls• Slow convergence → due to nature of
function• No general convergence criterion →
depends on nature of function & accuracy of initial guess.
by Lale Yurttas, Texas A&M University
Chapter 2 11
by Lale Yurttas, Texas A&M University
Chapter 2 12
Fig. 6.6
Solution shoots off horizontally & never hits the x-axis
x0 progressively diverge from the root
Near-zero slope is reached, solution sent far from the area of interestInitial guess close to one root can jump to a location several roots away → tendency to move away from area of interest
Example 2a) Use the Newton-Raphson method to
estimate the root of f(x) = e-x – x, employing an initial guess of x0 = 0.
b) Determine the positive root of f(x) = x10 – 1 using the Newton Raphson method and an initial guess of x0 = 0.5
by Lale Yurttas, Texas A&M University
Chapter 2 13
by Lale Yurttas, Texas A&M University
Chapter 2 14
THE SECANT METHOD• A slight variation of Newton’s method for
functions whose derivatives are difficult to evaluate. For these cases the derivative can be approximated by a backward finite divided difference.
,3,2,1)()(
)(1
11
i
xfxfxxxfxx
ii
iiiii
ii
iii xx
xfxfxf
1
1 )()()('
Formula for the Secant method:
by Lale Yurttas, Texas A&M University
Chapter 2 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, f(x).
Fig. 6.7
Difference between Secant & False-position method
by Lale Yurttas, Texas A&M University
Chapter 2 16
1st iteration – both use the same points
2nd iteration – points used
differ. Secant methods diverge.
• Alternative approach → involves a fractional perturbation (small change) of the independent variable to estimate f’(x)
by Lale Yurttas, Texas A&M University
Chapter 2 17
THE MODIFIED SECANT METHOD
,3,2,1)()(
)(1
i
xfxxfxfxxx
iii
iiii
i
iiii x
xfxxfxf )()()('
Formula for the Modified Secant method:
δ = small perturbation fraction• If δ too small – method swamped by round
off error.• If too big – technique become inefficient
and divergent.• If chosen correctly – nice alternative for
cases where evaluating the derivative is difficult & developing 2 initial guesses is inconvenient.
by Lale Yurttas, Texas A&M University
Chapter 2 18
Example 3a) Use the Secant method to estimate the root
of f(x) = e-x – x. Start with initial estimates of x-1 = 0 and x0 = 1.0.
b) Use the False-position and Secant methods to estimate the root of f(x) = ln x. Start the computation with values of xl = xi-1 = 0.5 and xu = xi = 5.0.
c) Use the modified secant method to estimate the root of f(x) = e-x – x. Use a value of 0.01 for δxi and start with x0 = 1.0.
by Lale Yurttas, Texas A&M University
Chapter 2 19
by Lale Yurttas, Texas A&M University
Chapter 2 20
MULTIPLE ROOTS• Corresponds to a point where a function is tangent to
x-axis.
)()())((x
:methodsecant of version Modified
)(")()]('[)(')(x
:methodRaphson Newton of Modified
)()()(Set
1
11i
21i
ii
iiii
iii
iii
i
ii
xuxuxxxux
xfxfxfxfxfx
xfxfxu
This function has roots at all the same locations as the original function
by Lale Yurttas, Texas A&M University
Chapter 2 21
Fig. 6.10
Difficulties
by Lale Yurttas, Texas A&M University
Chapter 2 22
– Function does not change sign at the multiple root, therefore, cannot use bracketing methods.
– Both f(x) and f′(x)=0, division by zero with Newton’s and Secant methods.
by Lale Yurttas, Texas A&M University
Chapter 2 23
SYSTEMS OF NON-LINEAR EQUATIONS
0),,,,(
0),,,,(0),,,,(
321
3212
3211
nn
n
n
xxxxf
xxxxfxxxxf
by Lale Yurttas, Texas A&M University
Chapter 2 24
• Taylor series expansion of a function of more than one variable
)()(
)()(
11111
11111
iii
iii
ii
iii
iii
ii
yyyvxx
xvvv
yyyuxx
xuuu
by Lale Yurttas, Texas A&M University
Chapter 2 25
yvy
xvxvy
yvx
xv
yuy
xuxuy
yux
xu
ii
iiii
ii
i
ii
iiii
ii
i
11
11
•The root of the equation occurs at the value of x and y where ui+1 and vi+1 equal to zero.
by Lale Yurttas, Texas A&M University
Chapter 2 26
xv
yu
yv
xu
xuv
xvu
yy
xv
yu
yv
xu
yuv
yvu
xx
iiii
ii
ii
ii
iiii
ii
ii
ii
1
1
Determinant of the Jacobian of the system.
•A set of two linear equations with two unknowns that can be solved for.