You are on page 1of 48

university of basrah

Solution Exercise 3
Numerical Methods
By: Jassim Hameed
<< Search more Solutions!

Found Errors in Solution? >> Report here!

Step 1

Disclaimer: Since you have asked multiple questions, we will solve the first question for you. If you
want any specific question to be solved then please specify the question number or post only that
question.

The bisection method uses the midpoint of an interval to perform the iterations to approximate the
root of an equation in that interval. The midpoint of the interval: (a, b)is calculated using the
formula: c = a+b
2
.

1.

The point of intersection of the curves sin x and x 3 − 1can be calculated by solving the equation:
sin x = 3x − 1. This equation can also be written as sin x − 3x+ 1 = 0. Let
f(x) = sin x − x3 + 1.

The four steps bisection algorithm can be defined as follows.

1. Select the interval: [a, b]such that a < band f(a) ⋅ f(b) < 0.
2. Calculate the midpoint of the interval: [a, b]using the formula: c = a+b 2
.
3. Select the interval [a, c], if f(a) ⋅ f(c) < 0or else select the interval: [c, b], if f(c) ⋅ f(b) < 0.
4. Repeat this process until f(c) ≈ 0or |f(c)| ≤ Accuracy.

The value table of f(x) = sin x − x3 + 1 can be made as follows.

x 0 1 2

f(x) 1 0.84147 -6.0907


Since f(1)f(2) < 0 , select the starting interval as [1, 2]and follow the steps above to make the
iteration table as follows.

a+b
n a f(a) b f(b) c = 2
f(c)

1 1 0.84147 2 -6.0907 1.5 -1.37751

2 1 0.84147 1.5 -1.37751 1.25 -0.00414

3 1 0.84147 1.25 -0.00414 1.125 0.47844

4 1.125 0.47844 1.25 -0.00414 1.1875 0.25288

5 1.1875 0.25288 1.25 -0.00414 1.21875 0.1284

6 1.21875 0.1284 1.25 -0.00414 1.23438 0.06315

7 1.23438 0.06315 1.25 -0.00414 1.24219 0.02976

8 1.24219 0.02976 1.25 -0.00414 1.24609 0.01287

9 1.24609 0.01287 1.25 -0.00414 1.24805 0.00438

10 1.24805 0.00438 1.25 -0.00414 1.24902 0.00013

11 1.24902 0.00013 1.25 -0.00414 1.24951 -0.00201

12 1.24902 0.00013 1.24951 -0.00201 1.24927 -0.00094

13 1.24902 0.00013 1.24927 -0.00094 1.24915 -0.00041

14 1.24902 0.00013 1.24915 -0.00041 1.24908 -0.00014

15 1.24902 0.00013 1.24908 -0.00014 1.24905 0

The iteration stops after 15 iterations as f(1. 24905) = 0. Hence, the root of the equation: f(x) = 0
is x ≈ 1. 24905
.

You might also like