Syntax: " (" Cannot Be Followed by "0, 1) "
Syntax: " (" Cannot Be Followed by "0, 1) "
Syntax: " (" Cannot Be Followed by "0, 1) "
In[9]:=
In[10]:= Q. 1 Use the Bisection method upto 15 iterations to obtain the root of the equation log (1 + x) -
cos (x) = 0 in the interval (0, 1)
-4 -2 2 4
Out[11]=
-2
-4
-6
2
i ai bi ci f [ci ]
0 0. 1. 0.5 - 0.4721175
1 0.5 1. 0.75 - 0.1720731
2 0.75 1. 0.875 - 0.0123882
3 0.875 1. 0.9375 0.06959341
4 0.875 0.9375 0.90625 0.0284359
5 0.875 0.90625 0.890625 0.007981228
6 0.875 0.890625 0.8828125 - 0.002214254
7 0.8828125 0.890625 0.8867188 0.002880809
8 0.8828125 0.8867188 0.8847656 0.0003326059
9 0.8828125 0.8847656 0.8837891 - 0.0009409923
10 0.8837891 0.8847656 0.8842773 - 0.0003042352
11 0.8842773 0.8847656 0.8845215 0.00001417485
12 0.8842773 0.8845215 0.8843994 - 0.0001450328
13 0.8843994 0.8845215 0.8844604 - 0.00006542963
14 0.8844604 0.8845215 0.884491 - 0.00002562756
15 0.884491 0.8845215 0.8845062 - 5.726396 × 10 -6
In[13]:=
In[14]:= Q .2 Use the Bisection method upto 20 iterations to obtain the root of the equation f (x) =
x3 - 17 = 0 in the interval (2, 3)
In[14]:= f[x_ ] := x3 - 17
Plot [f[x], {x, - 5, 5}]
BM [2, 3, 20, f]
100
50
Out[15]=
-4 -2 2 4
-50
-100
-150
3
i ai bi ci f [ci ]
0 2. 3. 2.5 - 1.375
1 2.5 3. 2.75 3.796875
2 2.5 2.75 2.625 1.087891
3 2.5 2.625 2.5625 - 0.173584
4 2.5625 2.625 2.59375 0.4495544
5 2.5625 2.59375 2.578125 0.136097
6 2.5625 2.578125 2.570313 - 0.01921415
7 2.570313 2.578125 2.574219 0.05832356
8 2.570313 2.574219 2.572266 0.01952527
9 2.570313 2.572266 2.571289 0.0001482004
10 2.570313 2.571289 2.570801 - 0.009534815
11 2.570801 2.571289 2.571045 - 0.004693767
12 2.571045 2.571289 2.571167 - 0.002272898
13 2.571167 2.571289 2.571228 - 0.001062378
14 2.571228 2.571289 2.571259 - 0.0004570958
15 2.571259 2.571289 2.571274 - 0.0001544495
16 2.571274 2.571289 2.571281 - 3.124975 × 10 -6
17 2.571281 2.571289 2.571285 0.00007253762
18 2.571281 2.571285 2.571283 0.00003470629
19 2.571281 2.571283 2.571282 0.00001579065
20 2.571281 2.571282 2.571282 6.332837 × 10 -6
In[17]:= Q. 3 Use the Bisection method upto 20 iterations to obtain the root of the equation f (x) =
x5 + 2 x - 1 = 0 in the interval (0, 1)
In[17]:= f[x_ ] := x5 + 2 x - 1
Plot [f[x], {x, - 5, 5}]
BM [0, 1, 20, f]
1500
1000
500
Out[18]=
-4 -2 2 4
-500
-1000
-1500
4
i ai bi ci f [ci ]
0 0. 1. 0.5 0.03125
1 0. 0.5 0.25 - 0.4990234
2 0.25 0.5 0.375 - 0.2425842
3 0.375 0.5 0.4375 - 0.1089716
4 0.4375 0.5 0.46875 - 0.03986886
5 0.46875 0.5 0.484375 - 0.004587025
6 0.484375 0.5 0.4921875 0.0132587
7 0.484375 0.4921875 0.4882813 0.004318076
8 0.484375 0.4882813 0.4863281 - 0.0001388627
9 0.4863281 0.4882813 0.4873047 0.002088503
10 0.4863281 0.4873047 0.4868164 0.000974545
11 0.4863281 0.4868164 0.4865723 0.0004177725
12 0.4863281 0.4865723 0.4864502 0.0001394377
13 0.4863281 0.4864502 0.4863892 2.832053 × 10 -7
14 0.4863281 0.4863892 0.4863586 - 0.00006929084
15 0.4863586 0.4863892 0.4863739 - 0.00003450408
16 0.4863739 0.4863892 0.4863815 - 0.00001711051
17 0.4863815 0.4863892 0.4863853 - 8.413667 × 10 -6
18 0.4863853 0.4863892 0.4863873 - 4.065235 × 10 -6
19 0.4863873 0.4863892 0.4863882 - 1.891016 × 10 -6
20 0.4863882 0.4863892 0.4863887 - 8.039056 × 10 -7
In[20]:= Q. 4 Use the Bisection method upto 20 iterations to obtain the root of the equation x ^ 3 -
4 x - 9 = 0 in the interval (0, 4)
In[20]:= f[x_ ] := x ^ 3 - 4 x - 9
Plot [f[x], {x, - 5, 5}]
BM [0, 4, 20, f]
60
40
20
-4 -2 2 4
Out[21]=
-20
-40
-60
-80
5
i ai bi ci f [ci ]
0 0. 4. 2. - 9.
1 2. 4. 3. 6.
2 2. 3. 2.5 - 3.375
3 2.5 3. 2.75 0.796875
4 2.5 2.75 2.625 - 1.412109
5 2.625 2.75 2.6875 - 0.3391113
6 2.6875 2.75 2.71875 0.2209167
7 2.6875 2.71875 2.703125 - 0.06107712
8 2.703125 2.71875 2.710938 0.07942343
9 2.703125 2.710938 2.707031 0.009049237
10 2.703125 2.707031 2.705078 - 0.0260449
11 2.705078 2.707031 2.706055 - 0.008505573
12 2.706055 2.707031 2.706543 0.0002698962
13 2.706055 2.706543 2.706299 - 0.004118322
14 2.706299 2.706543 2.706421 - 0.001924334
15 2.706421 2.706543 2.706482 - 0.0008272491
16 2.706482 2.706543 2.706512 - 0.000278684
17 2.706512 2.706543 2.706528 - 4.395767 × 10 -6
18 2.706528 2.706543 2.706535 0.0001327498
19 2.706528 2.706535 2.706532 0.00006417688
20 2.706528 2.706532 2.70653 0.00002989053
Out[30]=
-1 1 2 3 4 5
-1
6
i ai bi ci f [ci ]
0 0. 4. 2. - 0.59794
1 0. 4. 2. - 0.59794
2 0. 4. 2. - 0.59794
3 0. 4. 2. - 0.59794
4 0. 4. 2. - 0.59794
5 0. 4. 2. - 0.59794
6 0. 4. 2. - 0.59794
7 0. 4. 2. - 0.59794
8 0. 4. 2. - 0.59794
9 0. 4. 2. - 0.59794
10 0. 4. 2. - 0.59794
11 0. 4. 2. - 0.59794
12 0. 4. 2. - 0.59794
13 0. 4. 2. - 0.59794
14 0. 4. 2. - 0.59794
15 0. 4. 2. - 0.59794
In[26]:= Q .6 Use the Bisection method upto 15 iterations to obtain the root of the equation x -
cos (x) = 0 in the interval (0, 2)
Out[27]= -4 -2 2 4
-2
-4
7
i ai bi ci f [ci ]
0 0. 2. 1. 0.4596977
1 0. 1. 0.5 - 0.3775826
2 0.5 1. 0.75 0.01831113
3 0.5 0.75 0.625 - 0.1859631
4 0.625 0.75 0.6875 - 0.08533495
5 0.6875 0.75 0.71875 - 0.03387937
6 0.71875 0.75 0.734375 - 0.007874725
7 0.734375 0.75 0.7421875 0.005195712
8 0.734375 0.7421875 0.7382813 - 0.00134515
9 0.7382813 0.7421875 0.7402344 0.001923873
10 0.7382813 0.7402344 0.7392578 0.0002890091
11 0.7382813 0.7392578 0.7387695 - 0.0005281584
12 0.7387695 0.7392578 0.7390137 - 0.0001195967
13 0.7390137 0.7392578 0.7391357 0.00008470073
14 0.7390137 0.7391357 0.7390747 - 0.00001744935
15 0.7390747 0.7391357 0.7391052 0.00003362535
Q. 7 Use the Bisection method upto 15 iterations to obtain the root of the equation e ^ x - 3 x =
0 in the interval (0, 1)
In[32]:= f[x_ ] := E ^ x - 3 x
Plot [f[x], {x, - 5, 5}]
BM [0, 1, 15, f]
30
20
Out[33]=
10
-4 -2 2 4
8
i ai bi ci f [ci ]
0 0. 1. 0.5 0.1487213
1 0.5 1. 0.75 - 0.133
2 0.5 0.75 0.625 - 0.006754043
3 0.5 0.625 0.5625 0.06755466
4 0.5625 0.625 0.59375 0.02951607
5 0.59375 0.625 0.609375 0.01115649
6 0.609375 0.625 0.6171875 0.002144652
7 0.6171875 0.625 0.6210938 - 0.002318893
8 0.6171875 0.6210938 0.6191406 - 0.0000906632
9 0.6171875 0.6191406 0.6181641 0.00102611
10 0.6181641 0.6191406 0.6186523 0.0004675019
11 0.6186523 0.6191406 0.6188965 0.000188364
12 0.6188965 0.6191406 0.6190186 0.00004883657
13 0.6190186 0.6191406 0.6190796 - 0.00002091678
14 0.6190186 0.6190796 0.6190491 0.00001395903
15 0.6190491 0.6190796 0.6190643 - 3.479088 × 10 -6
Q. 8 Use the Bisection method upto 15 iterations to obtain the root of the equation sin (x) -
1 / x = 0 in the interval (- 2, - 0.5 )
Out[39]=
-4 -2 2 4
-2
-4
9
i ai bi ci f [ci ]
0 - 2. - 0.5 - 1.25 - 0.1489846
1 - 1.25 - 0.5 - 0.875 0.3753136
2 - 1.25 - 0.875 - 1.0625 0.06760154
3 - 1.25 - 1.0625 - 1.15625 - 0.05043428
4 - 1.15625 - 1.0625 - 1.109375 0.005987853
5 - 1.15625 - 1.109375 - 1.132813 - 0.02284997
6 - 1.132813 - 1.109375 - 1.121094 - 0.008590369
7 - 1.121094 - 1.109375 - 1.115234 - 0.001341425
8 - 1.115234 - 1.109375 - 1.112305 0.002313129
9 - 1.115234 - 1.112305 - 1.11377 0.0004833358
10 - 1.115234 - 1.11377 - 1.114502 - 0.000429673
11 - 1.114502 - 1.11377 - 1.114136 0.00002667424
12 - 1.114502 - 1.114136 - 1.114319 - 0.0002015387
13 - 1.114319 - 1.114136 - 1.114227 - 0.00008744204
14 - 1.114227 - 1.114136 - 1.114182 - 0.00003038636
15 - 1.114182 - 1.114136 - 1.114159 - 1.856675 × 10 -6
Q. 8 Use the Bisection method upto 15 iterations to obtain the root of the equation cos (x) -
xe ^ x = 0 in the interval (- 3, - 1)
-2 -1 1 2 3 4 5
-100
-200
Out[45]=
-300
-400
10
i ai bi ci f [ci ]
0 - 3. - 1. - 2. - 0.1454763
1 - 2. - 1. - 1.5 0.4054324
2 - 2. - 1.5 - 1.75 0.1258583
3 - 2. - 1.75 - 1.875 - 0.01199294
4 - 1.875 - 1.75 - 1.8125 0.05652537
5 - 1.875 - 1.8125 - 1.84375 0.02214668
6 - 1.875 - 1.84375 - 1.859375 0.005044803
7 - 1.875 - 1.859375 - 1.867188 - 0.003482357
8 - 1.867188 - 1.859375 - 1.863281 0.0007791853
9 - 1.867188 - 1.863281 - 1.865234 - 0.001352099
10 - 1.865234 - 1.863281 - 1.864258 - 0.000286585
11 - 1.864258 - 1.863281 - 1.86377 0.0002462682
12 - 1.864258 - 1.86377 - 1.864014 - 0.00002016639
13 - 1.864014 - 1.86377 - 1.863892 0.0001130489
14 - 1.864014 - 1.863892 - 1.863953 0.00004644077
15 - 1.864014 - 1.863953 - 1.863983 0.00001313706