Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Newton-Raphson
Method
Assumptions
Interpretation
Examples
Convergence Analysis
Reading Assignment: Sections 6.2
EE3561_Unit 2 (c)AL-DHAIFALLAH1435 1
Root finding Problems
Many problems in Science and Engineering are
expressed as
EE3561_Unit 2 (c)AL-DHAIFALLAH1435 2
Solution Methods
Several ways to solve nonlinear equations are
possible.
Analytical Solutions
possible for special equations only
Graphical Solutions
Useful for providing initial guesses for other methods
Numerical Solutions
Open methods
Bracketing methods
EE3561_Unit 2 (c)AL-DHAIFALLAH1435 3
Bracketing Methods
In bracketing methods, the method starts
with an interval that contains the root and
a procedure is used to obtain a smaller
interval containing the root.
Examples of bracketing methods :
Bisection method
False position method
EE3561_Unit 2 (c)AL-DHAIFALLAH1435 4
Open Methods
In the open methods, the method starts
with one or more initial guess points. In
each iteration a new guess of the root is
obtained.
Open methods are usually more efficient
than bracketing methods
They may not converge to the root.
EE3561_Unit 2 (c)AL-DHAIFALLAH1435 5
Solution Methods
Many methods are available to solve nonlinear
equations
Bisection Method
Newton’s Method
These will be covered
Secant Method in EE3561
False position Method
Muller’s Method
Bairstow’s Method
Fixed point iterations
……….
EE3561_Unit 2 (c)AL-DHAIFALLAH1435 6
Newton-Raphson Method
(also known as Newton’s Method)
Given an initial guess of the root x0 ,
Newton-Raphson method uses information
about the function and its derivative at
that point to find a better guess of the
root.
Assumptions:
f (x) is continuous and first derivative is known
An initial guess x0 such that f ’(x0) ≠0 is given
EE3561_Unit 2 (c)AL-DHAIFALLAH1435 7
EE3561_Unit 2 (c)AL-DHAIFALLAH1435 8
EE3561_Unit 2 (c)AL-DHAIFALLAH1435 9
Newton’s Method
Given f ( x ), f ' ( x ), x0 F.m
function [ F ] F ( X )
F X ^3 3 * X ^ 2 1
Assumputio n f ' ( x0 ) 0
__________ __________ __ function [ FP ] FP( X )
FP.m
for i 0 : n FP 3 * X ^ 2 6 * X
f ( xi )
xi 1 xi % MATLAB PROGRAM
f ' ( xi ) X 4
end for i 1 : 5
X X F ( X ) / FP ( X )
end
EE3561_Unit 2 (c)AL-DHAIFALLAH1435 10
Example
Find a zero of the function f(x) x 3 2 x 2 x 3 , x0 4
f ' (x) 3 x 2 4 x 1
f ( x0 ) 33
Iteration 1 : x1 x0 4 3
f ' ( x0 ) 33
f ( x1 ) 9
Iteration 2 : x2 x1 3 2.4375
f ' ( x1 ) 16
f ( x2 ) 2.0369
Iteration 3 : x3 x2 2.4375 2.2130
f ' ( x2 ) 9.0742
EE3561_Unit 2 (c)AL-DHAIFALLAH1435 11
Example
Iteration xk f(xk) f’(xk) xk+1 |xk+1 –xk|
0 4 33 33 3 1
1 3 9 16 2.4375 0.5625
EE3561_Unit 2 (c)AL-DHAIFALLAH1435 12
Convergence analysis of the
Newton’s Method
The Taylor series expansion can be represented as
EE3561_Unit 2 (c)AL-DHAIFALLAH1435 13
Convergence analysis of the
Newton’s Method
Substituting the true value xr into Eq (B6.2.1) yields
EE3561_Unit 2 (c)AL-DHAIFALLAH1435 14
Convergence analysis of the
Newton’s Method
If we assume convergence, both xi and should
eventually approximated by the root xr, and
Eq(B6.2.5) can be rearranged to yield
EE3561_Unit 2 (c)AL-DHAIFALLAH1435 15
Convergence Analysis
Remarks
EE3561_Unit 2 (c)AL-DHAIFALLAH1435 16
Problems with Newton’s
Method
• If the initial guess of the root is far from
the root the method may not converge.
• Newton’s method converges linearly near
multiple zeros { f(r) = f ’(r) =0 }. In such a
case modified algorithms can be used to
regain the quadratic convergence.
EE3561_Unit 2 (c)AL-DHAIFALLAH1435 17
Multiple Roots
f ( x) x 3
f ( x) x 1
2
x0 x1
EE3561_Unit 2 (c)AL-DHAIFALLAH1435 19
Method
Flat Spot
x0
x1=x3=x5
x0=x2=x4
EE3561_Unit 2 (c)AL-DHAIFALLAH1435 21
Systems of nonlinear
Equations
Given : X 0 an initial guess of the root of F ( x ) 0
Newton ' s Iteration
X k 1 X k F ' ( X k ) F ( X k )
1
f1 f1
x
f1 ( x1 , x2 ,...) x2
1
f 2 f 2
F ( X ) f 2 ( x1 , x2 ,...) , F '(X )
x1 x2
EE3561_Unit 2 (c)AL-DHAIFALLAH1435 22
Example
Solve the following system of equations
y x 2 0.5 x 0
x 2 5 xy y 0
Initial guess x 1, y 0
y x 2 0.5 x 2x 1 1 1
F 2 , F ' , X0
x 5 xy y 2 x 5 y 5 x 1 0
EE3561_Unit 2 (c)AL-DHAIFALLAH1435 23
Solution Using Newton’s
Method
Iteration 1 :
y x 2 0.5 x 0.5 2x 1 1 1 1
F 2
, F '
x 5 xy y 1 2 x 5 y 5 x 1 2 6
1
1 1 1 0.5 1.25
X1 1 0.25
0 2 6
Iteration 2 :
0.0625 1.5 1
F , F '
- 0.25 1 .25 7 .25
1
1.25 1.5 1 0.0625 1.2332
X2 - 0.25 0.2126
0.25 1.25 7.25
EE3561_Unit 2 (c)AL-DHAIFALLAH1435 24
Example
Try this
Solve the following system of equations
y x2 1 x 0
x2 2 y 2 y 0
Initial guess x 0, y 0
y x 2 1 x 2 x 1 1 0
F 2 , F ' , X0
2
x 2 y y 2x 4 y 1 0
EE3561_Unit 2 (c)AL-DHAIFALLAH1435 25
Example
Solution
Iteration 0 1 2 3 4 5
_____________________________________________________________
0 1 0.6 0.5287 0.5257 0.5257
Xk 0 0 0. 2 0.1969 0.1980 0.1980
EE3561_Unit 2 (c)AL-DHAIFALLAH1435 26
Secant Method
Secant Method
Examples
Convergence Analysis
EE3561_Unit 2 (c)AL-DHAIFALLAH1435 27
Newton’s Method (Review)
Assumptions : f ( x), f ' ( x), x0 are available,
f ' ( x0 ) 0
Newton' s Method new estimate
f ( xi )
xi 1 xi
f ' ( xi )
Problem :
f ' ( xi ) is not available
or difficult to obtain analytically
EE3561_Unit 2 (c)AL-DHAIFALLAH1435 28
Secant Method
f ( x h) f ( x )
f ' ( x)
h
if xi and xi 1 are two initial points
f ( xi ) f ( xi 1 )
f ' ( xi )
( xi xi 1 )
f ( xi ) ( xi xi 1 )
xi 1 xi xi f ( xi )
f ( xi ) f ( xi 1 ) f ( xi ) f ( xi 1 )
( xi xi 1 )
EE3561_Unit 2 (c)AL-DHAIFALLAH1435 29
Secant Method
Assumptions :
Two initial points xi and xi 1
such that f ( xi ) f ( xi 1 )
New estimate (Secant Method) :
( xi xi 1 )
xi 1 xi f ( xi )
f ( xi ) f ( xi 1 )
EE3561_Unit 2 (c)AL-DHAIFALLAH1435 30
Secant Method
f ( x) x 2 x 0.5
2
x0 0
x1 1
( xi xi 1 )
xi 1 xi f ( xi )
f ( xi ) f ( xi 1 )
EE3561_Unit 2 (c)AL-DHAIFALLAH1435 31
Secant Method
x0 , x1 , i 1
( xi xi 1 )
xi 1 xi f ( xi ) ;
f ( xi ) f ( xi 1 )
i i 1
NO Yes
xi 1 xi Stop
EE3561_Unit 2 (c)AL-DHAIFALLAH1435 32
Modified Secant Method
In this modified Secant method only one initial guess is needed
f ( xi * xi ) f ( xi )
f ' ( xi )
* xi
f ( xi ) f ( xi ) * xi
xi 1 xi xi
f ( xi * xi ) f ( xi ) f ( xi * xi ) f ( xi )
* xi
Problem : How to select ?
If not selected properly, the method may diverge
EE3561_Unit 2 (c)AL-DHAIFALLAH1435 33
Example
50
40
f ( x) x 5 x 3 3 20
initial points 10
x0 1 and x1 1.1 0
-10
-30
-40
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
EE3561_Unit 2 (c)AL-DHAIFALLAH1435 34
Example
x(i) f( x(i) ) x(i+1) |x(i+1)-x(i)|
-1.0000 1.0000
EE3561_Unit 2 (c)AL-DHAIFALLAH1435 35
Convergence Analysis
The rate of convergence of the Secant method
is super linear
xi 1 r
C, 1.62
xi r
r : root xi : estimate of the root at the i th iteration
It is better than Bisection method but not as
good as Newton’s method
EE3561_Unit 2 (c)AL-DHAIFALLAH1435 36
Comparison of Root
finding methods
Advantages/disadvantages
Examples
EE3561_Unit 2 (c)AL-DHAIFALLAH1435 37
Summary
Bisection Reliable, Slow
One function evaluation per iteration
Needs an interval [a,b] containing the root, f(a) f(b)<0
No knowledge of derivative is needed
EE3561_Unit 2 (c)AL-DHAIFALLAH1435 38
Example
Use Secant method to find the root of
f ( x) x x 1
6
( xi xi 1 )
xi 1 xi f ( xi )
f ( xi ) f ( xi 1 )
EE3561_Unit 2 (c)AL-DHAIFALLAH1435 39
Solution
_______________________________
k xk f(xk)
________________________________
0 1.0000 -1.0000
1 1.5000 8.8906
2 1.0506 -0.7062
3 1.0836 -0.4645
4 1.1472 0.1321
5 1.1331 -0.0165
6 1.1347 -0.0005
EE3561_Unit 2 (c)AL-DHAIFALLAH1435 40
Example
Use Newton's Method to find a root of
f ( x) x 6 x 1
Use the initial points x0 1
Stop after three iterations or
if xk 1 xk 0.001 or
if f ( xk ) 0.0001
EE3561_Unit 2 (c)AL-DHAIFALLAH1435 41
Five iterations of the
solution
k xk f(xk) f’(xk) ERROR
______________________________________
0 1.0000 -1.0000 5.0000
1 1.2000 0.786 13.93 0.2
2 1.1436 0.0930 10.7348 0.0564
3 1.1349 0.0019 10.2969 0.009
4 1.1347 0.0000 10.2876 0.0002
5 1.1347 0.0000 10.2876 0.0000
EE3561_Unit 2 (c)AL-DHAIFALLAH1435 42
Example
Use Newton's Method to find a root of
x
f ( x) e x
Use the initial points x0 1
Stop after three iterations or
if xk 1 xk 0.001 or
if f ( xk ) 0.0001
EE3561_Unit 2 (c)AL-DHAIFALLAH1435 43
Example
Use Newton' s Method to find a root of
f ( x ) e x x, f ' ( x ) e x 1
f ( xk )
xk f ( xk ) f ' ( xk )
f ' ( xk )
1.0000 - 0.6321 - 1.3679 0.4621
0.5379 0.0461 - 1.5840 - 0.0291
0.5670 0.0002 - 1.5672 - 0.0002
0.5671 0.0000 - 1.5671 - 0.0000
EE3561_Unit 2 (c)AL-DHAIFALLAH1435 44
Example
Estimates of the root of x-cos(x)=0
EE3561_Unit 2 (c)AL-DHAIFALLAH1435 45
Example
In estimating the root of x-cos(x)=0
To get more than 13 correct digits
4 iterations of Newton (x0=0.6)
( x0=0.6, x1=0.8)
EE3561_Unit 2 (c)AL-DHAIFALLAH1435 46