0% found this document useful (0 votes)
80 views18 pages

Roots of A Nonlinear Equation

The document describes the Newton-Raphson method for finding the roots of nonlinear equations. It discusses the derivation of the method, provides the algorithm for implementing it, and gives an example of using it to calculate the depth at which a floating ball submerges in water. The document also outlines some advantages of the method, such as fast convergence and requiring only a single initial guess, as well as potential drawbacks like division by zero errors or failure to converge for equations with local maxima/minima.

Uploaded by

goserunner
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
80 views18 pages

Roots of A Nonlinear Equation

The document describes the Newton-Raphson method for finding the roots of nonlinear equations. It discusses the derivation of the method, provides the algorithm for implementing it, and gives an example of using it to calculate the depth at which a floating ball submerges in water. The document also outlines some advantages of the method, such as fast convergence and requiring only a single initial guess, as well as potential drawbacks like division by zero errors or failure to converge for equations with local maxima/minima.

Uploaded by

goserunner
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Roots of a Nonlinear

Equation

Topic: Newton-Raphson Method

Major: General Engineering

07/20/09 http://numericalmethods.eng.usf.edu 1
Newton-Raphson Method

f(x)

f(xi )
f(xi)
[x f( x )] xi +1 = xi -
i, i
f ′(xi )

f(xi-1)

θ
xi+2 xi+1 xi X

2
Derivation
f(x)
AB
tan(α ) =
AC
f(xi) B
f ( xi )
f ' ( xi ) =
xi − xi +1

f ( xi )
xi +1 = xi −
C α A X f ' ( xi )
xi+1 xi

3
Algorithm for Newton-
Raphson Method

4
Step 1

Evaluate f′(x) symbolically

5
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
Step 3
 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.

7
Example
 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.

8
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
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.

9
Graph of function f(x)
f ( x ) = x -0.165 x +3.993x10
3 2 -4

10
Iteration #1
x0 = 0.02
f ( x0 )
x1 = x0 −
f ' ( x0 )
3.413x10−4
x1 = 0.02 −
− 5.4 x10−3
= 0.08320
∈a = 75.96%

11
Iteration #2
x1 = 0.08320
f ( x1 )
x2 = x1 −
f ' ( x1 )
−1.670x10 −4
x2 = 0.08320 −
− 6.689 x10 −3
= 0.05824
∈a = 42.86%

12
Iteration #3
x2 = 0.05824
f ( x2 )
x3 = x2 −
f ' ( x2 )
3.717 x10−5
= 0.05284 −
− 9.043x10−3
= 0.06235
∈a = 6.592%

13
Advantages

 Converges fast, if it converges


 Requires only one guess

14
Drawbacks
10
f(x)

0 x
-2 -1 2 0 3 1 2

1
-5

f ( x ) = ( x − 1) = 0
-10
3

-15

-20

Inflection Point
15
Drawbacks (continued)
1.00E-05
f(x)
7.50E-06

5.00E-06

2.50E-06

0.00E+00 x
-0.03 -0.02 -0.01 0 0.01 0.02 0.03 0.04
-2.50E-06
0.02
-5.00E-06

f ( x ) = x 3 − 0.03 x 2 + 2.4 x10 −6 = 0


-7.50E-06

-1.00E-05

Division by zero

16
Drawbacks (continued)
1.5
f(x)
1

0.5

x
0
-2
-0.063069
0
0.54990 2 4
4.462 6
7.53982
8 10

-0.5

-1 f ( x ) = Sin x = 0
-1.5

Root Jumping
17
Drawbacks (continued)
6
f(x)

3
3

2
2 f ( x) = x2 + 2 = 0
11
4
x
0
-2 -1 0 1 2 3
-1.75 -0.3040 0.5 3.142
-1

Oscillations near Local Maxima or Minima


18

You might also like