Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Open Methods
Chapter 6
2
Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Simple Fixed-point Iteration
Rearrange the function so that x is on the left-hand side of the equation:
f ( x) 0 g ( x) x EXAMPLE:
xk g ( xk 1 ) xo is given, k 1, 2, ... f ( x) x 2 x 2 0
Rewrite it as : x g ( x)
Bracketing methods are convergent if you
x x2 2
have a bracket to start with
or
Fixed-point methods may sometimes
converge, depending on the starting point x x2
(initial guess) and how the function behaves. or
2
x 1
x
3
Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Newton-Raphson Method
Most widely used formula
for locating roots.
f ( xi )
xi 1 xi
f ( xi )
Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
f ( xi )
xi 1 xi
f ( xi )
Newton-Raphson is a convenient
method if f(x) (the derivative) can be
evaluated analytically
Rate of convergence is quadratic, i.e.
the error is roughly proportional to the
square of the previous error
Ei+1=O(Ei2)
(proof is given in the Text)
But:
it does not always converge
0 0.5
1 51.65
f(x) x10 1 2 46.485
3 41.8365
N - R Formula : 4 37.65285
5 33.887565
xi10 1 .
xi 1 xi use xo 0.5
10 xi9 .
38 1.083
6
Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
The Secant Method
If derivative f(x) can not be computed analytically then we need to compute
it numerically (backward finite divided difference method)
f ( xi )
Newton - Raphson : x i 1 x i
f ' ( xi )
df f ( x i ) f ( x i 1 )
f ( x i )
dx x i x i 1
x i x i 1
Secant : x i 1 x i f ( x i ) i 1,2,3,
f ( x i ) f ( x i 1 )
Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
The Secant Method
xi xi 1
xi 1 xi f ( xi )
f ( xi ) f ( xi 1 )
Requires two initial estimates
x o , x1 .
However, it is not a
bracketing method.
The Secant Method has the
same properties as Newtons
method.
Convergence is not guaranteed
for all xo, f(x).
8
Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Modified Secant Method
f ( xi )
Newton - Raphson : x i 1 x i
f ' ( xi )
x i x i 1
Original Secant : xi 1 xi f ( xi )
f ( x i ) f ( x i 1 )
Use a small perturbation fraction to compute
f ( x i x i ) f ( x i )
f ' ( xi ) in the original N - R formula :
xi
x i
Modified Secant : x i 1 x i f ( x i )
f ( x i x i ) f ( x i )
9
Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Systems
Systemsof
of Nonlinear Equations
Nonlinear Equations
Locate the roots of a set of simultaneous nonlinear equations:
f1 ( x1 , x2 , x3 , , xn ) 0
f 2 ( x1 , x2 , x3 , , xn ) 0
f n ( x1 , x2 , x3 , , xn ) 0
Example:
x12 x1 x2 10 f1 ( x1 , x2 ) x12 x1 x2 10 0
x2 3x1 x2 2 57 f 2 ( x1 , x2 ) x2 3 x1 x2 2 57 0
10
Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
First-order Taylor series expansion of a function with more than one variable:
f f
f1(i 1) f1( i ) 1(i ) ( x1( i 1) x1( i ) ) 1( i ) ( x2( i 1) x2( i ) ) 0
x1 x2
f 2(i ) f 2( i )
f 2( i 1) f 2( i ) ( x1(i 1) x1(i ) ) ( x2( i 1) x2( i ) ) 0
x1 x2
The root of the equation occurs at the value of x1 and x2 where f1(i+1) =0 and f2(i+1) =0
Rearrange to solve for x1(i+1) and x2(i+1)
f1(i ) f1(i ) f1(i ) f1(i )
x1(i 1) x2(i 1) f1(i ) x1(i ) x2( i )
x1 x2 x1 x2
f 2(i ) f 2(i ) f 2( i ) f 2( i )
x1(i 1) x2( i 1) f 2(i ) x1( i ) x2( i )
x1 x2 x1 x2
Since x1(i), x2(i), f1(i), and f2(i) are all known at the ith iteration, this represents a set of two
linear equations with two unknowns, x1(i+1) and x2(i+1)
You may use several techniques to solve these equations
Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
General Representation for the solution of
Nonlinear Systems of Equations
f1 f1 f1
f1 ( x1 , x2 , x3 , , xn ) 0 x Jacobian Matrix
x2 xn
1
f 2 ( x1 , x2 , x3 , , xn ) 0 f 2 f 2
f 2
Solve this set of linear
J x1 x2 xn
equations at each iteration:
f f n f n
n
f n ( x1 , x2 , x3 , , xn ) 0 x1 x2 xn [ J i ]{ X i 1} {Fi } [ J i ]{ X i }
f1 f1 f1 f1 f1 f1
x x1 f1 ( x1 , x2 , x3 , , xn ) x1
x2 xn
x x2 xn
1 1
f 2 f 2 f 2 f 2 f 2 f 2
x2 f ( x , x , x , , xn ) x2
x1 x2 xn 2 1 2 3 x1 x2 xn
f f n f n f f n f n
n xn f n ( x1 , x2 , x3 , , xn ) n xn
x1 x2 xn i
i 1 i x1 x2 xn i
i