Process Simulation and Modeling Modeling: Numerical Methods
Process Simulation and Modeling Modeling: Numerical Methods
MODELING
Numerical Methods
NEWTON RAPHSON METHOD
Derivation
f(x)
AB
tan(
f(xi)
x f x
i, i
AC
f ( xi )
f ' ( xi )
xi xi 1
f(xi-1)
f ( xi )
xi+2 xi+1 xi X xi 1 xi
f ( xi )
NEWTON RAPHSON METHOD
f(xi )
xi 1 = xi -
f (xi )
Example:1
You are working for ‘DOWN THE TOILET COMPANY’ that makes
floats for ABC commodes. The floating ball has a specific gravity
of 0.6 and has a radius of 5.5 cm. You are asked to find the depth
to which the ball is submerged when floating in water.
NEWTON RAPHSON METHOD
The equation that gives the depth x in meters to which the ball is
submerged under water is given by
f x x 3 - 0 .165 x 2 + 3 .993 10 - 4
0 . 05
0 . 05 3 0 . 165 0 . 05 2 3 .993 10 4
3 0 . 05 0 . 33 0 . 05
2
1 . 118 10 4
0.05
9 10 3
0.05 0 . 01242
0 . 06242
The absolute relative approximate error a at the end of Iteration 2 is
x1 x 0
a 100
x1
0 . 06242 0 . 05
100
0 . 06242
19 . 90 %
NEWTON RAPHSON METHOD
Iteration 1
The estimate of the root is
f x 0
x1 x 0
f ' x 0
0 . 05
0 . 05 3 0 . 165 0 . 05 2 3 .993 10 4
3 0 . 05 0 . 33 0 . 05
2
1 . 118 10 4
0.05
9 10 3
0.05 0 . 01242
0 . 06242
The absolute relative approximate error a at the end of Iteration 1 is
x1 x 0
a 100
x1
0 . 06242 0 . 05
100
0 . 06242
19 . 90 %
NEWTON RAPHSON METHOD
Iteration 2
The estimate of the root is
f x1
x 2 x1
f ' x1
0 . 06242
0 . 06242 3 0 . 165 0 . 06242 2 3 .993 10 4
3 0 . 06242 0 . 33 0 . 06242
2
3 . 97781 10 7
0 . 06242
8 . 90973 10 3
0 . 06242 4 . 4646 10 5
0 . 06238
The absolute relative approximate error a at the end of Iteration 2 is
x 2 x1
a 100
x2
0 . 06238 0 . 06242
100
0 . 06238
0 . 0716 %
NEWTON RAPHSON METHOD
Iteration 3
The estimate of the root is
f x 2
x3 x2
f ' x 2
0 . 06238
0 . 06238 3 0 . 165 0 . 06238 2 3 .993 10 4
3 0 . 06238 0 . 33 0 . 06238
2
4 . 44 10 11
0 . 06238
8 . 91171 10 3
0 . 06238 4 . 9822 10 9
0 . 06238
The absolute relative approximate error a at the end of Iteration 3 is
x 2 x1
a 100
x2
0 . 06238 0 . 06238
100
0 . 06238
0%
Regular Falsi/False Position Method
Example 1
The floating ball has a specific gravity of 0.6 and has a
radius of 5.5cm.
You are asked to find the depth to which the ball is
submerged when floating in water.
The equation that gives the depth
submerged under water is given by
x 3 0.165 x 2 3.993 10 4 0
Regular Falsi/False Position Method
The floating ball has a specific gravity of 0.6 and has a radius of 5.5cm. You are
asked to find the depth to which the ball is submerged when floating in water.
The equation that gives the depth x in meters to which the ball is
submerged under water is given by
f x x 3 - 0 .165 x 2 + 3 .993 10 - 4
Use the false-position 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. Find the absolute relative approximate error at the end of
each iteration.
Solution
From the physics of the problem
0 x 2R
0 x 2(0.055)
0 x 0.11
Regular Falsi/False Position Method
Let us assume
x L 0, xU 0.11
f x L f 0 0 0.1650 3.993 10 4 3.993 10 4
3 2
Hence,
f x L f xU f 0 f 0.11 3.993 10 4 2.662 10 4 0
Iteration 1
xU f x L x L f xU
xm
f x L f xU
0.11 3.993 10 4 0 2.662 10 4
3.993 10 4 2.662 10 4
0.0660
f xm f 0.0660 0.0660 0.1650.0660 3.993 104
3 2
3.1944 105
Iteration xL xU xm a % f xm
1 0.0000 0.1100 0.0660 N/A -3.1944x10-5
Choose xl and xu as two guesses for the root such that f(xl)
f(xu) < 0, or in other words, f(x) changes sign between xl and
xu.
Estimate the root, xm of the equation f (x) = 0 as the mid point
between xl and xu as
x xu
xm =
2
Interval Halving/Bisection Method
Now check the following
where
xmold previous estimate of root
xmnew current estimate of root
Interval Halving/Bisection Method
So there is at least on root between x and xu, that is between 0 and 0.11
Iteration 1 x xu 0 0.11
The estimate of the root is xm 0.055
2 2
Hence the root is bracketed between xm and xu, that is, between 0.055 and
0.11. So, the lower and upper limits of the new bracket are
xl 0.055, xu 0.11
At this point, the absolute relative approximate error cannot be
calculated as we do not have a previous approximation.
Interval Halving/Bisection Method
Iteration 2
x xu 0.055 0.11
The estimate of the root is xm 0.0825
2 2
f xm f 0.0825 0.0825 0.1650.0825 3.993 10 4 1.622 10 4
3 2
Hence the root is bracketed between x and xm, that is, between 0.055 and
0.0825. So, the lower and upper limits of the new bracket are
xl 0.055, xu 0.0825
The absolute relative approximate error a at the end of Iteration 2 is
xmnew xmold
a new
100
xm
0.0825 0.055
100
0.0825
33.333%
Interval Halving/Bisection Method
Iteration 3
x xu 0.055 0.0825
The estimate of the root is xm 0.06875
2 2
f xm f 0.06875 0.06875 0.1650.06875 3.993 10 4 5.563 10 5
3 2
Hence the root is bracketed between x and xm, that is, between 0.055 and
0.06875. So, the lower and upper limits of the new bracket are
xl 0.055, xu 0.06875
The absolute relative approximate error a at the end of Iteration 3
is xmnew xmold
a new
100
xm
0.06875 0.0825
100
0.06875
20%
Interval Halving/Bisection Method
Solution:
Iteration 1
a= 1.5
b= -2.5
C=-3
X3= 0.19185
Iteration 2
a= 1.691854
b= -5.1385
C=0.04777
X4= 0.201183
Muller Method
Iteration 3
a= 1.393112
b= -4.871483
C=0.00228
X5= 0.201640