Uploaded by Maria Therese Rica Aglipay

Assignment bisection method

advertisement
AGLIPAY, MARIA THERESE R.
BSEE III-B
Problem:
Determine the first positive root (lowest positive root) of the equation 𝑦 =
𝑥 2 |sin 𝑥| − 4 (x is in radian) by the graphical and bisection methods. Use a
stopping criterion below ∊𝑠 = 0.5% for the bisection method.
Answer: f(x)= x2*(abs(sin(x)))-4
x
0.5
1
1.5
2
2.5
3
3.5
f(x)
-3.880144
-3.158529
-1.755636
-0.362810
-0.259549
-2.729920
0.297095
In iteration 5, the percent absolute relative approximate error is 0.44843, which is less
than ∊𝑠 = 0.5%. Therefore, the root is equal to 3.48438.
AGLIPAY, MARIA THERESE R.
BSEE III-B
Iteration
Xl
Xr
Xu
f(Xl)
f(Xr)
f(Xl)*f(Xr)
f(Xl)* f(Xr)
Remarks
(subinterval)
1
3
3.25
3.500
-2.729919927
-2.857188892
7.799896891
2
3.25
3.375
3.500
-2.857188892
-1.365418918
3.901259765
<0
2nd
3
3.375
3.4375
3.500
-1.365418918
-0.554242809
0.756773616
<0
2nd
4
3.4375
3.46875
3.500
-0.554242809
-0.13341449
0.073944022
<0
2nd
5
3.46875
3.484375
3.500
-0.13341449
0.080653783
-0.010760383
>0
1st
Iteration
Xl
Xr
Xu
f(Xl)*f(Xr) f(Xl)* f(Xr)
Remarks
|∊𝒂 |, %
(subinterval)
1
2
3
4
5
3
3.25
3.375
3.4375
3.46875
3.25
3.375
3.4375
3.46875
3.48438
3.500
3.500
3.500
3.500
3.500
f(Xl)
f(Xr)
-2.72992 -2.85719 7.799897
-2.85719 -1.36542 3.90126
-1.36542 -0.55424 0.756774
-0.55424 -0.13341 0.073944
-0.13341 0.080654 -0.01076
<0
<0
<0
>0
2nd
2nd
2nd
1st
|∊𝒂 |, %
3.703703
704
1.818181
818
0.900900
901
0.448430
493
3.703704
1.818182
0.900901
0.44843
Download