7/17/2003 http://numericalmethods.eng.usf.edu. 1. Roots of a Nonlinear Equation
. Topic: Newton-Raphson Method. Major: General Engineering ...
Roots of a Nonlinear Equation
Topic: Newton-Raphson Method Major: General Engineering
7/17/2003
http://numericalmethods.eng.usf.edu
1
Newton-Raphson Method f(x)
[x f (x )]
f(xi)
i,
i
f(xi ) xi +1 = xi ′ i) f (x
f(xi-1) θ xi+2
2
xi+1
xi
X
http://numericalmethods.eng.usf.edu
Derivation f(x)
tan(α ) = f(xi)
AB AC
B
f ( xi ) f ' ( xi ) = xi − xi +1
3
C α
A
xi+1
xi
X
f ( xi ) xi +1 = xi − f ' ( xi ) http://numericalmethods.eng.usf.edu
Algorithm for NewtonRaphson Method
4
http://numericalmethods.eng.usf.edu
Step 1
Evaluate f′(x) symbolically
5
http://numericalmethods.eng.usf.edu
Step 2 Calculate the next estimate of the root
f(xi ) xi +1 = xi f'(xi ) Find the absolute relative approximate error
xi +1- xi ∈a = x 100 xi +1 6
http://numericalmethods.eng.usf.edu
Step 3
7
Find if the absolute relative approximate error is greater than the pre-specified relative error tolerance. If so, go back to step 2, else stop the algorithm. Also check if the number of iterations has exceeded the maximum number of iterations.
http://numericalmethods.eng.usf.edu
Example
8
You are working for ‘DOWN THE TOILET COMPANY’ that makes floats for ABC commodes. The ball has a specific gravity of 0.6 and has a radius of 5.5 cm. You are asked to find the distance to which the ball will get submerged when floating in water.
http://numericalmethods.eng.usf.edu
Solution The equation that gives the depth ‘x’ to which the ball is submerged under water is given by
f ( x ) = x 3-0.165 x 2+3.993x10- 4 f ( x ) = 3x 2-0.33x
9
Use the Newton’s method of finding roots of equations to find the depth ‘x’ to which the ball is submerged under water. Conduct three iterations to estimate the root of the above equation.
http://numericalmethods.eng.usf.edu
Graph of function f(x) f ( x ) = x -0.165 x +3.993x10 3
10
2
-4
http://numericalmethods.eng.usf.edu
Iteration #1 x 0 = 0 . 02
f (x 0 ) x1 = x 0 − f ' (x 0 ) 3 .413x 10 − 4 x 1 = 0 . 02 − − 5 . 4 x 10 − 3 = 0.08320 ∈ a = 75 . 96 %
11
http://numericalmethods.eng.usf.edu
Iteration #2 x 1 = 0 . 08320 x 2 = x1 −
f (x1 ) f ' (x1 )
− 1 . 670 x 10 − 4 x 2 = 0 . 08320 − − 6 . 689 x 10 − 3 = 0.05824 ∈ a = 42 . 86 %
12
http://numericalmethods.eng.usf.edu
Iteration #3 x 2 = 0 . 05824
f (x 2 ) x3 = x2 − f ' (x 2 ) 3 . 717 x 10 − 5 = 0 . 05284 − − 9 . 043 x 10 − 3 = 0.06235 ∈ a = 6 . 592 %
13
http://numericalmethods.eng.usf.edu
Iteration #4 x 3 = 0 . 06235 ?????? x 3 = ???? − ?????? ?????? = ???? − ?????? = ??????? ∈ a = ????? % 14
http://numericalmethods.eng.usf.edu
Advantages
15
Converges fast, if it converges Requires only one guess