0% found this document useful (0 votes)
41 views10 pages

SAS#7 Activity 3&5

The document contains the work of a student solving several math problems: 1) Finding the roots of quadratic equations x^2 + 6x + 9 = 0 and x + e^-x = 0 through iterative bisection methods. 2) Using bisection to find where the function cos(x) - x*e^x equals 0. 3) Repeatedly bisecting and evaluating a function to solve the equation x^4 - x - 10 = 0. The student records their work, showing the iterative bisection process and convergence to solutions of the equations.

Uploaded by

Patrick Garcia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views10 pages

SAS#7 Activity 3&5

The document contains the work of a student solving several math problems: 1) Finding the roots of quadratic equations x^2 + 6x + 9 = 0 and x + e^-x = 0 through iterative bisection methods. 2) Using bisection to find where the function cos(x) - x*e^x equals 0. 3) Repeatedly bisecting and evaluating a function to solve the equation x^4 - x - 10 = 0. The student records their work, showing the iterative bisection process and convergence to solutions of the equations.

Uploaded by

Patrick Garcia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Patrick M Garcia

MAT 169 : UP-FB1-BSEE3

Activity 3 : Skill-building Activities

a) 𝒙𝟐 + 𝟔𝐱 + 𝟗 = 𝟎

Let f(x)=𝑥 2-6x+9

x 0 1 2 3
f(x) 9 4 1 0
F(3)=0

𝑥 2-6x+9 is 3

b) 𝐱 + 𝒆−𝒙 = 𝟎
Let f(x)=x-ⅇ −𝑥 =0

x 0 1
f(x) -1 0.6321
0+1
𝑥0 = = 0.5
2
𝑓(𝑥0 ) = 𝑓(0.5) = 0.5 − ⅇ −0.5 = −0.1065 < 0

0.5 + 1
𝑥1 = = 0.75
2
𝑓(𝑥1 ) = 𝑓(0.75) = 0.75 − ⅇ −0.75 = 0.2776 > 0

0.5 + 0.75
𝑥2 = = 0.625
2
𝑓(𝑥2 ) = 𝑓(0.625) = 0.625 − ⅇ −0.625 = 0.0897 > 0

0.5 + 0.625
𝑥3 = = 0.5625
2
𝑓(𝑥3 ) = 𝑓(0.5625) = 0.5625 − ⅇ −0.5625 = −0.0073 < 0

0.5625 + 0.625
𝑥4 = = 0.5938
2
𝑓(𝑥4 ) = 𝑓(0.5938) = 0.5938 − ⅇ −0.5938 = 0.0415 > 0

0.5625 + 0.5938
𝑥5 = = 0.5781
2
𝑓(𝑥5 ) = 𝑓(0.5781) = 0.5781 − ⅇ −0.5781 = 0.0172 > 0

0.5625 + 0.5781
𝑥6 = = 0.5703
2
𝑓(𝑥6 ) = 𝑓(0.5703) = 0.5703 − ⅇ −0.5703 = 0.005 > 0
0.5625 + 0.5703
𝑥7 = = 0.5664
2
𝑓(𝑥7 ) = 𝑓(0.5664) = 0.5664 − ⅇ −0.5664 = −0.0012 < 0

0.5664 + 0.5703
𝑥8 = = 0.5684
2
𝑓(𝑥8 ) = 𝑓(0.5684) = 0.5684 − ⅇ −0.5684 = 0.0019 > 0

0.5664 + 0.5684
𝑥9 = = 0.5674
2
𝑓(𝑥9 ) = 𝑓(0.5674) = 0.5674 − ⅇ −0.5674 = 0.0004 > 0

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


1 0 -1 1 0.6321 0.5 -0.1065
2 0.5 -0.1065 1 0.6321 0.75 0.2776
3 0.5 -0.1065 0.75 0.2776 0.625 0.0897
4 0.5 -0.1065 0.625 0.0897 0.5625 -0.0073
5 0.5625 -0.0073 0.625 0.0897 0.5938 0.0415
6 0.5625 -0.0073 0.5938 0.0415 0.5781 0.0172
7 0.5625 -0.0073 0.5781 0.0172 0.5703 0.005
8 0.5625 -0.0073 0.5703 0.005 0.5664 -0.0012
9 0.5664 -0.0012 0.5703 0.005 0.5684 0.0019
10 0.5664 -0.0012 0.5684 0.0019 0.5674 0.0004

0.5674 final answer

c) 𝑓(𝑥) = 𝑐𝑜𝑠𝑥 − 𝑥ⅇ 𝑥
Let 𝑓(𝑥) = cos⁡(𝑥) − 𝑥ⅇ 𝑥

x 0 1
f(x) 1 -2.178
0+1
𝑥0 = = 0.5
2
𝑓(𝑥0 ) = 𝑓(0.5) = cos⁡(0.5) − 0.5ⅇ 0.5 = 0.0532 > 0

0.5 + 1
𝑥1 = = 0.75
2
𝑓(𝑥1 ) = 𝑓(0.75) = cos⁡(0.75) − 0.75ⅇ 0.75 = −0.8561 < 0
0.5 + 0.75
𝑥2 = = 0.625
2
𝑓(𝑥2 ) = 𝑓(0.625) = cos⁡(0.625) − 0.625ⅇ 0.625 = −0.3567 < 0

0.5 + 0.625
𝑥3 = = 0.5625
2
𝑓(𝑥3 ) = 𝑓(0.5625) = cos⁡(0.5625) − 0.5625ⅇ 0.5625 = −0.1413 < 0

0.5 + 0.5625
𝑥4 = = 0.5312
2
𝑓(𝑥4 ) = 𝑓(0.5312) = cos⁡(0.5312) − 0.5312ⅇ 0.5312 = −0.0415 < 0

0.5 + 0.5312
𝑥5 = = 0.5156
2
𝑓(𝑥5 ) = 𝑓(0.5156) = cos⁡(0.5156) − 0.5156ⅇ 0.5156 = 0.0065 > 0

0.5156 + 0.5312
𝑥6 = = 0.5234
2
𝑓(𝑥6 ) = 𝑓(0.5234) = cos⁡(0.5234) − 0.5234ⅇ 0.5234 = −0.0174 < 0

0.5156 + 0.5234
𝑥7 = = 0.5195
2
𝑓(𝑥7 ) = 𝑓(0.5195) = cos⁡(0.5195) − 0.5195ⅇ 0.5195 = −0.0054 < 0

0.5156 + 0.5195
𝑥8 = = 0.5176
2
𝑓(𝑥8 ) = 𝑓(0.5176) = cos⁡(0.5176) − 0.5176ⅇ 0.5176 = 0.0005 > 0

0.5176 + 0.5195
𝑥9 = = 0.5186
2
𝑓(𝑥9 ) = 𝑓(0.5186) = cos⁡(0.5186) − 0.5186ⅇ 0.5186 = −0.0024 < 0

0.5176 + 0.5186
𝑥10 = = 0.5181
2
𝑓(𝑥10 ) = 𝑓(0.5181) = cos⁡(0.5181) − 0.5181ⅇ 0.5181 = −0.0009 < 0

Ans = 0.518
n a f(a) b f(b) c=a+b2 f(c)
1 0 1 1 -2.178 0.5 0.0532
2 0.5 0.0532 1 -2.178 0.75 -0.8561
3 0.5 0.0532 0.75 -0.8561 0.625 -0.3567
4 0.5 0.0532 0.625 -0.3567 0.5625 -0.1413
5 0.5 0.0532 0.5625 -0.1413 0.5312 -0.0415
6 0.5 0.0532 0.5312 -0.0415 0.5156 0.0065
7 0.5156 0.0065 0.5312 -0.0415 0.5234 -0.0174
8 0.5156 0.0065 0.5234 -0.0174 0.5195 -0.0054
9 0.5156 0.0065 0.5195 -0.0054 0.5176 0.0005
10 0.5176 0.0005 0.5195 -0.0054 0.5186 -0.0024
11 0.5176 0.0005 0.5186 -0.0024 0.5181 -0.0009

.
d) 𝑥 4 − x − 10 = 0
1+2
𝑥0 = = 1.5
2
𝑓(𝑥0 ) = 𝑓(1.5) = 1.54 − 1.5 − 10 = −6.4375 < 0

1.5 + 2
𝑥1 = = 1.75
2
𝑓(𝑥1 ) = 𝑓(1.75) = 1.754 − 1.75 − 10 = −2.3711 < 0

1.75 + 2
𝑥2 = = 1.875
2
𝑓(𝑥2 ) = 𝑓(1.875) = 1.8754 − 1.875 − 10 = 0.4846 > 0

1.75 + 1.875
𝑥3 = = 1.8125
2
𝑓(𝑥3 ) = 𝑓(1.8125) = 1.81254 − 1.8125 − 10 = −1.0202 < 0

1.8125 + 1.875
𝑥4 = = 1.8438
2
𝑓(𝑥4 ) = 𝑓(1.8438) = 1.84384 − 1.8438 − 10 = −0.2877 < 0

1.8438 + 1.875
𝑥5 = = 1.8594
2
𝑓(𝑥5 ) = 𝑓(1.8594) = 1.85944 − 1.8594 − 10 = 0.0934 > 0

1.8438 + 1.8594
𝑥6 = = 1.8516
2
𝑓(𝑥6 ) = 𝑓(1.8516) = 1.85164 − 1.8516 − 10 = −0.0984 < 0
1.8516 + 1.8594
𝑥7 = = 1.8555
2
𝑓(𝑥7 ) = 𝑓(1.8555) = 1.85554 − 1.8555 − 10 = −0.0028 < 0

1.8555 + 1.8594
𝑥8 = = 1.8574
2
𝑓(𝑥8 ) = 𝑓(1.8574) = 1.85744 − 1.8574 − 10 = 0.0452 > 0

1.8555 + 1.8574
𝑥9 = = 1.8564
2
𝑓(𝑥9 ) = 𝑓(1.8564) = 1.85644 − 1.8564 − 10 = 0.0212 > 0

1.8555 + 1.8564
𝑥10 = = 1.856
2
𝑓(𝑥10 ) = 𝑓(1.856) = 1.8564 − 1.856 − 10 = 0.0092 > 0

1.8555 + 1.856
𝑥11 = = 1.8557
2
𝑓(𝑥11 ) = 𝑓(1.8557) = 1.85574 − 1.8557 − 10 = 0.0032 > 0

1.8555 + 1.8557
𝑥12 = = 1.8556
2
𝑓(𝑥12 ) = 𝑓(1.8556) = 1.85564 − 1.8556 − 10 = 0.0002 > 0

Ans = 1.855

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


1 1 -10 2 4 1.5 -6.4375
2 1.5 -6.4375 2 4 1.75 -2.3711
3 1.75 -2.3711 2 4 1.875 0.4846
4 1.75 -2.3711 1.875 0.4846 1.8125 -1.0202
5 1.8125 -1.0202 1.875 0.4846 1.8438 -0.2877
6 1.8438 -0.2877 1.875 0.4846 1.8594 0.0934
7 1.8438 -0.2877 1.8594 0.0934 1.8516 -0.0984
8 1.8516 -0.0984 1.8594 0.0934 1.8555 -0.0028
9 1.8555 -0.0028 1.8594 0.0934 1.8574 0.0452
10 1.8555 -0.0028 1.8574 0.0452 1.8564 0.0212
11 1.8555 -0.0028 1.8564 0.0212 1.856 0.0092
12 1.8555 -0.0028 1.856 0.0092 1.8557 0.0032
13 1.8555 -0.0028 1.8557 0.0032 1.8556 0.0002
Activity 5

a) ⅇ −𝑥 − 3logx = 0
0+1
𝑥0 = = 0.5
2
𝑓(𝑥0 ) = 𝑓(0.5) = ⅇ −0.5 − 3log⁡(0.5) = 1.5096 > 0

0 + 0.5
𝑥1 = = 0.25
2
𝑓(𝑥1 ) = 𝑓(0.25) = ⅇ −0.25 − 3log⁡(0.25) = 2.585 > 0

0 + 0.25
𝑥2 = = 0.125
2
𝑓(𝑥2 ) = 𝑓(0.125) = ⅇ −0.125 − 3log⁡(0.125) = 3.5918 > 0

0 + 0.125
𝑥3 = = 0.0625
2
𝑓(𝑥3 ) = 𝑓(0.0625) = ⅇ −0.0625 − 3log⁡(0.0625) = 4.5518 > 0

0 + 0.0625
𝑥4 = = 0.0312
2
𝑓(𝑥4 ) = 𝑓(0.0312) = ⅇ −0.0312 − 3log⁡(0.0312) = 5.4847 > 0

0 + 0.0312
𝑥5 = = 0.0156
2
𝑓(𝑥5 ) = 𝑓(0.0156) = ⅇ −0.0156 − 3log⁡(0.0156) = 6.403 > 0

0 + 0.0156
𝑥6 = = 0.0078
2
𝑓(𝑥6 ) = 𝑓(0.0078) = ⅇ −0.0078 − 3log⁡(0.0078) = 7.3138 > 0

0 + 0.0078
𝑥7 = = 0.0039
2
𝑓(𝑥7 ) = 𝑓(0.0039) = ⅇ −0.0039 − 3log⁡(0.0039) = 8.2208 > 0

0 + 0.0039
𝑥8 = = 0.002
2
𝑓(𝑥8 ) = 𝑓(0.002) = ⅇ −0.002 − 3log⁡(0.002) = 9.1259 > 0

0 + 0.002
𝑥9 = = 0.001
2
𝑓(𝑥9 ) = 𝑓(0.001) = ⅇ −0.001 − 3log⁡(0.001) = 10.0299 > 0
0 + 0.001
𝑥10 = = 0.0005
2
𝑓(𝑥10 ) = 𝑓(0.0005) = ⅇ −0.0005 − 3log⁡(0.0005) = 10.9335 > 0

0 + 0.0005
𝑥11 = = 0.0002
2
𝑓(𝑥11 ) = 𝑓(0.0002) = ⅇ −0.0002 − 3log⁡(0.0002) = 11.8368 > 0

0 + 0.0002
𝑥12 = = 0.0001
2
𝑓(𝑥12 ) = 𝑓(0.0001) = ⅇ 0 − 3log⁡(0) = 12.74 > 0

0 + 0.0001
𝑥13 = = 0.0001
2
𝑓(𝑥13 ) = 𝑓(0.0001) = ⅇ 0 − 3log⁡(0) = 13.6432 > 0

0 + 0.0001
𝑥14 = =0
2
𝑓(𝑥14 ) = 𝑓(0) = ⅇ 0 − 3log⁡(0) = 14.5463 > 0

0+0
𝑥15 = =0
2
𝑓(𝑥15 ) = 𝑓(0) = ⅇ 0 − 3log⁡(0) = 15.4494 > 0

0+0
𝑥16 = =0
2
𝑓(𝑥16 ) = 𝑓(0) = ⅇ 0 − 3log⁡(0) = 16.3525 > 0

0+0
𝑥17 = =0
2
𝑓(𝑥17 ) = 𝑓(0) = ⅇ 0 − 3log⁡(0) = 17.2556 > 0

0+0
𝑥18 = =0
2
𝑓(𝑥18 ) = 𝑓(0) = ⅇ 0 − 3log⁡(0) = 18.1587 > 0

0+0
𝑥19 = =0
2
𝑓(𝑥19 ) = 𝑓(0) = ⅇ 0 − 3log⁡(0) = 19.0618 > 0

0+0
𝑥20 = =0
2
𝑓(𝑥20 ) = 𝑓(0) = ⅇ 0 − 3log⁡(0) = 19.9649 > 0

0+0
𝑥21 = =0
2
𝑓(𝑥21 ) = 𝑓(0) = ⅇ 0 − 3log⁡(0) = 20.868 > 0
0+0
𝑥22 = =0
2
𝑓(𝑥22 ) = 𝑓(0) = ⅇ 0 − 3log⁡(0) = 21.7711 > 0

0+0
𝑥23 = =0
2
𝑓(𝑥23 ) = 𝑓(0) = ⅇ 0 − 3log⁡(0) = 22.6742 > 0

0+0
𝑥24 = =0
2
𝑓(𝑥24 ) = 𝑓(0) = ⅇ 0 − 3log⁡(0) = 23.5772 > 0

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


1 0 "Undefined" 1 0.3679 0.5 1.5096
2 0 "Undefined" 0.5 1.5096 0.25 2.585
3 0 "Undefined" 0.25 2.585 0.125 3.5918
4 0 "Undefined" 0.125 3.5918 0.0625 4.5518
5 0 "Undefined" 0.0625 4.5518 0.0312 5.4847
6 0 "Undefined" 0.0312 5.4847 0.0156 6.403
7 0 "Undefined" 0.0156 6.403 0.0078 7.3138
8 0 "Undefined" 0.0078 7.3138 0.0039 8.2208
9 0 "Undefined" 0.0039 8.2208 0.002 9.1259
10 0 "Undefined" 0.002 9.1259 0.001 10.0299
11 0 "Undefined" 0.001 10.0299 0.0005 10.9335
12 0 "Undefined" 0.0005 10.9335 0.0002 11.8368
13 0 "Undefined" 0.0002 11.8368 0.0001 12.74
14 0 "Undefined" 0.0001 12.74 0.0001 13.6432
15 0 "Undefined" 0.0001 13.6432 0 14.5463
16 0 "Undefined" 0 14.5463 0 15.4494
17 0 "Undefined" 0 15.4494 0 16.3525
18 0 "Undefined" 0 16.3525 0 17.2556
19 0 "Undefined" 0 17.2556 0 18.1587
20 0 "Undefined" 0 18.1587 0 19.0618
21 0 "Undefined" 0 19.0618 0 19.9649
22 0 "Undefined" 0 19.9649 0 20.868
23 0 "Undefined" 0 20.868 0 21.7711
24 0 "Undefined" 0 21.7711 0 22.6742
b) f(x) = ⅇ −𝑥 (𝑥 2 − 5𝑥 + 2)
0+1
𝑥0 = = 0.5
2
𝑓(𝑥0 ) = 𝑓(0.5) = ⅇ −0.5 (0.52 − 5 ⋅ 0.5 + 2) = −0.1516 < 0

0 + 0.5
𝑥1 = = 0.25
2
𝑓(𝑥1 ) = 𝑓(0.25) = ⅇ −0.25 (0.252 − 5 ⋅ 0.25 + 2) = 0.6328 > 0

0.25 + 0.5
𝑥2 = = 0.375
2
𝑓(𝑥2 ) = 𝑓(0.375) = ⅇ −0.375 (0.3752 − 5 ⋅ 0.375 + 2) = 0.1826 > 0

0.375 + 0.5
𝑥3 = = 0.4375
2
𝑓(𝑥3 ) = 𝑓(0.4375) = ⅇ −0.4375 (0.43752 − 5 ⋅ 0.4375 + 2) = 0.0025 > 0

0.4375 + 0.5
𝑥4 = = 0.4688
2
𝑓(𝑥4 ) = 𝑓(0.4688) = ⅇ −0.4688 (0.46882 − 5 ⋅ 0.4688 + 2) = −0.0776 < 0

0.4375 + 0.4688
𝑥5 = = 0.4531
2
𝑓(𝑥5 ) = 𝑓(0.4531) = ⅇ −0.4531 (0.45312 − 5 ⋅ 0.4531 + 2) = −0.0383 < 0

0.4375 + 0.4531
𝑥6 = = 0.4453
2
𝑓(𝑥6 ) = 𝑓(0.4453) = ⅇ −0.4453 (0.44532 − 5 ⋅ 0.4453 + 2) = −0.0181 < 0

0.4375 + 0.4453
𝑥7 = = 0.4414
2
𝑓(𝑥7 ) = 𝑓(0.4414) = ⅇ −0.4414 (0.44142 − 5 ⋅ 0.4414 + 2) = −0.0078 < 0

0.4375 + 0.4414
𝑥8 = = 0.4395
2
𝑓(𝑥8 ) = 𝑓(0.4395) = ⅇ −0.4395 (0.43952 − 5 ⋅ 0.4395 + 2) = −0.0027 < 0

0.4375 + 0.4395
𝑥9 = = 0.4385
2
𝑓(𝑥9 ) = 𝑓(0.4385) = ⅇ −0.4385 (0.43852 − 5 ⋅ 0.4385 + 2) = 0 < 0
n a f(a) b f(b) c=a+b2 f(c)
1 0 2 1 -0.7358 0.5 -0.1516
2 0 2 0.5 -0.1516 0.25 0.6328
3 0.25 0.6328 0.5 -0.1516 0.375 0.1826
4 0.375 0.1826 0.5 -0.1516 0.4375 0.0025
5 0.4375 0.0025 0.5 -0.1516 0.4688 -0.0776
6 0.4375 0.0025 0.4688 -0.0776 0.4531 -0.0383
7 0.4375 0.0025 0.4531 -0.0383 0.4453 -0.0181
8 0.4375 0.0025 0.4453 -0.0181 0.4414 -0.0078
9 0.4375 0.0025 0.4414 -0.0078 0.4395 -0.0027
10 0.4375 0.0025 0.4395 -0.0027 0.4385 0

Ans = 0.4385

You might also like