Self Study Assignment (29/10/2015) - Bracketing Method.
A. Example 1: Bisection Method.
Determine the root of
=
5 + 6 using the Bisection Method with initial values
xl = 2.5 and xu = 4. Iterate until the approximation error is less than 3%. Calculate the final
true error and the approximation error at each iteration.
Solution:
First Iteration:
1) Calculate xr using Bisection formula :
Hence,
=
2) Calculate
and
3) Determine if
Here,
:
=
2.5 + 4
= 3.25
2
2.5 = 2.5
< 0 or
+
2
4 = 4
5 2.5 + 6 = 0.25
5 4 + 6 = 0.3125
>0:
= 0.25 0.3125 which is less than zero, i.e.
<0
4) Therefore according to the Bisection Method rules,
If
< 0, then in the next iteration, x u = x r = 3.25 and x l stays, i.e. x l = 2.5
5) Calculate the approximation error:
=
For the first iteration,
!"# $
100%
!"# $
cannot be calculate because there is no
All the information above can be summarized in the following table:
i
1
2
xl
2.5
2.5
xu
4
3.25
xr
3.25
f(xl)
-0.25
f(xr)
0.3125
f(xl)f(xr)
<0
a
-
Second Iteration:
1) Calculate xr using Bisection formula. Hence,
2.5 + 3.25
=
= 2.875
2
2) Calculate
and
3) Determine if
Here,
:
=
2.875 = 2.875
< 0 or
2.5 = 0.25
5 2.875 + 6 = 0.1094
>0:
= 0.25 0.1094 which is more than zero, i.e.
>0
4) Therefore according to the Bisection Method rules,
> 0, then in the next iteration, x l = x r = 2.875 and x u stays, i.e. x u = 4
If
5) Calculate the approximation error:
!"# $
2.875 3.25
=
100% = *
* 100% = 13.04 %
2.875
All the information above can be summarized in the following table:
i
1
2
xl
2.5
2.5
xu
4
3.25
xr
3.25
2.875
f(xl)
-0.25
-0.25
f(xr)
0.3125
-0.1094
f(xl)f(xr)
<0
>0
a
13.04
B. Example 2: False Position Method
Determine the root of
=
5 + 6 using the False Position Method with initial
values xl = 2.5 and xu = 4. Iterate until the approximation error is less than 3%. Calculate the
final true error and the approximation error at each iteration.
Solution:
First Iteration:
1) Calculate
and
:
=
2.5 = 2.5
=
4 = 4
5 2.5 + 6 = 0.25
5 4 + 6 = 2
2) Calculate xr using False Position formula :
= +
Hence,
=4 2
3) Calculate
4) Determine if
Here,
2.5 4
= 2.6667
/0.250 2
2.6667 = 2.6667
< 0 or
5 2.6667 + 6 = 0.2222
>0:
= 0.25 0.2222 which is more than zero, i.e.
>0
5) Therefore according to the False Position Method rules,
If
> 0, then in the next iteration, x l = x r = 2.6667 and x u stays, i.e. x u = 4
6) Calculate the approximation error:
=
For the first iteration,
!"# $
100%
cannot be calculate because there is no
!"# $
All the information above can be summarized in the following table:
i
1
2
xl
2.5
2.6667
Second Iteration:
1) Calculate
xu
4
4
and
=
f(xl)
-0.25
f(xu)
2
:
2.6667 = 2.6667
=
4 = 4
xr
2.6667
f(xr)
-0.2222
f(xl)f(xr)
>0
a
-
5 2.6667 + 6 = 0.2222
5 4 + 6 = 2
2) Calculate xr using False Position formula :
2.6667 4
= 4 2
= 2.8000
/0.22220 2
3) Calculate
4) Determine if
Here,
2.8000 = 2.8000
< 0 or
5 2.8000 + 6 = 0.16
>0:
= 0.2222 0.16 which is more than zero, i.e.
>0
5) Therefore according to the False Position Method rules,
If
> 0, then in the next iteration, x l = x r = 2.8000 and x u stays, i.e. x u = 4
6) Calculate the approximation error:
!"# $
2.8000 2.6667
=
100% = *
* 100% = 4.76 %
2.8000
All the information above can be summarized in the following table:
i
xl
xu
f(xl)
f(xu)
xr
f(xr)
f(xl)f(xr)
1
2
2.5
2.6667
4
4
-0.25
-0.2222
2
2
2.6667
2.8000
-0.2222
-0.16
>0
>0
4.76%
Do the following in groups of 2 persons and submit 1 answer by 5 pm on
Monday 2/11/2015
TASK 1:
1. At the second iteration of Example 1 above (page 1 & 2), the approximation error is
13.04 % and is more than 3 %. Therefore, continue to solve the example by filling up the
table above to find the value of xr that will give an error of less than 3 %. Then calculate
the final true error.
Hint: You will need to do 5 iterations and you will have to calculate the true (analytical)
solution for the problem to calculate the true error.
2. Given the function
= 5 1 5 + 6 , find the value of x when
= 2 using the
Bisection Method with initial values xl = 0 and xu = 1. Iterate until the approximation
error is less than 10%.
Hint: You will need to substitute the function
into
= 2 and then rearrange to
make
=0.
TASK 2:
1. At the second iteration of Example 2 above (page 3 & 4), the approximation error is
4.76 % and is more than 3 %. Therefore, continue to solve the example by filling up the
table above to find the value of xr that will give and error of less than 3 %. Then
calculate the final true error.
2. Given the function
= 5 1 5 + 6 , find the value of x when
= 2 using the
False Position Method with initial values xl = 0 and xu = 1. Iterate until the
approximation error is less than 5%.
TASK 3:
1. Do question 2 from Tutorial 2: Bisection and False Position Method. You can download
the tutorial from this URL : http://metalab.uniten.edu.my/~anisa/coeb223.htm.
Mult mai mult decât documente.
Descoperiți tot ce are Scribd de oferit, inclusiv cărți și cărți audio de la editori majori.
Anulați oricând.