Bedeser Activity2

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Bedeser, Rowell Joseph C.

Numerical Solution Lec


201911435 Activity #2

1. Find the root of the equation 𝑓(𝑥) = 𝑒 −𝑥 − 𝑥 using the bisection method bounded by the
interval [0,1]. Let TOL = 1 𝑥 10−4 .
SOLUTION:
𝑎+𝑏
𝑥𝑖 =
2
𝑓(𝑎) ∗ 𝑓(𝑥𝑖 ) < 0 ∴ 𝑏 = 𝑥𝑖
𝑓(𝑏) ∗ 𝑓(𝑥𝑖 ) < 0 ∴ 𝑎 = 𝑥𝑖
i a 𝑥𝑖 b f(a) f(𝑥𝑖 ) f (b)
1 0 0.5 1 1 0.1065306597 -0.6321205588
2 0.5 0.75 1 0.1065306597 -0.2776334473 -0.6321205588
3 0.5 0.625 0.75 0.1065306597 -0.08973857148 -0.2776334473
4 0.5 0.5625 0.625 0.1065306597 0.007282824731 -0.08973857148
5 0.5625 0.59375 0.625 0.007282824731 -0.04149754984 -0.08973857148
6 0.5625 0.578125 0.59375 0.007282824731 -0.01717583919 -0.04149754984
7 0.5625 0.5703125 0.578125 0.007282824731 -0.004963760389 -0.01717583919
8 0.5625 0.56640625 0.5703125 0.007282824731 0.001155202015 -0.004963760389
9 0.56640625 0.568359375 0.5703125 0.001155202015 -0.001905359613 -0.004963760389
10 0.56640625 0.5673828125 0.568359375 0.001155202015 -0.0003753491691 -0.001905359613
11 0.56640625 0.5668945313 0.5673828125 0.001155202015 0.0003898587974 -0.0003753491691
12 0.5668945313 0.5671386719 0.5673828125 0.0003898587974 0.000007237911846 -0.0003753491691

Root: x = 0.5671386719
2. Given 𝑓(𝑥) = 𝑥10 − 1 in the interval [0,1.3], compare Bisection Method and Regula
Falsi Method after 5 iterations.
BISECTION METHOD:
𝑎+𝑏
𝑥𝑖 =
2
𝑓(𝑎) ∗ 𝑓(𝑥𝑖 ) < 0 ∴ 𝑏 = 𝑥𝑖
𝑓(𝑏) ∗ 𝑓(𝑥𝑖 ) < 0 ∴ 𝑎 = 𝑥𝑖
i a 𝑥𝑖 b f(a) f(𝑥𝑖 ) f (b)
1 0 0.65 1.3 -1 -0.9865372567 12.78584918
2 0.65 0.975 1.3 -0.9865372567 -0.2236703791 12.78584918
3 0.975 1.1375 1.3 -0.2236703791 2.626720217 12.78584918
4 0.975 1.05625 1.1375 -0.2236703791 0.7824913861 2.626720217
5 0.975 1.015625 1.05625 -0.2236703791 0.1677068465 0.7824913861

REGULA FALSI METHOD:


[𝑎 ∗ 𝑓(𝑏) − 𝑏 ∗ 𝑓(𝑎)]
𝑥𝑖 =
[𝑓(𝑏) − 𝑓(𝑎)]
𝑓(𝑎) ∗ 𝑓(𝑥𝑖 ) < 0 ∴ 𝑏 = 𝑥𝑖
𝑓(𝑏) ∗ 𝑓(𝑥𝑖 ) < 0 ∴ 𝑎 = 𝑥𝑖
i a 𝑥𝑖 b f(a) f(𝑥𝑖 ) f(b)
1 0 0.09429959541 1.3 -1 -0.9999999999 12.78584918
2 0.09429959541 0.9688923672 1.3 -0.9999999999 -0.27095330357 12.78584918
3 0.9688923672 0.9757634757 1.3 -0.27095330357 -0.2175698485 12.78584918
4 0.9757634757 0.9811885175 1.3 -0.2175698485 -0.1829637005 12.78584918
5 0.9811885175 0.9856863022 1.3 -0.1829637005 -0.1342605389 12.78584918

Conclusion: According to the data above, the Bisection Method is more efficient in locating the
root for the function f(x)=x10-1 after 5 iterations than the Regula Falsi Method.

You might also like