The Newton-Raphson Method - PDF by dnm98994

VIEWS: 92 PAGES: 2

• pg 1
```									                                   The Newton-Raphson Method

The Newton-Raphson method is a simple, efficient method for estimating a root. The method
has the form,

x n+1 = x n −
( )
f xn
( )
f ′ xn
.                              (1)

Here, x n is a guess for the value of x at iteration n, which is used to compute a new guess, x n+1 .
The difference between the two calculated as the absolute error, ε a ,

ε a = x n +1 − x n .                                   (2)

If the difference is larger than a specified convergence criterion, C a , x n+1 is used as the next
guess (replacing the original value of x n ), and Equation (1) is solved again. This procedure is
repeated until ε a becomes smaller than C a .

Example 1. Derive an algorithm for the function, f ( x ) = x p − q = 0 , where p is the
power and q is a constant.

Substitute f ( x ) and f ′( x ) into Equation (1), yielding:

x   n +1
=x   n
−
(x ) − q .
n p
(3)
p (x )
n p −1

The algorithm for solving Equation (3) and finding the root is as follows:

1. Ask the user to enter the values of q and p in x = p q (how was this equation
obtained?). Ask also for a starting guess, x n=0 , and how many digits of precision are
required, C a .

2. Find the root
a. Calculate x n+1 from Equation (3).
b. Calculate ε a from Equation (2).
c. Check for convergence (to see if the root is found).
i. If ε a < C a , the root is found; otherwise
ii. Set x n = x n+1 (which makes x n=1 the new guess) and return to Step (a).

3. Display the root and the number of times Step (2) was repeated (the number of
iterations).

D. Haugli, Lecturer                         Aer E 161                          Aerospace Engineering
2/18/2005                       The Newton-Raphson Method, Page 1               Iowa State University
Example 2. Apply the algorithm from Example 1 to find the cube root of 8. The actual
root is 2, but to demonstrate the method, make an initial guess of x n=0 = 3 .

Iteration, n Guess, x n     x n+1 (Eq. 3)   Difference, ε a (Eq. 2)
1         3.000000      2.296296              0.703704
2         2.296296      2.036587              0.259709
3         2.036587      2.000653              0.035934
4         2.000653      2.000000              0.000653
5         2.000000      2.000000              0.000000

In this example, the root, x = 2 , is found through the sixth decimal place after only five
iterations.

D. Haugli, Lecturer                      Aer E 161                            Aerospace Engineering
2/18/2005                    The Newton-Raphson Method, Page 2                 Iowa State University

```
To top