Newton-Raphson Method - Numerical Analysis - Solved Exam, Exams of Mathematical Methods for Numerical Analysis and Optimization

Main Points are: Newton-Raphson Method, Nonlinear Equation, Bracketing Methods, Category of Open Methods, Slope of Function, Improved Estimate of Root, Initial Guess of Root, Absolute Relative Approximate Error

Typology: Exams

2012/2013

Uploaded on 04/16/2013

maalolan
maalolan 🇮🇳

4.5

(8)

121 documents

1 / 10

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
03.04.1
Chapter 03.04
Newton-Raphson Method of Solving a Nonlinear
Equation
After reading this chapter, you should be able to:
1. derive the Newton-Raphson method formula,
2. develop the algorithm of the Newton-Raphson method,
3. use the Newton-Raphson method to solve a nonlinear equation, and
4. discuss the drawbacks of the Newton-Raphson method.
Introduction
Methods such as the bisection method and the false position method of finding roots of a
nonlinear equation 0)( xf require bracketing of the root by two guesses. Such methods
are called bracketing methods. These methods are always convergent since they are based on
reducing the interval between the two guesses so as to zero in on the root of the equation.
In the Newton-Raphson method, the root is not bracketed. In fact, only one initial
guess of the root is needed to get the iterative process started to find the root of an equation.
The method hence falls in the category of open methods. Convergence in open methods is
not guaranteed but if the method does converge, it does so much faster than the bracketing
methods.
Derivation
The Newton-Raphson method is based on the principle that if the initial guess of the root of
0)( xf is at i
x, then if one draws the tangent to the curve at )(i
xf , the point 1i
x where
the tangent crosses the
x
-axis is an improved estimate of the root (Figure 1).
Using the definition of the slope of a function, at i
xx

θ = xf itan

1
0
ii
i
xx
xf
= ,
which gives


i
i
ii xf
xf
= xx
1 (1)
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Newton-Raphson Method - Numerical Analysis - Solved Exam and more Exams Mathematical Methods for Numerical Analysis and Optimization in PDF only on Docsity!

Chapter 03.

Newton-Raphson Method of Solving a Nonlinear

Equation

After reading this chapter, you should be able to:

  1. derive the Newton-Raphson method formula,
  2. develop the algorithm of the Newton-Raphson method,
  3. use the Newton-Raphson method to solve a nonlinear equation, and
  4. discuss the drawbacks of the Newton-Raphson method.

Introduction

Methods such as the bisection method and the false position method of finding roots of a nonlinear equation f ( x ) 0 require bracketing of the root by two guesses. Such methods

are called bracketing methods. These methods are always convergent since they are based on reducing the interval between the two guesses so as to zero in on the root of the equation. In the Newton-Raphson method, the root is not bracketed. In fact, only one initial guess of the root is needed to get the iterative process started to find the root of an equation. The method hence falls in the category of open methods. Convergence in open methods is not guaranteed but if the method does converge, it does so much faster than the bracketing methods.

Derivation

The Newton-Raphson method is based on the principle that if the initial guess of the root of f ( x ) 0 is at xi , then if one draws the tangent to the curve at f ( xi ), the point xi (^)  1 where

the tangent crosses the x -axis is an improved estimate of the root (Figure 1). Using the definition of the slope of a function, at xxi

f   xi  = tan θ

1

i i

i x x

f x = ,

which gives

 i 

i i i f x

f x x = x

03.04.2 Chapter 03.

Equation (1) is called the Newton-Raphson formula for solving nonlinear equations of the

form f   x  0. So starting with an initial guess, xi , one can find the next guess, x i  1 , by

using Equation (1). One can repeat this process until one finds the root within a desirable tolerance.

Algorithm

The steps of the Newton-Raphson method to find the root of an equation f   x  0 are

1. Evaluate f ^ x symbolically

  1. Use an initial guess of the root, x (^) i , to estimate the new value of the root, xi (^)  1 , as

 i 

i i i f x

f x x = x

  1. Find the absolute relative approximate error  a as

1

^1  

i

i i a (^) x

x x =

  1. Compare the absolute relative approximate error with the pre-specified relative error tolerance,  s. If  a >  s , then go to Step 2, else stop the algorithm. Also, check if the number of iterations has exceeded the maximum number of iterations allowed. If so, one needs to terminate the algorithm and notify the user.

Figure 1 Geometrical illustration of the Newton-Raphson method.

f ( x )

f ( xi )

f ( xi+ 1 )

xi+ 2 xi+ 1 xi

x

θ

[ xi, f ( xi )]

03.04.4 Chapter 03.

The absolute relative approximate error  a at the end of Iteration 1 is

1

 ^1 ^0 

x

x x a

The number of significant digits at least correct is 0, as you need an absolute relative approximate error of 5% or less for at least one significant digit to be correct in your result.

Iteration 2 The estimate of the root is

1 (^2 1) f x

f x x x

(^324)

...

3

7

  1. 90973 10

 

 0. 06242   4. 4646  10 ^5 

The absolute relative approximate error  a at the end of Iteration 2 is

2

 ^2 ^1 

x

x x a

The maximum value of m for which  a  0. 5  102  m is 2.844. Hence, the number of

significant digits at least correct in the answer is 2.

Iteration 3 The estimate of the root is

2 (^3 2) f x

f x x x

(^324)

...

3

11

  1. 91171 10

 

 0. 06238   4. 9822  10 ^9 

The absolute relative approximate error  a at the end of Iteration 3 is

Newton-Raphson Method 03.04.

a

 0 The number of significant digits at least correct is 4, as only 4 significant digits are carried through in all the calculations.

Drawbacks of the Newton-Raphson Method

  1. Divergence at inflection points If the selection of the initial guess or an iterated value of the root turns out to be close to the

inflection point (see the definition in the appendix of this chapter) of the function f  x in the

equation f   x  0 , Newton-Raphson method may start diverging away from the root. It may

then start converging back to the root. For example, to find the root of the equation

f^   x^  ^ x  1  3  0. 512  0

the Newton-Raphson method reduces to

2

(^33) 1 3 ( 1 )

i

i i i x

x x = x

Starting with an initial guess of x 0 (^)  5. 0 , Table 1 shows the iterated values of the root of the

equation. As you can observe, the root starts to diverge at Iteration 6 because the previous

estimate of 0.92589 is close to the inflection point of x  1 (the value of f '   x is zero at the

inflection point). Eventually, after 12 more iterations the root converges to the exact value of x  0. 2. Table 1 Divergence near inflection point. Iteration Number i

x

0 5. 1 3. 2 2. 3 2. 4 1. 5 0. 6 –30. 7 –19. 8 –12. 9 –8. 10 –5. 11 –3. 12 –1. 13 –0. 14 –0. 15 0. 16 0. 17 0. 18 0.

Newton-Raphson Method 03.04.

-1.00E-

-7.50E-

-5.00E-

-2.50E-

0.00E+

2.50E-

5.00E-

7.50E-

1.00E-

-0.03 -0.02 -0.01 0 0.01 0.02 0.03 0.

x

f(x)

Figure 4 Pitfall of division by zero or a near zero number.

  1. Oscillations near local maximum and minimum Results obtained from the Newton-Raphson method may oscillate about the local maximum or minimum without converging on a root but converging on the local maximum or minimum. Eventually, it may lead to division by a number close to zero and may diverge. For example, for

f^   x^  x^2  2  0

the equation has no real roots (Figure 5 and Table 3).

0

1

2

3

4

5

6

-2 -1 0 1 2 3

f(x)

x

3

4

2 1

-1.75 -0.3040 0.5 3.

Figure 5 Oscillations around local minima for f  x   x^2  2.

03.04.8 Chapter 03.

Table 3 Oscillations near local maxima and minima in Newton-Raphson method. Iteration Number i

x f ( xi )  a %

0 1 2 3 4 5 6 7 8 9 –1.

–1. –0.

–0.

  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. For example for solving the equation sin x  0 if you choose

x 0  2. 4   7. 539822  as an initial guess, it converges to the root of x  0 as shown in

Table 4 and Figure 6. However, one may have chosen this as an initial guess to converge to

x  2   6. 2831853.

Table 4 Root jumping in Newton-Raphson method. Iteration Number i

x f ( xi )  a %

0 1 2 3 4 5

  1. 376  10 ^4  1. 95861  10 ^13
  1. 375  10 ^5  1. 95861  10 ^13
  1. 54  104
  2. 28  1010

03.04.10 Chapter 03.

0  f  xi   f  xi  xi  1  xi 

which gives

 i 

i i i f'x

f x x (^)  1  x

This is the same Newton-Raphson method formula series as derived previously using the geometric method.

NONLINEAR EQUATIONS

Topic Newton-Raphson Method of Solving Nonlinear Equations