Download - Root Finding 2
-
8/8/2019 Root Finding 2
1/21
Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
1
Root Finding 2
-
8/8/2019 Root Finding 2
2/21
Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
2
Open MethodsChapter 6
Open methods
are based on
formulas that
require only asingle starting
value of x or two
starting values
that do notnecessarily
bracket the root.
Figure 6.1
-
8/8/2019 Root Finding 2
3/21
Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
3
Simple Fixed-point Iteration
...2,1,i,given)(
)(0)(
1 oii xx
gx
xxgxf
Bracketing methods are convergent.
Fixed-point methods may sometime diverge,depending on the starting point (initial guess) and
how the function behaves.
Rearrange the function so that x is on the left side
of the equation:
-
8/8/2019 Root Finding 2
4/21
Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
4
Two curve graphical method
x=g(x) can be expressed
as a pair of equations:
y1=xy2=g(x) (component
equations)
Plot them separately.
Figure 6.2
-
8/8/2019 Root Finding 2
5/21
Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
5
Convergence
Fixed-point
iteration linearly
converges if
itit EgE ,1, )(
1)( xg
-
8/8/2019 Root Finding 2
6/21
Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
6
-
8/8/2019 Root Finding 2
7/21
Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
7
Newton-Raphson Method
Most widely used method.
Based on Taylor series expansion:
)(
)(
)(0
g,Rearrangin
0)f(xwhenxofvaluetheisrootThe
!2)()()()(
1
1
1i1i
3
2
1
i
iii
iiii
iiii
xf
xfxx
xx)(xf)f(x
xOx
xfxxfxfxf
Newton-Raphson formula
Solve for
-
8/8/2019 Root Finding 2
8/21Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
8
A convenient method for
functions whosederivatives can be
evaluated analytically. It
may not be convenient
for functions whosederivatives cannot be
evaluated analytically.
And, error is as quadratic
convergence.
Fig. 6.5
2
,1,)(2
)(it
r
rit E
xf
xfE
-
8/8/2019 Root Finding 2
9/21Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
9
Example 6.3: Use the Newton-Raphson method to estimate the root of
employing an initial guess ofx0 =0. (True root is 0.56714329...)
Ans:
xexfx)(
I xi t(%)
01234
00.5000000000.5663110030.5671431650.567143290
10011.80.1470.0000220
-
8/8/2019 Root Finding 2
10/21Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
10
Fig. 6.6
Cases with poor
convergence
-
8/8/2019 Root Finding 2
11/21Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
11
The Secant Method
A slight variation of Newtons method forfunctions whose derivatives are difficult toevaluate. For these cases the derivative can beapproximated by a backward finite divided
difference.
,3,2,1)()(
)(
)()()(
1
11
1
1
ixfxf
xxxfxx
xfxf
xxxf
ii
iiiii
ii
iii
-
8/8/2019 Root Finding 2
12/21Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
12
Requires two initial
estimates of x , e.g, xo,
x1. However, becausef(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
Newtons method.
Convergence is not
guaranteed for all xo,
f(x).
Fig. 6.7
-
8/8/2019 Root Finding 2
13/21Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
13
Fig. 6.8
Difference between the Secant and False-Position Methods
-
8/8/2019 Root Finding 2
14/21Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
14
Example 6.6: Use the Secant method to estimate the root of
start with initial estimates ofx-1 =0 and x0 =1.0. (True root is 0.56714329...)
Ans: 0.61270 0.56384 0.56717
t 8.0% 0.58% 0.0048%
xexfx)(
-
8/8/2019 Root Finding 2
15/21Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Figure 6_09.jpg
-
8/8/2019 Root Finding 2
16/21Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
16
Multiple Roots
None of the methods deal with multiple roots
efficiently, however, one way to deal with problems
is as follows:
)()()]([
)()()(
)(xfindThen
)(
)()(Set
21
1i
iii
iiii
i
ii
i
ii
xfxfxf
xfxfxx
xu
xux
xfxfxu This function has
roots at all the same
locations as the
original function
-
8/8/2019 Root Finding 2
17/21Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
17
Multiple root corresponds
to a point where a function istangent to the x axis.
Difficulties
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
Newtons and Secant
methods.
Fig. 6.13
-
8/8/2019 Root Finding 2
18/21Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
18
Systems of Nonlinear Equations
0),,,,(
0),,,,(0),,,,(
321
3212
3211
nn
n
n
xxxxf
xxxxfxxxxf
Two simultaneous nonlinear equations with two
unknowns, x, and y:
0),(
0),(
yxv
yxu Fix-point iteration
Newton-Raphson
-
8/8/2019 Root Finding 2
19/21Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
19
Taylor series expansion of a function of more than
one variable
)()(
)()(
111
111
iii
iii
ii
iii
iii
ii
yy
y
vxx
x
vvv
yyy
uxx
x
uuu
The root of the equation occurs at the value of x and y
where ui+1 and vi+1 equal to zero.
y
vy
x
vxvy
y
vx
x
v
y
uyx
uxuyy
uxx
u
ii
iiii
ii
i
ii
iiii
ii
i
11
11
-
8/8/2019 Root Finding 2
20/21Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
20
xv
yu
yv
xu
x
uv
x
vu
yy
x
v
y
u
y
v
x
u
y
uv
y
vu
xx
iiii
ii
ii
ii
iiii
ii
ii
ii
1
1
Determinant of
theJacobian of
the system.
A set of two simultaneous equations with two
unknowns that can be solved for.
-
8/8/2019 Root Finding 2
21/21
21
Example 6.12: Use the multiple-equation Newton-Raphson method to determine
roots of equations
Note that a correct pair of roots isx=2 andy=3. Initiate the computation with
guesses ofx=1.5 andy=3.5.
Ans: 2.03603 2.84388
0573),(
010),(
2
2
xyyyxv
xyxyxu