KIL1005: NUMERICAL METHODS FOR ENGINEERING
SEMESTER 2, SESSION 2021/2022
LECTURE 3
4 APRIL 2023
Department of Chemical Engineering
Faculty of Engineering
Universiti Malaya
THE FALSE-POSITION METHOD
(REGULA-FALSI)
• If a real root is bounded by xl and xu of f(x)=0,
then we can approximate the solution by doing
a linear interpolation between the points [xl,
f(xl)] and [xu, f(xu)] to find the xr value such
that l(xr)=0, l(x) is the linear approximation of
f(x).
== > Fig. 5.12
2
PROCEDURES
1. Find a pair of values of x, xl and xu such that fl=f(xl) <0 and fu=f(xu) >0 or fl=f(xl) >0 and fu=f(xu) <0.
E.g. f(xl). f(xu) < 0.
2. Estimate the value of the root from the following formula (Refer to Box 5.1)
( )( )
𝑥 =𝑥 −
( )
and evaluate f(xr).
3. Use the new point to replace one of the original points, keeping the two points on opposite sides of the
x axis.
If f(xl).f(xr)<0 then root lies in the first subinterval and xr becomes the upper limit for the next
iteration.
If f(xl).f(xr)> 0 then root lies in the second subinterval and xr becomes the lower limit for the next
iteration.
If f(xr)=0 then you have found the root and need go no further!
3
4. See if the new xl and xu are close enough for convergence to be declared. If they are not, go back to
step 2.
• Why this method?
• Faster
• Always converges for a single root.
See Sec.5.3.1, Pitfalls of the False-Position Method
Note: Always check by substituting estimated root in the original equation to determine whether f(xr) ≈
0.
4
EXAMPLE 1
• Solve Example 1 in Lecture 4 using Regula Falsi Method
I Iteration 2
Example
(because Xo will be the
new Xu)
f(x , ) .
f(xr) : -ve of this ,
f(n) 668 06
1-2-0 1468432-40
.
=
.
I
9309
&
......
The root lies between 12 14 .
1468432
f(x) 668 06 0 .
-40
-
=
16
.
I
X , : 12 to Xu = - ......
Es = 0 5 .
% X, : 12 + 0 Xy : 14 . 9309
Iteration I
f(X 1) = 6 1139
.
12 sub into I
x, =
1139 f (Xu) 668 06 .
0 .
146843(149309)
6
-
:
f (2)
.
:
C 40 -0 2516
9309
- = .
14 .
sub into I
X4 : 16
(-0 2516) (12-14 9309 .
Xr
.
: 14 9309-.
= 14 815/
2303
.
f (nu) : -
2 .
6 1139
. -
C-0 2516) .
( - 2 .
2303)(12 -
16)
Xr 0272
= 16 f (xr) = 0 .
6 1139
. -
C-2 2303)
.
Ea 14 . 8151 -
14 .
9309
9309
:
x 100 : 0 .
78 %
Xr : 14 .
sub into I
14 815/ .
f(Xr) :
-
0 . 2516
Eal % ) :
X,
new
Xold
100 % f(X)
new
X
6 1139
:
5
X
XI Xr Xu
·
-
2 .
2303
6
OPEN METHODS
when we
converge happen
• Open methods are based on
-
use correct initial
value
diverge happen when we
formulas that require only a use incorrect
initial value
single starting value of x or
two starting values that do not
necessarily bracket the root.
Figure 6.1
7
SIMPLE FIXED-POINT ITERATION
•Rearrange the function so that x is on the left side of the equation:
f ( x) 0 g ( x) x
xk g ( xk 1 ) xo given , k 1, 2, ...
•Bracketing methods are “convergent”.
•Fixed-point methods may sometime “diverge”, depending on the stating point (initial
guess) and how the function behaves.
8
EXAMPLE 2
𝑥 − 2𝑥 + 3 = 0
Can be manipulated to yield
𝑥 +3
𝑥=
2
9
EXAMPLE 3
Use simple fixed point iteration to locate the root of with stopping criterion 10%
f(x) = e-x - x
10
11
CONVERGENCE
Figure 6.2
x=g(x) can be expressed as a pair of
equations:
y1=x
y2=g(x) (component equations)
Plot them separately.
Linear convergence: relative error decrease by a factor of 0.5
And 0.6 – characteristic of fixed point iteration
12
EXAMPLE 4
Separate the equation in Example 3 into two parts and determine its roots
graphically with 0.2 step size.
13
14
EXERCISE 2 (SUBMIT 17 APRIL 2023)
1. Determine the root of:
𝑓 𝑥 = −0.5𝑥 + 2.5𝑥 + 4.5
(a) Graphically
(b) Using quadratic formula
(c) Using three iteration of the Regula Falsi method. Employ initial guesses of xl=5 and xu=10. Compute the
approximate relative error after each iteration.
1. 2. Determine the root of:
𝑓 𝑥 = 5𝑥 − 5𝑥 + 6𝑥 − 2
(a) Graphically
(b) Using the Regula Falsi method. Employ initial guesses of xl=0 and xu=1. Iterate until the approximate relative
error after each iteration falls below a stopping criterion of 10%.
15
Iteration 2
2 1 = 5 . 9
f (21) : 1 . 845
nu = 10
f (MU) : -
20 .
5
ur =
f (UU) (21 -
Mu) C -
20 .
5)(5 9-10)
.
: 6 .
2385
=
nu 10 -
f(x,) -
f (nu) 1 .
845 -
1- 20 5) .
f (Ur) = 0 .
6368
Ea : 6 .
23855 9 .
: 5 .
43 %
x 100
. 2385
6
Iteration 3
& 1 :
6 . 2385
f (n)) : 0 .
6368
nu = 10
f (MU) : -
20 .
5
ur f (UU) (21 Mu)
=
-
= 1 -
20 .
5)(6 2385-10)
.
= 6 3518
10
.
nu -
f(x,) -
f (nu) 0 .
6368 -
1-20 5) .
f(ur) = 0 .
2068
Ea : 6 .
3518- 6 .
2385 1 .
78 %
:
x 100
.
6 3518
: Y root = 6 .
3518