Session 1
Session 1
AND TECHNOLOGY
SCHOOL OF SCIENCES
DEPARTMENTS OF
MATHEMATICS
(Nyarugenge
SECOND Campus
YEARS: MEE)
Page 1 of 22
COURSE OUTLINE
LEARNING OUTCOMES
Knowledge and Understanding
Having successfully completed the module, students should be able to demonstrate
knowledge and understanding of:
Numerical analysis as applied to simple mathematical topics.
The implications of basic numerical analysis.
Cognitive/Intellectual skills/Applications of Knowledge
Present simple arguments and conclusions using numerical analysis.
Analyze and evaluate problems in mathematics and engineering.
Communication /ICT/Numeracy/Analytic Techniques/Practical Skills.
Having successfully completed the module, students should be able to:
Apply the mathematical knowledge to solve problems in range of Engineering
situations.
Carry out mathematical and numerical manipulation with confidence and
accuracy.
General transferable skills
Having successfully completed the module, students should be able to:
Assimilate Abstract Ideas;
Communicate information having a mathematical content.
INDICATIVE CONTENT
Chapter I: Transcendental, Polynomial Equations and Curve Fitting.
I.1. Bisection and Newton-Raphson method.
I.2. Method of least squares - Fitting a straight line - Fitting a Parabola.
I.3. Solution of a system of linear ordinary differential equations.
I.4. Iterative methods for linear equations.
Chapter II. Approximation of Functions.
II.1. First and higher differences: - forward differences and backward differences and
central differences - differences of a polynomial.
II.2. Interpolation: - Newton Gregory Forward and Backward Interpolation formula -
Inverse Interpolation.
II.3. Numerical Differentiation : Newton forward and backward differences formula to
compute first and higher order derivatives.
Page 2 of 22
II.4. Numerical Integration: - The Trapezoidal Rule - Simpson’s one and third rule and
three eighth rule.
Chapter III. Numerical Solutions of Differential Equations.
III.1. Solution of ode’s by Taylor series, Euler’s method, Runge - Kutta methods.
III.2. Introduction to solution of PDEs: Classification of Partial differential equations
of the second order.
III.3. Laplace’s equation and its solution.
Chapter VI. Matrix Algebra
IV.1. Solution of simultaneous linear equations.
IV.2. Iterative methods for linear equations.
Chapter V. Optimization
V.1. Linear Programming Problems formulation
V.2. Techniques for solving LPP.
ASSESSMENT:
Assignments (Two): 15%
Quiz (Two): 10%
Examinations: CATS (Two): 25%, FINAL 50%
REFERENCES:
1. Advanced Engineering Mathematics by E. Kreysig.
2. Farlow, S.J., 1982. Partial Differential Equations for Scientists and Engineers. New
York, United States: Dover Publications Inc.. Available at:
https://www.pdfdrive.com/partial-differential-equations-for-scientists-and-engineers-
dover-books-on-mathematics-e175344303.html. )
3. Chapra, S.C. & Canale, R.P., 2015. Numerical Methods for Engineers. 7th ed. New
York, New York, United States: McGraw-Hill Education. Available at:
https://gdcboysang.ac.in/About/Droid/uploads/Numerical%20Methods.pdf .
4. Background Texts (include number in library or URL) (inc ISBN)
5. Chapra, S. & Canale, R., 2021. Numerical Methods for Engineers. New York, New York,
United States: McGraw Hill. Available at:
https://www.mheducation.com/highered/product/numerical-methods-engineers-
chapra-canale/M9781260232073.html .
6. Chasnov, J.R., 2020. Numerical Methods for Engineers. Hong Kong: The Hong Kong
University of Science and Technology. Available at:
https://www.math.hkust.edu.hk/~machas/numerical-methods-for-engineers.pdf
Page 3 of 22
Chapter 0. Errors in numerical computation
0.1. Mathematical preliminaries
In this section we state without proof certain mathematical results which will be useful in the
sequel.
Theorem1: If 𝑓(𝑥) is a continuous function in 𝑎 ≤ 𝑥 ≤ 𝑏 and if 𝑓(𝑎) and 𝑓(𝑏) are of the opposite
sings, then there exist at least a point 𝑐 ∈ ]𝑎, 𝑏[ such that 𝑓(𝑐) = 0.
Theorem2: Rolle ’s Theorem
If (a) 𝑓(𝑥) is a continuous function in 𝑎 ≤ 𝑥 ≤ 𝑏
a. 𝑓 ′ (𝑥) exists in 𝑎 < 𝑥 < 𝑏
b. 𝑓(𝑎) = 𝑓(𝑏) = 0, then there is at least one value𝑥, say 𝑐 such that 𝑓 ′ (𝑐 ) = 0, ∀ 𝑐 ∈ ]𝑎, 𝑏[ .
Theorem3: Intermediate value theorem
Let 𝑓(𝑥) be a continuous function in 𝑎 ≤ 𝑥 ≤ 𝑏 and 𝑘 be any number between 𝑓(𝑎) and 𝑓(𝑏).
Then there exist 𝑐 ∈ ]𝑎, 𝑏[ such that𝑓(𝑐) = 𝑘.
Theorem4: Mean-value theorem for derivatives
If (i) 𝑓(𝑥) is a continuous function in 𝑎 ≤ 𝑥 ≤ 𝑏
(ii) 𝑓 ′ (𝑥) exists in 𝑎 < 𝑥 < 𝑏, then there is at least one value𝑥, say
𝑓(𝑏)−𝑓(𝑎)
𝑐 ∈ ]𝑎, 𝑏[ such that 𝑓 ′ (𝑐) = 𝑏−𝑎
𝑎 < 𝜉 < 𝑏.
In practical applications, we mostly employ the first two derivatives only:
(𝑥−𝑎)
𝑓(𝑥) ≅ 𝑓(𝑎) + 𝑓 ′ (𝑎)
1!
or
(𝑥 − 𝑎) ′ (𝑥 − 𝑎)2 ′′
𝑓(𝑥) ≅ 𝑓(𝑎) + 𝑓 (𝑎) + 𝑓 (𝑎)
1! 2!
The first equation is a linear extrapolation and the second, quadratic extrapolation.
Theorem6: Maclaurin’s expansion
𝑥 ′ 𝑥2 𝑥3 𝑥𝑛
𝑓(𝑥) = 𝑓(0) + 𝑓 (0) + 𝑓 ′′ (0) + 𝑓 ′′′ (0) + ⋯ + 𝑓 (𝑛) (0) + 𝑅𝑛 (𝑥)
1! 2! 3! 𝑛!
Example: Expand 𝑓(𝑥) = sin 𝑥 by Taylor’s series about a point 𝑥 = 0 and evaluate sin 200 ?
Solution: 𝑓(𝑥) = sin 𝑥 , 𝑓(0) = 0
Page 4 of 22
𝑓 ′ (𝑥) = cos 𝑥 , 𝑓 ′ (0) = 1
𝑓 ′′ (𝑥) = − sin 𝑥 , 𝑓 ′′ (0) = 0
𝑓 ′′′ (𝑥) = − cos 𝑥 , 𝑓 ′′′ (0) = −1
and so on
𝑥 𝑥3 𝑥5
sin 𝑥 = − + + ⋯ , −∞ < 𝑥 < ∞
1! 3! 5!
𝜋 𝜋 1 𝜋 3
sin 200 = sin ≅ − ( ) = 0.342
9 9 6 9
The remainder term is:
𝜋 4 1 𝜋 4 1
|𝑅3 | = |( ) . 𝑠𝑖𝑛(𝜃 + 2𝜋)| ≤ |( 9 ) | ≅ 0.000062.
9 4! 4!
Page 5 of 22
0.2. Errors and their computation
Most numerical computation are in exact either due to the given data
being approximation or due to limitations of computing aids or tools such
as mathematical tables, desk calculators or the digital computer.
Due to these limitation numbers have to be rounded off causing rounding
errors.
These errors can be classified into several types:
a. Absolute and Relative Errors
Absolute Error: The difference between the exact value (𝑥) and the approximated value
(𝒙𝒂 )
𝑬𝒂 = |𝒙 − 𝒙𝒂 |
Relative Error: The ratio of absolute error to the exact value.
𝑬𝒂
𝑬𝒓 =
|𝒙|
Example: Suppose the true value of a quantity is 𝑥 = 3.141592 and the approximate value
is 𝑥𝑎 = 3.14.
Absolute error:
𝐸𝑎 = |3.141592 − 3.14| = 0.001592
Relative error:
0.001592
𝐸𝑟 = ≈ 0.0005067
3.141592
Percentage Relative error:
𝐸𝑟 × 100 = 0.05067%
b. Truncation errors
These errors are caused by using approximate formulae in computations.
Here arise by using a finite number of terms of a formulae.
Examples:
1. Truncation error in Taylor series approximation
The function 𝑒 𝑥 is approximated using the first three terms of its Taylor series expansion:
𝑥
𝑥2
𝑒 ≈ 1+𝑥+
2
Find the truncation error when approximating 𝑒 0.2 , given that the true value is 1.2214.
Solution:
𝑥2 𝑥3 𝑥4
The Taylor series expansion 𝑒 𝑥 = 1 + 𝑥 + + + +⋯
2! 3! 4!
Using only the first three terms:
(0.2)2
𝑒 0.2 ≈ 1 + 0.2 + = 1.22
2
Truncation error is:
𝑬𝒕 = |𝑻𝒓𝒖𝒆 𝑽𝒂𝒍𝒖𝒆 − 𝑨𝒑𝒑𝒓𝒐𝒙𝒊𝒎𝒂𝒕𝒆 𝑽𝒂𝒍𝒖𝒆|
Page 6 of 22
𝐸𝑡 = |1.2214 − 1.22| = 0.0014
Answer: 0.0014
2. Truncation error in numerical differentiation (Discretization error)
Occurs when a continuous function is represented in a discrete manner.
c. Round-off errors
The round-off error caused by the finite precision of floating- point
arithmetic.
Examples:
1. Round-off error in decimal representation
A number 𝑥 = 0.33333 is stored in a computer with only three decimal places
a. What is the stored value?
b. Computer the absolute and relative round-off error.
Solution:
The actual number is 𝑥 = 0.33333.
Stored value (rounded to three decimal places) is 𝑥𝑎 = 0.333.
Step1: Compute Absolute error
𝑬𝒂 = |𝒙 − 𝒙𝒂 | = |0.33333 − 0.333| = 0.00033
Step1: Compute relative error
𝑬𝒂 0.00033
𝑬𝒓 = = ≈ 0.00099
|𝒙| 0.33333
Answer:
Stored value:0.333
Absolute error: 0.00033
Relative error: 0.00099 = 0.09
Page 7 of 22
2. Round-off Error in Floating-Point Arithmetic
A computer uses four decimal places to store numbers. Compute the round-off error when
storing 𝜋 ≈ 3.14159265
Solution:
Stored value with four decimal places: 𝑥𝑎 = 3.1416
Step1: Compute absolute error:
𝑬𝒂 0.00000735
𝑬𝒓 = = ≈ 2.34 × 10−6 = 0.000234%
|𝒙| 3.14159265
Round-off Error in Addition
Consider adding the numbers 10000.1and 0.00001234on a machine that stores only five
significant digits. Compute the round-off error.
Solution:
Step 1: True Sum
𝑆 = 10000.1 + 0.00001234 = 10000.10001234
Step2: Stored value (Rounded to five significant digits)
10000.10001234 is rounded to 10000.
Step3: Compute Round-off error
d. Algorithmic Errors
Occur when numerical methods fail due to stability issues.
Example: Solving 𝑥 = cos 𝑥 using the iterative method with an initial guess 𝑥0 = 0.5
𝑥𝑛 = cos(𝑥𝑛 )
Iterations:
1. 𝑥1 = cos(0.5) = 0.8776
2. 𝑥2 = cos(0.8776) = 0.6390
3. 𝑥3 = cos(0.6390) = 0.8026
4. 𝑥4 = cos(0.8026) = 0.6948
This method converges, but if the function were highly oscillatory could
arise.
Remark: An approximation is said to be accurate to d decimal places (d.p) if the magnitude
𝟏𝟎−𝒅
of error is less than to the round-off error which is 𝜺𝒑 = 𝟐
Page 8 of 22
Description Magnitude of the error is less than
1 decimal place accuracy 0.005 = 0.5 × 10−1
2 decimal place accuracy 0.0005 = 0.5 × 10−2
3 decimal place accuracy 0.00005 = 0.5 × 10−3
⋮ ⋮
Examples:
1. Round-off in a 4-digit system:
Approximating 𝜋 = 3.14159265 in a 4-digit system, the round-off error is:
10−4
∆𝑥 = 𝜺𝒑 = = 0.00005
2
𝜋 ≈ 3.1416G
∆𝑥 0.005
2. If 𝑥 = 0.51 and is correct to 2-decimal places, then ∆𝑥 = 0.005, and 𝐸𝑅 = = =
𝑥 0.51
0.98%
General error formula
Let 𝑦 = 𝑓(𝑥) the error in 𝑦 denoted by 𝛿𝑦 is given by 𝛿𝑦 = 𝑓 ′ (𝑥)𝛿𝑥 , where 𝛿𝑥 is the error in 𝑥.
Example:
Given 𝑦 = (1 + 𝑥)3 find the error in 𝑦 if 𝑥 = 2.3 ± 0.05
Solution:
If 𝑦 = (1 + 𝑥)3 , then 𝑦 ′ = 3(1 + 𝑥)2
𝛿𝑦 = 𝑓 ′ (𝑥)𝛿𝑥 = 3(1 + 𝑥2.3)2 × 0.05 = 1.63
1.63
𝐸𝑃 = = 4.53%
(1 + 𝑥2.3)3
Errors in a series approximation
(𝑥−𝑎) (𝑥−𝑎)2 (𝑥−𝑎)3
The Taylor’s series of 𝑓(𝑥) at 𝑥 = 𝑎 is 𝑓(𝑥) = 𝑓(𝑎) + 𝑓 ′ (𝑎) + 𝑓 ′′ (𝑎) + 𝑓 ′′′ (𝑎) +
1! 2! 3!
(𝑥−𝑎)𝑛−1
⋯+ (𝑛−1)!
𝑓 (𝑛−1) (𝑎) + 𝑅𝑛 (𝑥)
(𝑥−𝑎)𝑛
Where 𝑅𝑛 (𝑥)a Lagrange’s remainder is be written as 𝑅𝑛 (𝑥) = 𝑓 (𝑛) (𝜉),
𝑛!
𝑎 < 𝜉 < 𝑏.
If the series converges then lim 𝑅𝑛 (𝑥) = 0.
𝑛→∞
Thus if we approximate 𝑓(𝑥) by the first n terms of series, then the maximum error committed
is 𝑅𝑛 (𝑥).
Conversely if the accuracy required is specified in advance, then it would be possible to find
n the number of terms such that the finite series yield the required accuracy.
Page 9 of 22
Example:
The Maclaurrin expansion of 𝑒 𝑥 is
𝑥2 𝑥3 𝑥 𝑛−1 𝑥𝑛
𝑒𝑥 = 1 + 𝑥 + + + ⋯ + (𝑛−1)! + 𝑒 𝜉 , 0 < 𝜉 < 𝑥. Find 𝑛 such that their sum yield the value of
2! 3! 𝑛!
Solution:
𝑥𝑛
Here 𝑅𝑛 (𝑥) = 𝑒 𝜉 , 0 < 𝜉 < 𝑥, so that𝑥 = 𝜉 which gives the maximum error.
𝑛!
𝑥𝑛 𝜉
𝑅𝑛 (𝑥) 𝑛! 𝑒 𝑥𝑛
(𝐸𝑅 )𝑚𝑎𝑥 = = 𝜉 =
𝑓(𝑥) 𝑒 𝑛!
1 10−8
For 8dp accuracy at 𝑥 = 1, we get: 𝑛! < 2 ⟹ 𝑛! > 2 × 108 ⟹ 𝑛 = 12. Thus, we need to take
12 terms of the exponential series in order that its sum is correct to 8 decimal places.
Page 10 of 22
Page 11 of 22
CHAPTER I: Transcendental, Polynomial Equations and Curve
Fitting.
Introduction: Numerical solutions of non-linear equations
A frequently occurring problem is to find one or more roots of the equations
𝑓(𝑥) = 0. (1)
If 𝑓(𝑥) is a quadratic, cubic, or a bi-quadratic expression, the roots may be evaluated by
using the available algebraic formula. On the other hand, when 𝑓(𝑥)is a polynomial of
higher degree or an expression involving transcendental functions, for example:
1 + cos(𝑥) − 5𝑥, 𝑥 tan(𝑥) − cosh(𝑥), etc.
Algebraic methods are not available, and this course must e taken to find the roots by
approximate method. In this section, we describe some numerical methods for the
solution of the equation (1), where f (x) may be algebraic, transcendental or combination
of both.
I.1. The Bisection Method
This method is based on an important property of continuous functions, that is:
If a function f (x) is continuous in the closed interval (a, b) and if f (a) and f (b) are of
opposite signs, then there exists at least one root between a and b.
For definition, let f (a) be negative and f (b) be positive. Then the root lies between a
and b
and let its approximate value be given by
𝑎+𝑏
𝑥1 =
2
Now if f (x1) = 0, we conclude that x1 is a root of the equation f (x) = 0. Otherwise, the
root lies either between x1 and b, or between a and x1 depending on whether f (x1) is
negative or positive. Them we bisect the interval and repeat the process until the root is
known to the desired accuracy.
If f (x1) is positive the root lies in between a and x1. The second approximation to the
root is
𝑎 + 𝑥1
𝑥2 =
2
If f (x2) is negative, the root lies in between x2 and x1, and the third approximation to the
root is:
𝑥1 + 𝑥2
𝑥3 =
2
Page 12 of 22
and so on. This method is simple but slowly convergent.
We repeat this process until the last interval (which contains the root) is as small as desired,
say 𝜀. It is clear that the interval width is reduced by a factor of one-half at each step and at
the end of the 𝑛𝑡ℎ step, the new interval will be
|𝑎−𝑏|
|𝑎𝑛 − 𝑏𝑛 | of length 𝑛 . We then have
2
|𝑎 − 𝑏|
≤ 𝜀,
2𝑛
Which gives on simplification
|𝑎
ln ( − 𝑏|⁄𝜀 )
𝑛≥
ln 2
This relationship gives the number of iterations required to achieve an accuracy 𝜀. For
example, if |𝑎 − 𝑏| = 1 and
𝜀 = 0.001, then it can be seen that
1 ln 1000
𝑛
≤ 0.001 ⟹ 2𝑛 ≥ 1000 ⟺ 𝑛 ln 2 ≥ ln 1000 ⟹ 𝑛 ≥ ≈ 9.97 ⟹ 𝑛 = 10
2 ln 2
Therefore, we taken
1+2 3
𝑥1 = =
2 2
𝟑 𝟑 𝟑 𝟕 3
Then 𝒇(𝒙𝟏 ) = (𝟐) − 𝟐 − 𝟏 = 𝟐 > 𝟎. Hence, the root lies between 1 and = 1.500 and we obtain
2
1 + 1.5 5
𝑥2 = = 1.2500 =
2 4
𝟓 𝟑 𝟓 𝟏𝟗
Now 𝒇(𝒙𝟐 ) = (𝟒) − 𝟒 − 𝟏 = − 𝟔𝟒 < 𝟎
3 5
Hence, the root lies between and and we obtain
2 4
Page 13 of 22
3 5
+ 11
𝑥3 = 2 4 = = 1.3750
2 8
Now 𝑓(𝑥3 ) = (1.3750)3 − 1.3750 − 1 = 0.224609375 > 0
5 11
Hence, the root lies between and and we obtain
4 8
5 11
+ 21
𝑥4 = 4 8 = = 1.3125
2 16
Now 𝑓(𝑥4 ) = (1.3125)3 − 1.3125 − 1 = −0.0515136719 < 0
21 11
Hence, the root lies between16 and and we obtain
8
21 11
+ 43
𝑥5 = 16 8 = = 1.34375
2 32
Now 𝑓(𝑥5 ) = (1.34375)3 − 1.34375 − 1 > 0
21 43
Hence, the root lies between16 and and we obtain
32
21 43
+ 85
𝑥6 = 16 32 = = 1.328125
2 64
Now 𝑓(𝑥6 ) = (1.328125)3 − 1.328125 − 1 > 0
21 85
Hence, the root lies between16 and and we obtain
64
21 85
+ 169
𝑥7 = 16 64 = = 1.3203125
2 128
Now 𝑓(𝑥7 ) = (1.3203125)3 − 1.3203125 − 1 < 0
169 85
Hence, the root lies between128 and and we obtain
64
169 85
+ 339
𝑥8 = 128 64 = = 1.32421875
2 256
Now 𝑓(𝑥8 ) = (1.32421875)3 − 1.32421875 − 1 < 0
339 85
Hence, the root lies between256 and and we obtain
64
339 85
+ 679
𝑥9 = 256 64 = = 1.326171875
2 512
Now 𝑓(𝑥9 ) = (1.326171875)3 − 1.326171875 − 1 > 0
339 679
Hence, the root lies between256 and and we obtain
512
339 679
+ 1357
𝑥10 = 256 512 = = 1.3251953125
2 1024
Now 𝑓(𝑥10 ) = (1.3251953125)3 − 1.3251953125 − 1 > 0
339 1357
Hence, the root lies between256 and and we obtain
1024
Page 14 of 22
339 1357
+ 2713
𝑥11 = 256 1024 = = 1.3247070313
2 2048
Now 𝑓(𝑥11 ) = (1.3251953125)3 − 1.3251953125 − 1 < 0
2713 1357
Hence, the root lies between2048 and and we obtain
1024
2713 1357
+ 5427
𝑥12 = 2048 1024 = = 1.3249511919
2 4096
Now 𝑓(𝑥12 ) = (1.3249511919)3 − 1.3249511919 − 1 > 0
2713 1357
Hence, the root lies between2048 and and we obtain
1024
2713 5427
+ 10853
𝑥13 = 2048 4096 = = 1.3248291016
2 8192
Now 𝑓(𝑥13 ) = (1.3248291016)3 − 1.3248291016 − 1 > 0
2713 1357
Hence, the root lies between2048 and and we obtain
1024
2713 10853
+ 21705
𝑥14 = 2048 8192 = = 1.3247680664
2 16384
The approximated solution is 1.3248
It should be noted that this method always succeeds. If there are more roots than on in the
interval, bisection method finds one of the roots. It can be easily programmed using the
following computational steps:
1. Choose two real numbers 𝑎 and 𝑏 such that 𝑓(𝑎)𝑓(𝑏) < 0.
𝑎+𝑏
2. Set 𝑥𝑟 = .
2
3. (a) If 𝑓(𝑎)𝑓(𝑥𝑟 ) < 0, the root lies in the interval (𝑎, 𝑥𝑟 ). Then , set 𝑏 = 𝑥𝑟 and go to step 2
above.
(b) If 𝑓(𝑎)𝑓(𝑥𝑟 ) > 0, the root lies in the interval (𝑥𝑟 , 𝑏). Then , set 𝑎 = 𝑥𝑟 and go to step 2
above.
(c) If 𝑓(𝑎)𝑓(𝑥𝑟 ) = 0, it means that 𝑥𝑟 is a root of the equation 𝑓(𝑥) = 0 and the computation
may be terminated.
In practical problems, the computation may not be exact so that condition (c) above is never
satisfied. In such a case, we need to adopt a criterion for deciding when to terminate the
computations.
A convenient criterion is to compute the percentage error 𝜀𝑟 defined by
𝒙′ 𝒓 − 𝒙𝒓
𝜺𝒓 = | | × 𝟏𝟎𝟎% (𝟏)
𝒙′ 𝒓
Where 𝒙′ 𝒓 is the new value of 𝑥𝑟 . The computations can be terminated when 𝜺𝒓
Page 15 of 22
Becomes less than a prescribed tolerance, say 𝜺𝒑 . In addition, the maximum number of
iterations may also be specified in advance.
Example: Find a real root of the equation 𝑥 3 − 2𝑥 − 5 = 0.
Solution:
Let 𝑓(𝑥) = 𝑥 3 − 2𝑥 − 5. Then 𝑓(2) = −1 and 𝑓(3) = 16.
Hence a root lies between 2 and 3 and we take
2+3
𝑥1 = = 2.5
2
Now, 𝑓(𝑥1 ) = 𝑓(2.5) = 5.6250, the root lies between 2 and 2.5.
Hence
2 + 2.5
𝑥2 = = 2.25
2
Now, 𝑓(𝑥2 ) = 𝑓(2.25) = 1.890625, the root lies between 2 and 2.25.
Therefore,
2 + 2.25
𝑥3 = = 2.125
2
Since 𝑓(𝑥3 ) = 𝑓(2.125) = 0.3457, the root lies between 2 and 2.125.
Therefore,
2 + 2.125
𝑥4 = = 2.0625
2
Proceeding in this way, we obtain the successive approximations:
𝑥5 = 2.09375, 𝑥6 = 2.10938, 𝑥7 = 2.10156,
𝑥8 = 2.09766, 𝑥9 = 2.09570, 𝑥10 = 2.09473, 𝑥11 = 2.09424, ⋯
We find 𝑥11 − 𝑥10 = −0.0005, and
𝑥11 − 𝑥10 −0.0005
| | × 100% = | | × 100% = 0.02%
𝑥11 𝑥11 = 2.09424
Hence a root, correct to three decimal places is 2.094.
EXERCISES 1
1. Perform 5 iterations of the bisection method to obtain the smallest positive root of the
following equations:
a. 𝑓(𝑥) = 𝑥 3 − 5𝑥 + 1 = 0
b. 𝑓(𝑥) = 𝑥 5 − 5𝑥 3 + 1 = 0
4𝑒 −𝑥 sin(𝑥) − 1 = 0
Page 17 of 22
𝑦 = 0 in Eq. (∗). Thus, we obtain
𝑓(𝑎) 𝑎𝑓(𝑏) − 𝑏𝑓(𝑎)
𝑥1 = 𝑎 − (𝑏 − 𝑎) = (∗∗)
𝑓(𝑏) − 𝑓(𝑎) 𝑓(𝑏) − 𝑓(𝑎)
Which is the first approximation to the root of 𝑓(𝑥) = 0. If now 𝑓(𝑥1 ) and 𝑓(𝑎) are of
opposite signs, then the root lies between 𝑎 and 𝑥1 , and we replace 𝑏 by 𝑥1 in Eq(∗∗),and
obtain the next approximation. Otherwise, we replace a by x1 and generate the next
approximation. The procedure is repeated till the root is obtained to the desired accuracy.
The following Figure gives a graphical representation of the method. The error
criterion Eq. (1) can be used in this case also.
Solution: We find 𝑓(2) = −1 and f (3) = 16. Hence a = 2, b = 3, and a root lies between 2 and 3. Equation (**) gives
Example: Given that the equation 𝑥 2.2 = 69 has a root between 5 and 8.
Use the method of regula-falsi to determine it.
Solution:
Page 18 of 22
Page 19 of 22
EXERCISES 2
1. Find the real root of xex = 3 by regular-falsi method correct to three
decimal places.
2. Find the root correct to the five places of decimal of the equation
2x-log(x) = 7 lies between 3.5 and 4.0, using Regula-falsi —method.
3. Show that x -2x-17 = 0 has only one real root and find its value
3
correct to −two −
decimal places.
4. Find a root of the following equations correct to four decimal places,
using the method of false position.
a) x3 − 4x − 9 = 0 b) x3 + 2x2 + 10x − 20 = 0 c) ex sin(x) = 1
d) x = cos(x)
Page 20 of 22
Page 21 of 22
Page 22 of 22