Newton Raphson Method-Numerical Analysis-Lecture Handouts, Lecture notes of Mathematical Methods for Numerical Analysis and Optimization

This course contains solution of non linear equations and linear system of equations, approximation of eigen values, interpolation and polynomial approximation, numerical differentiation, integration, numerical solution of ordinary differential equations. This lecture includes: Newton, Raphson, Method, Root, Formula, Taylor, Series, Expansion, Geometrical, Interpretation, Equation

Typology: Lecture notes

2011/2012

Uploaded on 08/05/2012

saruy
saruy 🇮🇳

4.5

(120)

130 documents

1 / 10

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Numerical Analysis –MTH603 VU
© Copyright Virtual University of Pakistan 1
Newton -Raphson Method
This method is one of the most powerful method and well known methods, used for
finding a root of f(x)=0 the formula many be derived in many ways the simplest way to
derive this formula is by using the first two terms in Taylor’s series expansion of the
form,
11
1
1
1
() ()( )'()
()0 ,
()( )'()0
,,
() 0,1, 2...
'( )
nnnnn
n
nnnn
n
nn
n
f
xfxxxfx
setting f x gives
fx x x f x
thus on simplification we get
fx
xx forn
fx
++
+
+
+
=+
=
+− =
=− =
Geometrical interpretation
Let the curve f(x)=0 meet the x-axis at x=
α
meet the x axis at x=
α
.it means that
α
is
the original root of the f(x)=0.Let 0
x
be the point near the root
α
of the equation f(x)=0
then the equation of the tangent 00 0
[,()]Px fx
is
000
() '()( )yfx fxxx−=
This cuts the x-axis at 0
10
0
()
'( )
f
x
xx
f
x
=−
This is the first approximation to the root
α
.if 11 1
[,()]Px f x
is the point corresponding
to 1
x
on the curve then the tangent at 1
P
is
111
() '()( )yfx fxxx−=
This cuts the x-axis at 1
21
1
()
'( )
f
x
xx
f
x
=−
This is the second approximation to the root
α
.Repeating this process we will get the
root
α
with better approximations quite rapidly.
Note:
1. When '( )
f
x very large .i.e. is when the slope is large, then h will be small (as
assumed) and hence, the root can be calculated in even less time.
2. If we choose the initial approximation 0
x
close to the root then we get the root of
the equation very quickly.
3. The process will evidently fail if '( ) 0fx
=
is in the neighborhood of the root. In
such cases the regula falsi method should be used.
docsity.com
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Newton Raphson Method-Numerical Analysis-Lecture Handouts and more Lecture notes Mathematical Methods for Numerical Analysis and Optimization in PDF only on Docsity!

Newton -Raphson Method

This method is one of the most powerful method and well known methods, used for finding a root of f(x)=0 the formula many be derived in many ways the simplest way to derive this formula is by using the first two terms in Taylor’s series expansion of the form, 1 1 1 1

1

n n n n n n n n n n

n n n n

f x f x x x f x setting f x gives f x x x f x thus on simplification we get x x f^ x for n f x

Geometrical interpretation

Let the curve f(x)=0 meet the x-axis at x= α meet the x axis at x= α .it means that α is

the original root of the f(x)=0.Let x 0 be the point near the root α of the equation f(x)=

then the equation of the tangent P x 0 [ 0 (^) , f ( x 0 )] is yf ( x 0 (^) ) = f '( x 0 (^) )( xx 0 ) This cuts the x-axis at 1 0 0 0

x x f^ x f x

This is the first approximation to the root α .if P x 1 [ 1 (^) , f ( x 1 )] is the point corresponding to x 1 on the curve then the tangent at P 1 is yf ( x 1 (^) ) = f '( x 1 (^) )( xx 1 )

This cuts the x-axis at 2 1 1 1

x x f^ x f x

This is the second approximation to the root α .Repeating this process we will get the

root α with better approximations quite rapidly.

Note:

  1. When f '( ) x very large .i.e. is when the slope is large, then h will be small (as assumed) and hence, the root can be calculated in even less time.
  2. If we choose the initial approximation x 0 close to the root then we get the root of the equation very quickly.
  3. The process will evidently fail if f '( ) x = 0 is in the neighborhood of the root. In such cases the regula falsi method should be used.
  1. If the initial approximation to the root is not given, choose two say, a and b, such that f(a) and f(b) are of opposite signs. If |f(a)|<|f(b)| then take a as the initial approximation.
  2. Newton’s raphson method is also referred to as the method of tangents.

Example

Find a real root of the equation x 3 – x – 1 = 0 using Newton - Raphson method, correct to four decimal places.

Solution 3 3 3 2 2 2 f(x)=x - x - 1 f(1)=1 - 1 - 1 =-1< f(2)=2 - 2 - 1 = 8 1 2 '( ) 3 1 "( ) 6 '(1) 31 1 '( ) 3 2 1

"(1) 6 "(2) 6(2) 12 (

so the root lies between and here f x x and f x x f f x here f f here f

  1. and f "(2) have the same signs so x 0 = 2 The second approximation is computed using Newton-Raphson method as

Draw backs of N-R Method

Divergence at inflection points:

If the selection of a guess or an iterated value turns out to be close to the inflection point of f ( x ) , [where f”( x ) = 0 ], the roots start to diverge away from the root.

1

( ) '( ) i i^ i i

x x f^ x

  • (^) f x = −

Division of zero or near zero:

If an iteration, we come across the division by zero or a near-zero number, then we get a large magnitude for the next value, xi+1.

Root jumping:

In some case where the function f (x) is oscillating and has a number of roots, one may choose an initial guess close to a root. However, the guesses may jump and converge to some other root.

Oscillations near local maximum and minimum:

Results obtained from N-R method may oscillate about the local max or min without converging on a root but converging on the local max or min. Eventually, it may lead to division to a number close to zero and may diverge.

Convergence of N-R Method Let us compare the N-R formula

1

n n^ n n

x x f^ x

  • (^) f x

with the general iteration formula

xn + 1 = φ( xn ),

( ) (^ )

n n^ n n

x x f^ x f x

x x f^ x f x

The iteration method converges if

φ′( )^ x <1.

Therefore, N-R formula converges, provided f ( ) x f ′′( )^ x < f ′( ) x^2 in the interval considered. Newton-Raphson formula therefore converges, provided the initial approximation x 0 is chosen sufficiently close to the root and are continuous and bounded in any small interval containing the root.

Definition

Let xn = α + ε n , xn + 1 = α +ε n + 1

where α is a root of f (x) = 0.

If we can prove that ε n + 1 = K ε np ,

where K is a constant and ε n is the error involved at the n - th step, while finding the

root by an iterative method, then the rate of convergence of the method is p. The N-R method converges quadratically

1 1

n n , n n

x x

+ α^ ε+

where α is a root of f ( x ) = 0 and ε n is the error involved at the n -th step, while

finding the root by N-R formula

1

n n^ n n

f f

α ε α ε α^ ε

1

n n^ n^ n^ n^ n n

f f f f n f

ε ε α^ ε^ ε^ α^ ε^ α^ ε

Using Taylor’s expansion, we get

2 1

n n n n n n

x x x^ N^ x N

  • x x

= − − = ^ + 

Example Evaluate 12 , by Newton’s formula. Solution Since 9 = 3, 16 =4, We take x 0 (^) = (3 + 4) / 2 =3.5.

1 0 0

2

3

x x N x

x

x

= ^ + ^ = ^ + =

= ^ + =

= ^ + =

Hence

12 =3.4641. Here in this solution we use the iterative scheme developed in the above example and simply replace the previous value in the next iteration and finally come to the result.

Example Find the first three iteration of the equation f ( ) x = x − 0.8 − 0.2sin x in the interval

[0, π / 2].

Solution

(0) 0 0.8 0.2sin(0) 0 0.8 0.2(0) 0. (1.57) 1.57 0.8 0.2sin(1.75)

'( ) 1 0.2 cos '(0) 1 0.2 cos(0) (0) |

f f

f x x f here f is

1 0 0 0

2 1 1 1

(1) 1 0.8 0.2sin(1)

'( ) 1 0.2 cos '(1) 1 0.2 cos(1) ( ) 1 0. '( ) 0.

greater then x x x f^ x f x now f

f x x f x x f^ x f x

3 2 2 2

(0.9645) 0.9645 0.8 0.2sin(0.9645)

'( ) 1 0.2 cos '(0.9645) 1 0.2 cos(0.9645) ( ) (^) 0.9645 0. '( )

f

f x x f x x f^ x f x

NOTE: In the above question the function is a transcendental function and we have to perform all the calculation in the radians mode and the value of pi should be taken as 3.

Example

Consider the equation f ( ) x = 4 x cos x − ( x − 2)^2 find the root of the equation in the range 0 ≤ x ≤ 8

Solution

( ) ln( 1) cos( 1) (1.2) ln(1.2 1) cos(1.2 1)

(2) ln(2 1) cos(2 1)

( ) ln( 1) cos( 1) '( ) 1 sin( 1) 1 '(1.2) 1

f x x x f

f

now f x x x

f x x x f

1 0 0 0

sin(1.2 1) 1 5 0.1986 4. ( ) (^) 1.2 0.6293 1.2 0.1311 1. '( ) 4. (1.311) ln(1.3311 1) cos(1.3311 1)

'(1.3311) 1 sin(1. 1.3311 1

x x f^ x f x f

f

2 1 1 1

(1.3903) ln(1.3903 1) cos(1.3903 1)

'(1.3903) 1 sin(1. 1.3903 1

x x f^ x f x f

f

3 2 2 2

x x f^ x f x