The Newton-Raphson Method - Lecture Notes | AER E 161, Study notes of Aerospace Engineering

Material Type: Notes; Professor: Haugli; Class: NUM&GRAPHC&LAB TCNQ; Subject: AEROSPACE ENGINEERING; University: Iowa State University; Term: Spring 2005;

Typology: Study notes

Pre 2010

Uploaded on 09/02/2009

koofers-user-zpc-2
koofers-user-zpc-2 🇺🇸

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
D. Haugli, Lecturer Aer E 161 Aerospace Engineering
2/18/2005 The Newton-Raphson Method, Page 1 Iowa State University
The Newton-Raphson Method
The Newton-Raphson method is a simple, efficient method for estimating a root. The method
has the form,
()
()
n
n
nn
xf
xf
xx
=
+1. (1)
Here, n
x is a guess for the value of x at iteration n, which is used to compute a new guess, 1+n
x.
The difference between the two calculated as the absolute error, a
ε
,
nn
axx = +1
ε
. (2)
If the difference is larger than a specified convergence criterion, a
C, 1+n
x is used as the next
guess (replacing the original value of n
x), and Equation (1) is solved again. This procedure is
repeated until a
ε
becomes smaller than a
C.
Example 1. Derive an algorithm for the function,
()
0== qxxf p, where p is the
power and q is a constant.
Substitute
()
xf and
()
xf into Equation (1), yielding:
()
()
1
1
+
= p
n
p
n
nn
xp
qx
xx . (3)
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 pqx = (how was this equation
obtained?). Ask also for a starting guess, 0=n
x, and how many digits of precision are
required, a
C.
2. Find the root
a. Calculate 1+n
x from Equation (3).
b. Calculate a
ε
from Equation (2).
c. Check for convergence (to see if the root is found).
i. If aa C<
ε
, the root is found; otherwise
ii. Set 1+
=nn xx (which makes 1=n
x 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).
pf2

Partial preview of the text

Download The Newton-Raphson Method - Lecture Notes | AER E 161 and more Study notes Aerospace Engineering in PDF only on Docsity!

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

The Newton-Raphson Method

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

( n )

n n n f x

f x x x

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 ,

n n a =^ x^ − x

ε +^1. (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 = xp^ − q = 0 , where p is the

power and q is a constant.

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

1 −

n p

n p n n px

x q x x. (3)

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 < Ca , the root is found; otherwise

ii. Set x n^ = xn +^1 (which makes x n =^1 the new guess) and return to Step (a).

  1. 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 2 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. 2 2.296296 2.036587 0. 3 2.036587 2.000653 0. 4 2.000653 2.000000 0. 5 2.000000 2.000000 0.

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