Numerical Computation April 2023 Miss.T.Selvaratnam: Lecture - 3,4
Numerical Computation April 2023 Miss.T.Selvaratnam: Lecture - 3,4
April 2023
Miss.T.Selvaratnam
Lecture - 3,4
Chapter 2
Solution
First, we need to check if the function f(x) is continuous in the
interval [2, 3] and if it changes sign. We can verify that f(2) = -1 and
f(3) = 16, so the function does change sign.
Next, we can start the bisection method by setting the interval [a, b]
to [2, 3] and the tolerance to 0.01.
Then we can find the midpoint c = (a+b)/2 = 2.5 and calculate f(c) =
3.375
Department of Interdisciplinary Studies, Faculty of Engineering, University of Jaffna, Sri Lanka
Since f(c) is positive, the root must be in the interval [2, 2.5].
Then update the interval to [a, b] = [2, 2.5] and repeat the process,
finding the midpoint c = (a+b)/2 = 2.25 and calculating
f(c) = -0.796875. Since f(c) is negative, the root must be in the
interval [2.25, 2.5].
Continue this process, halving the interval each time until the
absolute error is less than or equal to 0.01.
After five iterations, we obtain the interval [2.390625, 2.40625] with
an absolute error of 0.0078125.
Thus, we can conclude that the root of the equation 𝑓 𝑥 = 𝑥 3 −
2𝑥 − 5 in the interval [2, 3] to within an absolute error tolerance of
0.01 is approximately x = 2.3984375.
Use the Regula - Falsi method to find the root of the equation
𝑓 𝑥 = 𝑥 3 − 2𝑥 − 5 in the interval [2, 3]. Find the root to within an
absolute error tolerance of 0.01.
Solution:
Start the Regula-Falsi method by setting the interval [a, b] to [2, 3] and
the tolerance to 0.01. Then we can calculate the value of the function
at the endpoints of the interval:
f(a) = -1 f(b) = 16
Solution
Solution
Solution
7.