Professional Documents
Culture Documents
Exercise 11.1: Bisection Method
Exercise 11.1: Bisection Method
Exercise 11.1: Bisection Method
1
Chapter 11
First iteration f a0 . f b0 0
Sol: Given f x x 10 x 23............. 1
2
a bo f ao then find f co
co ao o
f ao f bo Put x 0 in equation (1) we get
f 0 0 10 0 23
2
Check
Either Or f 0 23 0
f a0 . f c0 0 f c0 . f b0 0 Put x 1 in equation (1) we get
Update f 1 1 10 1 23
2
ao a1 and c0 b1 co a1 and bo b1
f 1 1 10 23
Continuing in this manner
Newton Raphson’s Method f 1 14 0
f xi Put x 2 in equation (1) we get
xi 1 xi i 0,1, 2,3,...
f xi f 2 2 10 2 23
2
f x1
x2 x11 x1 f 3 9 30 23
f x1
f 3 2 0
Continuing in this manner
Put x 4 in equation (1) we get
Exercise 11.1 f 4 4 10 4 23
2
Khalid Mehmood Lect: GDC Shah Essa Bilot Available at http://www.MathCity.org Page 235
Exercise 11.1
Chapter 11
Sol: Given f x e 2 x.................. 1 Put x 1.15 in equation (1) we get
x
Khalid Mehmood Lect: GDC Shah Essa Bilot Available at http://www.MathCity.org Page 236
Exercise 11.1
Chapter 11
f 1.3 cos 1.3 1 1.3 0.0325 0 So the actual roots is lie in the interval 3.4,3.6
Therefore f 1.2 0, f 1.3 0 , f 1.4 0 Update a2 3.4, b2 3.6
So the actual roots is lie in the interval 1.2,1.3 Then c2
a2 b2
putting the values
Update a3 1.2, b3 1.3 2
3.4 3.6 7
a b3
Then c3 3 putting the values c2
2
2 2
1.2 1.3 2.5 c2 3.5
c3 Fourth Iteration: Put x 1.1 in equation (1)
2 2
f 3.5 3.5 10 3.5 23
2
c3 1.25
Put x 1.25 in equation (1) we get f 3.5 0.25 0
f 1.25 cos 1.25 1 1.25 Therefore f 3.4 0, f 3.5 0, f 3.6 0
f 1.25 0.0653 0 Update a3 3.5, b3 3.6
Therefore f 1.2 0, f 1.25 0, f 1.3 0 So the actual roots is lie in the interval 3.5,3.6
So the actual roots is lie in the interval 1.25,1.3 a3 b3
Then c3 putting the values
Update a4 1.25, b4 1.3 2
3.5 3.6 7.1
c). f x x 10 x 23
2
3.2, 4 c3
2 2
Sol: Given f x x 10 x 23............. 1
2
c3 3.55
First Iteration: Here a0 3.2, b0 4 Put x 3.55 in equation (1) we get
Put x 3.2 in equation (1) we get f 3.55 3.55 10 3.55 23
2
Update a1 3.2, b1 3.6 So the actual roots is lie in interval 2.4, 1.6
Then co ao o
a1 b1 a bo f ao
Then c1 putting the values putting the values
2 f ao f bo
c1
3.2 3.6 6.8
co 2.4
2.4 1.6 0.4907
2 2 0.4907 0.1981
c1 3.4
co 2.4
2.4 1.6 0.4907
Third Iteration: Put x 3.4 in equation (1) we get
0.4907 0.1981
f 3.4 3.4 10 3.4 23 0.56 0
2
Khalid Mehmood Lect: GDC Shah Essa Bilot Available at http://www.MathCity.org Page 237
Exercise 11.1
Chapter 11
co 2.4
0.8 0.4907
c3 2.4
2.4 1.8414 0.4907
0.6888
0.4907 0.0000048
co 2.4 0.5699
co 1.8300 c3 2.4
2.4 1.8414 0.4907
Second Iteration: Put x 1.8300 in eq (1) we get 0.4907 0.0000048
f 1.8300 e 1.8300
2 1.8300 c3 2.4
0.5586 0.4907
f 1.8300 0.0096 0
0.4907048
c3 2.4 0.5586
f 2.4 0, f 1.8300 0 , f 1.6 0
c3 1.8414
So actual roots is lie in interval 2.4, 1.8300 Put x 1.8414 in equation (1) we get
Update a1 2.4, b1 1.8300 f 1.8414 e 1.8414 2 1.8414
Then c1 a1
a1 b1 f a1 putting the values f 1.8414 0.0000048 0
f a1 f b1 f 2.4 0, f 1.8414 0 , f 1.8414 0
c1 2.4
2.4 1.8300 0.4907 So actual roots is lie in interval 2.4, 1.8414
0.4907 0.0096
Update a4 2.4, b4 1.8414
c 2.4
2.4 1.8300 0.4907 b). f x cos x 1 x 0.8,1.6 x is in radians
0.4907 0.0096
1
0.71736
c2 2.4
0.5591 0.4907 co 0.8
1.5259
0.49113
co 0.8 0.4701
c2 2.4 0.5586
co 1.2701
c2 1.8414
Second Iteration: Put x 1.2701 in equation (1)
Fourth Iteration: Put x 1.8414 in eq (1) we get
f 1.2701 cos 1.2701 1 1.2701
f 1.8414 e 1.8414 2 1.8414
f 1.2701 0.0261 0
f 1.8414 0.0000048 0
Therefore f 0.8 0, f 1.2701 0,
f 2.4 0, f 1.8414 0 f 1.8409 0
f 1.6 0
So actual roots is lie in interval 2.4, 1.8414
So the actual roots is lie in interval 1.2701,1.6
Update a3 2.4, b3 1.8414
Update a1 1.2701, b1 1.6
a b f a3
Then c3 a3 3 3
f a3 f b3
putting the values
Then c1 a1
a1 b1 f a1 putting the values
f a1 f b1
Khalid Mehmood Lect: GDC Shah Essa Bilot Available at http://www.MathCity.org Page 238
Exercise 11.1
Chapter 11
c1 1.2701
1.2701 1.6 0.0261 Update a4 1.2834, b4 1.6
0.0261 0.6292 c). f x x 10 x 23
2
3.2, 4
c1 1.2701
0.3299 0.0261 Sol: Given f x x 10 x 23............... 1
2
c1 1.2701 0.0131
c1 1.2832 f 3.2 1.24 0
Third Iteration: Put x 1.2832 in equation (1) Put x 4 in equation (1) we get
f 4 4 10 4 23
2
f 1.2832 cos 1.2832 1 1.2832
f 1.2832 0.000448 0 f 4 1 0
So the actual roots is lie in interval 1.2832,1.6 So the actual roots is lie in the interval 3.2, 4
c3 1.2834
3.3166 0.0000563
0.0000563 0.6292
0.549196
c1 3.2
0.0000178 1.3983
c3 1.2834 c1 3.2 0.3928
0.6292563
c3 1.2834 0.0000283 c1 3.5928
c3 1.2834283 Third Iteration: Put x 3.5928 in equation (1)
Put x 1.2834 in equation (1) we get f 3.5928 3.5928 10 3.5928 23
2
Khalid Mehmood Lect: GDC Shah Essa Bilot Available at http://www.MathCity.org Page 239
Exercise 11.1
Chapter 11
Then c2 a2
a2 b2 f a2 putting the values Putting the value of f x and f x we have
f a2 f b2 xi2 2 xi 1
xi 1 xi .......................................... A
c2 3.2
3.2 3.59281.24 2 xi 2
1.24 0.0198 For First iteration put i 0 in equation (A), we get
3.39281.24 x02 2 x0 1
c2 3.2 x01 x0 Put xo 2.5
1.24 0.0198 2 x0 2
2.5 2 2.5 1
2
0.4871
c2 3.2 x1 2.5
1.2598 2 2.5 2
c2 3.2 0.3866
6.25 5 1
c2 3.5866 x1 2.5
52
Fourth Iteration: Put x 3.5866 in equation (1) 0.25
f 3.5866 6.5866 10 3.5866 23
2 x1 2.5
3
f 3.5866 0.0023 0 x1 2.5 0.0833333
x1 2.4166667
f 3.2 0, f 3.5866 0 , f 3.5928 0
For Second iteration put i 1 in equation (A),
So the actual roots is lie in interval 3.2,3.5866
x12 2 x1 1
Update a3 3.2, b3 3.5866 x11 x1 Put x1 2.4166667
2 x1 2
Then c3 a3
a3 b3 f a3 putting the values 2.4166667 2 2.4166667 1
2
f a3 f b3 x2 2.4166667
2 2.4166667 2
c3 3.2
3.2 3.5866 1.24 5.8402778 4.8333333 1
x2 2.4166667
1.24 0.0023 4.83333333 2
c 3.2
0.3866 1.24 x2 2.4166667
0.0069444
2.8333333
1.24 0.0023
3
x2 2.4166667 0.002451
0.4793
c3 3.2 x2 2.4142157
1.2423
For Third iteration put i 2 in equation (A),
c3 3.2 0.3859
x22 2 x2 1
c3 3.5859 x21 x2 Put x2 2.4142157
2 x2 2
Put x 3.5859 in equation (1) we get
2.4142157 2 2.4142157 1
2
Khalid Mehmood Lect: GDC Shah Essa Bilot Available at http://www.MathCity.org Page 240
Exercise 11.1
Chapter 11
xi2 2 xi 1 xi3 3
xi 1 xi .......................................... A xi 1 xi .......................................... A
2 xi 2 3xi2
For First iteration put i 0 in equation (A), we get For First iteration put i 0 in equation (A), we get
x 2 2 x0 1 x3 3
x01 x0 0 Put xo 0.5 x01 x0 0 2 Put xo 1
2 x0 2 3 xo
0.5 2 0.5 1 1 3
2 3
x1 0.5 x1 1
2 0.5 2 3 1
2
0.25 1 1 1 3
x1 0.5 x1 1
1 2 3
0.25
x1 0.5 2 2
3 x1 1 1
3 3
x1 0.5 0.0833333
x1 1.6666667
x1 0.4166667 For Second iteration put i 1 in equation (A),
For Second iteration put i 1 in equation (A), x13 3
x 2 x1 1
2 x11 x1 Put x1 1.6666667
x11 x1 1
Put x1 0.4166667 3x12
2 x1 2
1.6666667 3
3
x2 1.6666667
0.4166667 2 0.4166667 1
2
3 1.6666667
2
x2 0.4166667
2 0.4166667 2
4.6296296 3
0.1736111 0.8333333 1 x2 1.6666667
x2 0.4166667 8.3333333
0.83333333 2 1.6296296
0.0069444 x2 1.6666667
x2 0.4166667 8.3333333
2.8333333 x2 1.6666667 0.1955555
x2 0.4166667 0.002451
x2 1.4711111
x2 0.4142157
For Third iteration put i 2 in equation (A),
For Third iteration put i 2 in equation (A),
x23 3
x 2 2 x2 1 x21 x2 Put x2 1.417111111
x21 x2 2 Put x2 0.4142157 3 x22
2 x2 2
1.4711111 3
3
0.4142157 2 0.4142157 1
2
x3 0.4142157 x3 1.4711111
3 1.4711111
2
2 0.414215 2
0.1715729 0.8284314 1 3.1837314 3
x3 0.4142157 x3 1.4711111
0.8284314 2 6.4925037
0.000006 0.1837314
x3 0.4142157 x3 1.4711111
2.8284314 6.4925037
x3 0.4142157 0.0000021 x3 1.4711111 0.028299
x3 0.4142136 x3 1.4428121
This is nearly equal to r2 0.414214
b). f x sin x , xo 1
x3
Sol: Given f x sin x ..................... 1
Q5. Find iterate of the Newton-Raphson iterative
method for the following functions with initial start xo Differentiating with respect to x, we get
a). f x x 3, xo 1 f x sin x
3
d d
dx dx
Khalid Mehmood Lect: GDC Shah Essa Bilot Available at http://www.MathCity.org Page 241
Exercise 11.1
Chapter 11
For First iteration put i 0 in equation (A), we get For Third iteration put i 2 in equation (A)
x01 x0 tan xo Put xo 1 x23 2 x2 1
x21 x2 Put x2 0.45454545
x1 1 tan 1 3x22 2
x1 1 1.5574077 0.45454545 2 0.45454545 1
3
x3 0.45454545
x1 0.5574077 3 0.45454545 2
2
0 2 0 1 0
3
x1
x1 0
3 0 3
2
3 0 2
2
1 1 1
x1 0
2
x1 0
3 3
1
x1
2
x1 0.3333333
x1 0.5 For Second iteration put i 1 in equation (A)
For Second iteration put i 1 in equation (A) x13 3x1 1
x11 x1 Put x1 0.3333333
x13 2 x1 1 3x12 3
x11 x1 Put x1 0.5
3x12 2 0.3333333 3 0.3333333 1
3
x2 0.3333333
0.5 2 0.5 1
3
3 0.3333333 3
2
x2 0.5
3 0.5 2
2
0.0370370
0.125 1 1 x2 0.3333333
x2 0.5 3.3333333
0.75 2
x2 0.3333333 0.011111111
0.125
x2 0.5 x2 0.3222222
2.75
x2 0.5 0.0454545 For Third iteration put i 2 in equation (A)
x2 0.45454545
Khalid Mehmood Lect: GDC Shah Essa Bilot Available at http://www.MathCity.org Page 242
Exercise 11.1
Chapter 11
0.3222222 3 0.3222222 1
3
x3 2.5525519
x3 0.3222222 3 2.5525519 4 2.5525519 1
2
3 0.3222222 3
2
0.0476113
x3 2.5525519
0.0001221 8.3363555
x3 0.3222222
3.3114815 x3 2.5525519 0.0057113
x3 0.3222222 0.0000369 x3 2.5468406
x3 0.3221854 For Fourth iteration put i 3 in equation (A)
For Fourth iteration put i 3 in equation (A) x33 2 x32 x3 1
x31 x3 Put x3 2.5468406
x33 3 x3 1 3x32 4 x3 1
x31 x3 Put x3 0.3221854
3 x32 3 2.5468406 2 2.5468406 2.5468406 1
3 2
x4 2.5468406
3 2.5468406 4 2.5468406 1
0.3221854 3 0.3221854 1
2
3
x4 0.3221854 0.0001847
3 0.3221854 3
2
x4 2.5468406
8.2718287
0
x4 0.3221854 x4 2.5468406 0.0000223
3.3144102
x4 0.3221854 0 x4 2.5468183
x4 0.3221854 c). 3
x 3 x 1 on 3, 2
b) f x x 2 x x 1 0 3, 2 Sol: Given 3 x 3 x 1
3 2
on
Sol: Given f x x 2 x x 1 0...... 1 x 3 x 1 0 3
3 2 Or
Differentiating with respect to x, we get Let f x 3 x 3 x 1 0
f x x3 2 x 2 x 1 Differentiating with respect to x, we get
f x f x x 3 dxd x dxd 1
1
f x 3x 2 x 2 2 x dxd x 1 0 f x 13 x 3 1 0
2
d 3
dx
f x 3x 2 4 x 1.......................................... 2 f x 13 x 3 3 1.......................................... 2
2
xi 1 xi .......................................... A xi 1 xi i
3 xi 3
2
3xi2 4 xi 1 1
1 3
For First iteration put i 0 in equation (A), we get For First iteration put i 0 in equation (A), we get
x0 3 3 x0 1
1
x03 2 x02 xo 1
x01 x0 Put xo 3 x01 x0 Put xo 3
3x02 4 x0 1 1
x 3
2
3
1
3 0
3 2 3 3 1
3 2
3 3 3 1
1
x1 3 3
3 3 4 3 1
2
x01 3
3 3 3
2
1
1 3
5
x1 3 2.6428571 0.1828794
14 x1 3
For Second iteration put i 1 in equation (A), 0.8990488
x1 2.79568568
x13 2 x12 x1 1
x11 x1 Put x1 2.6428571 For Second iteration put i 1 in equation (A)
3x12 4 x1 1
x 3 x1 1 Put x 2.79568568
1
3
3 2.6428571 4 2.6428571 1
2
2.795685 3 2.795685 1
1
0.8473032
3
x11 2.795685
x2 2.6428571
3 2.79568568 3
2
1
1 3
9.3826531
0.00023652869
x2 2.6428571 0.0903053 x2 2.79568568
0.896700733
x2 2.5525519 x2 2.795421903
For Third iteration put i 2 in equation (A) For Third iteration put i 2 in equation (A)
Khalid Mehmood Lect: GDC Shah Essa Bilot Available at http://www.MathCity.org Page 243
Exercise 11.2
Chapter 11
x2 3 x2 1 Put x 2.795421903 xi 1
1
3
x21 x2 2 xi 1 xi
3 x2 3 1
xi .xi2
2
1 3
x 3 x2 1
1
xi 1
xi 1 xi
3
x21 x2 2 xi1
3 x2 3 1
2
1 3
xi 1 xi xi xi 1
2.79542 3 2.79542 1
1
3
x3 2.79542 xi 1 xi xi2 xi
3 2.7954219 3 1
2
1 3
0.00080702291
xi 1 2 xi xi2 .......................................... A
x3 2.7954219 For First iteration put i 0 in equation (A), we get
0.896686904
x3 2.794521895 x01 2 x0 x02 Put xo 2
x1 2 2 2
2
Q7. Can Newton-Rephson iterative method by
used for the following functions? x1 4 4
a). f x 9 x 4 16 x 3 36 x 2 96 x 60, xo
4 x1 0
3 For Second iteration put i 1 in equation (A)
Sol: Given f x 9 x 16 x 36 x 96 x 60 x11 2 x1 x12 Put x1 0
4 3 2
a). I x dx n4
2
f x x .......................................... 2
2 1
3
Newton Rephson formula is given by Sol: Given I x dx n4
2
f xi
xi 1 xi
1
f xi
b
a 1, b 3, f x x2
Khalid Mehmood Lect: GDC Shah Essa Bilot Available at http://www.MathCity.org Page 244
Exercise 11.2
Chapter 11
ba b
Now x
n
putting the values Compare with I f x
a
dx we get
3 1 2 1
x x 0.5 x2
4 4 2 a 0, b 1, f x 1
Put i 0 corresponding value of function 2
xo a 1 f o f xo 12 1 Now x b a putting the values
n
Put i 1 corresponding value of function 1 0 1
x x 0.25
x1 xo 1.x 4 4
Put i 0
f1 f x1 1.52
corresponding value of function
x1 1 1 0.5
f o f xo 02
1
f1 f 1.5 2.25
2
x1 1 0.5 xo a 0 fo f 0 0 1
x1 1.5 fo f 0 1
Put i 2 corresponding value of function Put i 1 corresponding value of function
x2 xo 2.x
f 2 f x2 22 x1 xo 1.x f1 f x1 0.252
1
x2 1 2 0.5
2
x
3
I x 2 dx T4 f o 2 f1 2 f 2 2 f3 f 4 x4 0 4 0.25 f 4 f 1 0.5 1
1
2
putting x4 1 b f 4 f 1 1.5
0.5 Trapezoidal rule for n 4
I 1 2 2.25 2 4 2 6.25 9
2 x
I T4 fo 2 f1 2 f 2 2 f3 f 4 putting
I 0.25 1 4.5 8 12.5 9 2
I 0.25 35
0.25
I 1 2 1.03125 1.125 1.28125 1.5
2
I 8.75
3
I 0.125 9.375 1.171875
Exact x 2 dx 1
x2
1
Exact 1 dx
0
2
3 3
x 1 3 3 1
E 3 1 x3 13 03
3 3 E x 1 0
1 6 0 6 6
1 1
E 27 1 26 1 7
E 1 1.166667
3 3 6 6
E 8.67 Error = Exact – Approximate
Error = Exact – Approximate Error = 1.171875 – 1.166667
Error = 8.67 – 8.75 Error = 0.00508
Error = 0.08 3
c). I 1 dx
1
x2 x
n6
b). I 1 dx n4
1
3
0
2 1
2 1
Sol: Given I x dx n6
Sol: Given I x 1 dx n4
1
b
0
2
Compare with I f x dx we get
a
Khalid Mehmood Lect: GDC Shah Essa Bilot Available at http://www.MathCity.org Page 245
Exercise 11.2
Chapter 11
3
1
a 1, b 3, f x Exact
1
dx
x 1
x
ba
Now x E ln x 1 ln 3 ln1
3
putting values
n
3 1 2 1 E ln 3 0 1.098612
x
6 6 3 Error = Exact – Approximate
Put i 0 corresponding value of function Error = 1.106746-1.098612
1 Error = 0.008134
f o f xo
xo a 1
2
1
f o f 1 1
d). I
0
1 x 2 dx n6
x1 xo 1.x f1 f x1
1 Sol: Given I
0
1 x 2 dx n6
4
1 3 b
x1 1 1
3 4 3
f1 f
Compare with I f x
a
dx we get
4 3 4
x1
3 a 0, b 1, f x 1 x2
Put i 2 corresponding value of function ba
Now x putting the values
x2 xo 2.x 1
f 2 f x2 5 n
1 20 1
x2 1 2
3
x
3 5 3 6 3
f2 f Put i 0 corresponding value of function
x2 35
3 5
f o f xo 1 0
2
Put i 3 corresponding value of function
x3 xo 3.x
1 xo a 0 fo f 0 1
x3 1 3 13 f3 f x3
2 fo f 0 1
x3 2
Put i 1 corresponding value of function
Put i 4 corresponding value of function
f1 f x1 1 13
2
1
x4 xo 4.x f 4 f x4 x1 xo 1.x
f1 f 13 1 19
7
x4 1 4 13 1
3
x1 0 1
7 3
x4 7 f4 f 3 f1 f 13 109
3
3 7 1
Put i 5 corresponding value of function x1 f1 f 13 10
3
3
x5 xo 5.x f5 f x5
1 Put i 2 corresponding value of function
8
f 2 f x2 1 23
2
1 3
x5 1 5 x2 xo 2.x
3 8 3
f5 f f 2 f 23 1 94
3 8 1
x5
8 x2 0 2
3 3 f 2 f 23 139
Put i 6 corresponding value of function 2
x6 xo 6.x x2 f 2 f 23 313
1 3
1 f 6 f x6 Put i 3 corresponding value of function
x6 1 6 3
3 x3 xo 3.x
f3 f x3 1 1
2
x6 3 b
1
Trapezoidal rule for n 6 x3 0 3 1 f3 f 1 2
x 3
I T4 f o 2 f1 f 2 f3 f 4 f5 f 6 Put i 4
2 corresponding value of function
f 4 f x4 1 43
2
putting
1
x4 xo 4.x
I 3
1 2 34 53 12 73 83 13 f 4 f 43 1 169
2 1
x2 0 4
1 2789 2789 3 f 4 f 43 259
I
6 420 2520 4
x2 f 4 f 43 53
I 1.106746 3
Put i 5 corresponding value of function
Khalid Mehmood Lect: GDC Shah Essa Bilot Available at http://www.MathCity.org Page 246
Exercise 11.2
Chapter 11
f 5 f x5 1 53
2 Put i 1 corresponding value of function
x5 xo 5.x
f1 f x1 1
1 f5 f 53 1 25 x1 xo 1.x 1 0.2
2
x5 0 5 9
3 f5 f 53 34
9
x1 0 1 0.2 f1 f 0.2 1
1 0.04
5
x5 f5 f 53 34
3 x1 0.2 f1 f 0.2 1
3 1.04
Put i 6 corresponding value of function Put i 2 corresponding value of function
x6 xo 6.x f 6 f x6 1 2
2
x2 xo 2.x f 2 f x2 1
1 0.4
2
1 x2 0 2 0.2
x6 0 6 f6 f 2 1 4 f 2 f 0.4 1
3 x2 0 0.4 1 0.16
x6 2 b f6 f 2 5 f 2 f 0.4 1
x2 0.4 1.16
2 x3 xo 3.x 1 0.6
2
1
I 31 2 10 13
2 53 34
5 x3 0.6 f3 f 0.6 1
2 3 3 3 1.36
I 2.96617
2 x4 0 4 0.2 f 4 f 0.8 1
1 0.64
Exact 1 x dx 2
x4 0.8 f 4 f 0.8 1
1.64
0
0 1 Put i 4 corresponding value of function
E 1 x 2 1dx x 1 x 2 dx x5 xo 5.x f5 f x5 1 2
1 1
1 0
2 x5 0 5 0.2 f5 f 1 1
x 1 x2 1 11
E ln x x 1
2
2 2 x5 1 b f5 f 1 1
0 2
f o f x0 1
2
1 0
2
b
xo a 0 fo f 0 1
1 0
Compare with I f x
a
dx we get
fo f 0 1 a 2, b 4, f x x2
Khalid Mehmood Lect: GDC Shah Essa Bilot Available at http://www.MathCity.org Page 247
Exercise 11.2
Chapter 11
ba Error = Exact – Approximate
Now x putting the values Error = 18.666667-18.666667
2n
42 2 1 Error = 0
x
2 3 2 3 3 x2
3
xo a 2 f o f xo 22 4 3
x2
Put i 1 corresponding value of function Sol: Given I 1 dx n4
2
3
x1 xo 1.x b
x1 2 1 1
3 f1 f x1
7 2
3
Compare with I f x dx we get
73 499
a
x1 2 13 f1 f x2
x1 7 a 2, b 3, f x 1
3 3
Put i 2 corresponding value of function ba
x2 xo 2.x Now x putting the values
2n
x2 2 2 13 f 2 f x2 83
2
3 2 1
x x
x2 2 23 f2 f 83 649 2 4 8
x2 83 Put i 0 corresponding value of function
Put i 3 22
corresponding value of function f o f xo 1
x3 xo 3.x 3
xo a 2 4
fo f 2 1
x3 2 3 13 f3 f x3 3
2
3
x3 2 1 f 3 f 3 9 fo f 2
1
x3 3 3
Put i 1 corresponding value of function
Put i 4 corresponding value of function
x1 xo 1.x
x4 xo 4.x f1 f x1 13 178 1
2
x1 2 1 1
x4 2 4 13 f 4 f x4 103 178 13 289
64 1
2
f1 f
8
x1 2 18
x4 2 43 f4 f 103 1009 f1 f 178 192
97
x1 178
x4 10
Put i 2 corresponding value of function
3
Put i 5 corresponding value of function
x2 xo 2.x
x5 xo 5.x f 2 f x2 13 94 1
2
x2 2 2 8
1
x5 2 5 13 f5 f x5 113 f 2 f 94 13 16 1
2
81
x 2 1
x5 2 3 f5 f 113 121 f 2 f 94 16
5 2 4 11
9 9
x
x5 113 2 4
Put i 3 Corresponding value of function
Put i 6 corresponding value of function
x3 xo 3.x
x6 xo 6.x f3 f x3 13 198 1
2
x3 2 3 18
x6 2 6 13 f 6 f x6 4 f3 f 198 13 361
64 1
2
x3 2 8 3
x6 2 2 f 6 f 4 16 f3 f 198 192
169
x3 198
x6 4 b
Put i 4 corresponding value of function
Simpson’s rule for n 3
x4 xo 4.x
x f 4 f x4 13 52 1
4 2
I x 2 dx S 23 f o 4 f1 f 3 f 5 2 f 2 f 4 f 6
3 x4 2 4 8
1
2
f 4 f 52 13 254 1
1
49 121 64 100 x 2 1
I 3 4 4 9 2 16
4 2
f 4 f 52 12
13
3 9 9 9 9 x4 25
1
I 168 18.666667 Put i 5 corresponding value of function
9 x5 xo 5.x
f5 f x5 13 218 1
2
4
Exact x dx 2
x5 2 5 8
1
2 f5 f 218 13 44164 1
x 2 5
f5 f 218 64
4
x 3
4 3
2 168
3 5 8 83
E x 21
3 2 3 3 9 5 8
Khalid Mehmood Lect: GDC Shah Essa Bilot Available at http://www.MathCity.org Page 248
Exercise 11.2
Chapter 11
x6 xo 6.x 1
f 6 f x6 13 114 1 f o f xo
2
x6 2 6 18 xo a 1 1
f6 f 1
11 1 121
f o f 1 1
x6 2 34
4 3 16
x7 2 7 8 3 4 3
1
f1 f
f 7 f 238 13 529
64 1 4 3 4
x7 2 78 x1
f 7 f 238 192
337 3
x7 238 Put i 2 corresponding value of function
Put i 8 corresponding value of function x2 xo 2.x 1
x8 xo 8.x f 2 f x2 5
2
1 1
x2 1 2
1
f f x 3 3
x8 2 8 18
8 8 3
f8 f 3 13 9 1
3 5 3
f2 f
x8 2 1 5 3 5
f8 f 3 3 1 2 x2
x8 3 b 3
Simpson’s rule for n 4 Put i 3 corresponding value of function
3
x2 x x3 xo 3.x
I 1 dx S2 4 f o 4 f1 f3 f5 f 7
3 1 1
2
3 x3 1 3 f3 f x3
2 f 2 f 4 f 6 f8 3 2
x3 2
1
1 97 169 83 337
I 8 4 Put i 4 corresponding value of function
3 8 192 192 64 192
x4 xo 4.x 1
11 13 73 f 4 f x4 7
2 2 1
16 12 48 x4 1 4 3
3 7 3
3
x2 1 635 635 f4 f
I 1 dx S2 4 7 3 7
2
3 24 24 576 x4
3
I 1.102431 Put i 5 corresponding value of function
3
x2 x5 xo 5.x
Exact 1 dx f5 f x5 8
1
2
3 1
3 x5 1 5 3
x3 33 23 3 8 3
E x 3 2 f5 f
9 2 9 9 x5
8 3 8
10 3
E 1.111111 Put i 6 corresponding value of function
9 x6 xo 6.x
Error = Exact – Approximate
1 1
Error = 1.111111-1.102431
x6 1 6 f 6 f x6
Error = 0.008680 3 3
3
1 x6 3 b
c). I x dx
1
n3
Simpson’s rule for n 3
x
3
3 1
1 I dx S23 f o 4 f1 f3 f5
Sol: Given I x dx
1
n3
1
x 3
b 2 f 2 f 4 f 6
Compare with I f x
a
dx we get 1
3 1 3 3 3 1
I S6 3 1 4 2
1 3 4 2 8 5 7 3
a 1, b 3, f x 1 2077 2077
x I S6
ba 9 210 1890
Now x putting the values
n I 1.098942
3 1
3
2 1 1
Exact dx ln x 1
3
x x
2 3 6 3 1
x
E ln 3 ln 1 1.098612
Put i 0 corresponding value of function
Error = Exact – Approximate
Khalid Mehmood Lect: GDC Shah Essa Bilot Available at http://www.MathCity.org Page 249
Exercise 11.2
Chapter 11
Error = 1.098612-1.098942 x8 xo 8.x
f8 f x8 e21
Error = 0.000330 x8 0 8 18
1 f f 1 e2
x8 1 8
d). I e 2x
dx n4
0 Simpson’s rule for n 4
1
x
1
Sol: Given I e2 x dx
0
n4 I e2 x dx S2 4
0
3
f o 4 f1 f3 f5 f 7
b
2 f 2 f 4 f 6 f8
Compare with I f x dx we get
1
I 1 4 e 4 e 4 e 4 e 4 2 e 2 e1 e 2 e 2
1 3 5 7 1 3
a 8
a 0, b 1, f x e2 x 3
1
1
Now x
ba
putting the values
I e 2 x dx S 2 4 76.670325
0
24
2n
1 0 1 I 3.194597
x x 1
2 4 8 Exact e 2 x dx
Put i 0 corresponding value of function 0
2x 1
f o f x0 e 2 0 E
e
1 2
e e0
2 2
xo a 0 f o f 0 e0 0
E 3.194528
fo f 0 1 Error = Exact – Approximate
Put i 1 Corresponding value of function Error = 3.194597 – 3.194528
x1 xo 1.x Error = 0.000069
f1 f x1 e 8
2 1
x1 0 1
1
1
e). I 1
dx n2
18 e
8
f1 f 2 x x2
1
4
x1 1
8
0
1
Sol: Given I 1
Put i 2 Corresponding value of function 0
2 x x2
dx n2
x2 xo 2.x
f 2 f x2 e 4
b
2 1
Compare with I f x dx we get
x2 0 2 18
14 e
a
f2 f
1
2
1
x2 1
4 a 0, b 1, f x
2 x x2
Put i 3 corresponding value of function
ba
x3 xo 3.x 2 83 Now x putting the values
f3 f x3 e 2n
x3 0 3 18 1 0 1
83 e x x
3
f3 f
2 2
4
x3 3
8 4
Put i 4 corresponding value of function Put i 0 corresponding value of function
x4 xo 4.x 1
f 4 f x4 e 2 f o f x0
2 1
x4 0 4 18 xo a 0 2 0 0
2
x4 1
f4 f 12 e1 fo f 0
1
2 2
Put i 5 corresponding value of function Put i 1 corresponding value of function
x5 xo 5.x 2 1
f5 f x5 e f1 f x1
5
8
x5 0 5 2 4 14
2
1
x1 xo 1.x 1
85 e
8 5
f5 f
x1 0 1 14
4
x5 5
8 f1 f 14
1
Put i 6 corresponding value of function 2 14 161
x1 1
4
x6 xo 6.x 2 34 f1
16 1
1
f 6 f x6 e
x6 0 6 18
32 4 1 37
37 16 16
x6 3
1
f 2 f x2
4
Put i 7 Corresponding value of function 2 2 12
2
x2 xo 2.x 1
x7 xo 7.x 2 34
f 7 f x7 e x2 0 2 14 1
x7 0 7 18 f2 f 12
2 12 14
e4 x2
7
f7 f 7 1
x7 7 8 2
4 1 1
f2
8
Put i 8 corresponding value of function 11 8 2 1
4
11
4
Put i 3 corresponding value of function
Khalid Mehmood Lect: GDC Shah Essa Bilot Available at http://www.MathCity.org Page 250
Exercise 11.2
Chapter 11
1 Q3. A quarter circle of radius 1 has the equation
f3 f x3
2 34
3 2
y 1 x 2 for 0 x 1 , which mean that
x3 xo 3.x 4
1
1
x3 0 3 14 f3 f 34 0 1 x dx 4 , n 4 approximate the
2
2 34 169
x3 3
4 definite integral on the left by trapezoidal rule that
1 1 16
f3 32 12 9
53
equals to the right side when 3.1
53
16 16 1
Put i 4 corresponding value of function
1
Sol: Given 1 x 2 dx
4
, n4
f 4 f x4
0
2 1 1
2 b
2 11 a 0, b 1, f x 1 x2
x4 1 1
f4 ba
4 Now x putting the values
n
Simpson’s rule for n 2
1 0 1
1
1 x x
I dx S2 2 4 4
0
2 x x2 Put i 0 corresponding value of function
x
f o 4 f1 f3 2 f 2 f 4 f o f x0 1 0
2
I
3 xo a 0
1
1 16 16 4 1 fo f 0 1 1
I 4 4 2
3 2 37 53 11 4 Put i 1 corresponding value of function
f1 f x1 1 14
2
1
I 4.414549627 x1 xo 1.x
12
I 0.367879135 x1 0 1 14 f1 f 14 1 161
1
1 x1 1
f1 16 1
15
Exact 2
4 16 4
dx
0
x x2 Put i 2 corresponding value of function
f 2 f x2 1 12
1 2
E
1
dx x2 xo 2.x
x 2 x 12 12 2 12
2 2 2
0 x2 0 2 14 f2 f 12 1 14
1
E
1
dx x2 1
2 f2 4 1
3
x
4 2
0
1 2
2 2 1
4 Put i 3 corresponding value of function
f3 f x3 1 34
1 2
1
E dx x3 xo 3.x
x 12 74
2
0
x3 0 3 14 f3 f 34 1 169
1
1 x3
E f3
3 16 9 7
dx
4
x
2 16 4
0
1 2
2 2
7
Put i 4 corresponding value of function
f 4 f x4 1 1
1 2
2 x 1 x4 xo 4.x
E tan 1 7 2
7 2 0 x4 0 4 14 f 4 f 1 1 1
2 1 1 12
1 0 2
1 x4 1 f4 0 0
E tan 7 tan 7
7 2 2 Trapezoidal rule for n 4
x
2 1 32 12 I T4 f o 2 f1 f 2 f3 f 4 putting
E 1 2
tan 7 tan 7
7 2 2
0
1
I 4 1 2 15
4 2
3 7
2 1 3 2 4
1 1
E tan tan 1
7 7 7 I 5.991418136
8
E 0.3679068
Error = Exact – Approximate I 0.748927267
Error = 0.3679068 – 0.36787913 4
Error = 0.0000155 Q4. A quarter circle of radius 1 has the equation
y 1 x 2 for 0 x 1 , which mean that
Khalid Mehmood Lect: GDC Shah Essa Bilot Available at http://www.MathCity.org Page 251
Exercise 11.2
Chapter 11
1
x6 xo 6.x
0
1 x 2 dx
4
, n 4 approximate the
x6 0 6 18
definite integral on the left by Simpson’s rule that x6 3
f 6 f x6 1 34
2
1
1 x dx n4
2
Sol: Given ,
0
4 f6 f 34 1 169
b
Compare with I f x dx we get f 6 16169 47
a Put i 7 corresponding value of function
a 0, b 1, f x 1 x2 f 7 f x7 1 78
2
x7 xo 7.x
ba
Now x putting the values x7 0 7 18 f7 f 78 1 64
49
2n
1 0 1 x7 7
8 f7 64 49
15
x x 64 8
xo a 0 x8 0 8 18 f8 f 1 1 1
fo f 0 1 1 x8 1 f8 0 0
Put i 1 corresponding value of function Simpson’s rule for n 4
x1 xo 1.x f1 f x1 1
1 2 1
x
8
I 1 x 2 dx S2 4 f o 4 f1 f3 f5 f 7
3
x1 0 1 18 f1 f 18 1 641 0
2 f 2 f 4 f 6 f8
x1 18 f1 64 1
63
2 0
64 8 1
3 8 8 8 8 4 2 4
f 2 f x2 1 14
2 1
x2 xo 2.x I 1 x 2 dx S8
1
18.65909
24
x2 0 2 18 f2 f 14 1 161
0
I 0.777462113
x2 1
4 f2 16 1
15 Q5. width of an irregularly shaped dam is
16 4
Put i 3 corresponding value of function measured at 5-m intervals, with result indicated in
figure given below. Use Simpson’s rule to estimate
f3 f x3 1 83
2
x3 xo 3.x the area of the face of the dam
Hint:
x3 0 3 18 f3 f 83 1 649
x : xo 0, x1 5 x2 10 x3 15 x4 20
x3 83 f3 64 9
53
64 8 f : fo 9, f1 15 f2 20 f3 27 f4 30
Put i 4 corresponding value of function x 5, n2
f 4 f x4 1 12
2
x4 xo 4.x x
S4 f o 4 f1 f3 2 f 2 f 4
3
x4 0 4 18 f4 f 12 1 14 Putting the values
x4 1
f4 4 1
5
S4 9 4 15 27 2 20 30
3
2 4 2
Put i 5 corresponding value of function 3
x5 xo 5.x S4 411.66m2 412m2
x5 0 5 18
x5 85
f5 f x5 1 85
2
f5 f 85 1 64
25
f5 64 25
64 39
8
Put i 6 corresponding value of function
Khalid Mehmood Lect: GDC Shah Essa Bilot Available at http://www.MathCity.org Page 252