The Newton-Raphson Method
The Newton-Raphson Method
(1)
f x ( j)
,
f ' x ( j)
( )
( )
(2)
( )
(3)
where
( )
f ' x ( j) =
df ( j )
x .
dx
Starting with an initial guess x (0 ) we compute x (1) from the equation (2). We use this equation
successively until x ( j ) converges to the solution x . The Newton-Raphson method has the
following geometric interpretation.
We write the formula (2) in the from
(4)
y = f (x ( j ) ) + f ' (x ( j ) )(x x ( j ) ).
(5)
( ) ( )
The equation (5) describes a straight line passing through the point x ( j ) , f x ( j ) with the
( )
slope f ' x . Thus, the straight line is the tangent to the curve y = f ( x ) . For x = x ( j +1) it
holds y = 0 . Hence, x ( j +1) is a point of intersection of the tangent with the 0x axis. The
geometric interpretation is shown in Fig. 1
( j)
f (x)
( ) ( )(
y = f x( j) + f x( j) x x( j)
( )
f (x( ) )
( j)
fx
j+1
x
x( j+2)
x( j+1) x( j)
Fig. 1
2
The Newton-Raphson computation process is continued until x ( j +1) x ( j ) 0 . Since
x ( j +1) x ( j ) =
then the equation
f (x ( j ) )
f ' (x ( j ) )
x ( j +1) x ( j ) = 0
implies
f (x ( j ) ) = 0 .
Thus, we assume
x ( j) x .
Example 1
Given the equation
f (x) = x 3 + x 4 = 0 .
To writhe the Newton-Raphson iteration formula adapted to this equation we find the
derivative
f ' ( x ) = 3x 2 + 1 .
Hence, we have
x
( j +1)
=x
( j)
(x ( ) ) + x( ) 4 .
3(x ( ) ) + 1
j 3
j 2
Assume that x ( j ) is near x and expand f ( x ) about x ( j ) in the Taylor series. Then we have
( )
( )
( )(
) (
f x = f x ( j) + f x ( j) x x ( j) + x , x ( j)
where
x , x ( j ) x x ( j )
(6)
(7)
( )
( )(
f x ( j ) + f x ( j ) x ( j +1) x ( j ) = 0
from the equation (6). As a result we obtain
( )(
) (
f x ( j ) x ( j +1) x = x , x ( j ) .
Let us assume that f ' (x ( ) ) 0 . Then for x ( j ) sufficiently close to x , there exists > 0 such
that
1
( )
f x( j )
(9)
x ( j +1) x x , x ( j ) x ( j ) x .
2
(10)
The relation (10) states that the rate of convergence of the Newton-Raphson method is
quadratic.
Convergence problem
According to the obove discussion the Newton-Raphson method works when the initial guess
is sufficiently near the solution and the function is well-behaved. If the initial guess is far off
from x or if f (x ) is not smooth the method may not converge (see Figs. 2 and 3).
f (x)
f (x)
x (1)
Fig. 2
x (0 )
Fig. 3
4
Example 2
Given the circuit shown in Fig. 4, where the diode is described by the equation
i = 10 15 e 38v 1 .
i
0.05 A
2 k
Fig. 4
We write the node equation
.
v ( j +1) = v ( j )
15 38v ( j )
0.0005 + 38 10 e
(2 )
0.05
= 100 and
0.0005
= 99.9737 .
= 100
100
0.0005 + 38 10 15 e 3800
38 10 15 e 3800
Since the slop of the tangent at v (1) is very steep v (2 ) is very close to v (1) . Consequently huge
number of iterations is necessary to find the solution v = 0.8299.
To improve the method modify the diode characteristic as follows
(
(
> 0.9 .
Thus, the diode described by the original function for v 0.9 and by the linear function
describing the tangent passing through the point 0.9 , 1015 e380.9 1 for v > 0.9 . This
modification considerably speed up the method, which leads to the solution in several
iterations.
))
This section describes the Newton-Raphson method for higher dimensions. Let us consider an
equation f ( x ) = 0 , where
5
f1 ( x )
f ( x )
2
,
f (x) =
#
f n ( x )
x1
x
2
x = ,
#
xn
0
0
0 = .
#
0
x = x1 x 2 " x n
( )( )
x ( j +1) = x ( j ) J 1 x ( j ) f x ( j )
(11)
( )
( )
( j)
J11 x
J x( j )
( j)
J x = 21
"
( j)
J n1 x
( )
( )
( )
( )
( j)
J12 x
J 22 x ( j )
"
J n2 x ( j )
( )
( )
( )
f1 ( j )
x x
J1n
1
f
J 2n x 2 x ( j )
= x
" 1
"
J nn x ( j ) f n ( j )
x
x1
( )
( )
x( j )
( j)
"
"
"
"
( )
( )
( )
( )
f1 ( j )
x
x2
f 2 ( j )
x
x2
"
f n ( j )
x
x2
( )
( )
( ) .
f1 ( j )
x
xn
f 2 ( j )
"
x
xn
"
"
f n ( j )
"
x
xn
"
(12)
( )
( )
( )
J x ( j ) y ( j +1) = f x ( j ) ,
where
(13)
y ( j+1) = x( j+1) x( j ) .
Using equation (13) we do not need to determine the inversion of the Jacoby matrix which is
a time consuming task. In a special case, where n = 2 , the Jacoby matrix becomes
( )
J x
where
( j)
J
= 11
J 21
(x ( ) )
(x ( ) )
j
( )
( )
J12 x ( j )
,
J 22 x ( j )
J 11 ( x1 , x 2 ) =
f1
,
x1
J 12 ( x1 , x 2 ) =
f1
,
x 2
J 21 ( x1 , x 2 ) =
f 2
,
x1
J 22 ( x1 , x2 ) =
f 2
,
x2
x( j )
x ( j ) = 1( j ) ,
x2
x ( j +1)
x ( j +1) = 1( j +1) ,
x2
( )
( )
f x( j)
f x( j) = 1 ( j) .
f2 x
( )
6
Example 3
Let us consider the set of two equations
0.1x13 + 2 x1 4 x 2 5 = 0 ,
x1 + 0.02 x 25 + 0.5 x 23 + x2 12 = 0 .
To find the solution using the Newton-Raphson method we compute the Jacoby matrix
0.3x12 + 2
4
J (x) =
( )
0.3 x ( j ) 2 + 2
1
0.1 x2( j )
1
( )
( )
y ( j +1)
1( j +1) =
4
( j) 2
+ 1.5 x2 + 1 y2
4
( )
,
5
3
( j)
( j)
+ 0.5 x2( j ) + x2( j ) 12
x1 + 0.02 x2
( )
( )
where
y1( j +1) x1( j +1) x1( j )
( j +1) = ( j +1) ( j ) .
y 2 x2 x2
4.4510
x (2 ) =
,
3.1395
4.2638
x (3) =
,
2.8082
4.2252
x (4 ) =
,
2.7479
4.2240
x (5 ) =
,
2.7461
4.2240
x (6 ) =
.
2.7461
Since x (6 ) x (5 ) = 0 , we assume x = x (5 ) .
Discrete models
To improve the Newton-Raphson method we introduce an associated linear resistive circuit at
each iteration, called the Newton-Raphson discrete equivalent circuit. To explain how this
circuit is formed we consider a nonlinear voltage controlled resistor described by the equation
i = f (v ) .
7
According to the idea of the Newton-Raphson method the nonlinear function f (v ) is replaced
at ( j + 1) -st iteration by the linear function
( )(
i = i( j) + f v( j) v v( j) ,
or
( ) )
(14)
( )
i = i( j) f v( j) v( j) + f v( j) v.
( ) )
( )
i ( j +1) = i ( j ) f v ( j ) v ( j ) + f v ( j ) v ( j +1) .
Let us denote
(15)
( )
i ( j ) = i ( j ) f v ( j ) v ( j )
and
(16)
( )
G( j ) = f v( j ) .
(17)
i ( j +1) = i ( j ) + G ( j )v ( j +1) .
(18)
The circuit described by the equation (18) called the discrete Newton-Raphson model of the
resistor is shown in Fig.5.
i ( j )
G( j)
i ( j +1)
v ( j +1)
Fig. 5
Replacing all nonlinear elements by the discrete models we obtain a linear circuit. Its solution
corresponds to the ( j + 1) iteration.
Example
Given the circuit shown in Fig. 6, where the diode is specified by the equation i = K e v 1 .
i
Is
Fig. 6
8
We create the discrete Newton-Raphson model of the diode. The equation which describes
this model is
i ( j +1) = i ( j ) + K e v
or
( j)
(v (
j +1)
v( j )
( j)
( j)
i ( j +1) = i ( j ) K e v v ( j ) + K e v v ( j +1) .
Substituting
G ( j ) = K e u
( j)
and
I ( j ) = i ( j ) G ( j )v ( j ) ,
v ( j +1 )
I ( j)
G ( j)
Fig. 7
We introduce this model into the circuit and from the circuit corresponding to
iteration (see Fig. 8).
( j + 1) -st
i ( j +1)
Is
v ( j +1)
G( j )
I ( j)
Fig. 8
To solve the circuit shown in Fig.8 we apply the node approach. The voltage v ( j +1) is the node
voltage. We write the node equation
v ( j +1)
+ G ( j )v ( j +1) + I ( j ) I s = 0
R
and solve it finding the ( j + 1) iterate
(19)
9
( j)
( j)
I s K e v 1 + K e v v ( j )
v ( j +1) =
.
1
v( j )
+Ke
R
Alternatively, we formulate the node equation of the circuit shown in Fig. 6
K e v 1 +
1
v I s = 0.
R
K e v
v ( j +1) = v ( j )
( j)
1
1 + v ( j ) I s
R
=
1
v( j )
Ke
+
R
j)
(
( j)
1
1
K e v v ( j ) + v ( j ) K e v 1 v ( j ) + I s
R
R
=
=
1
v( j )
Ke
+
R
(
(
j)
j)
I s K e v 1 + K e v v ( j )
=
.
1
v( j )
+Ke
R
(20)