Module-4-Numerical Methods-1
Module-4-Numerical Methods-1
NUMERICAL METHODS -1
Numerical method provides various technique to find approximate solution
to different problem using simple operation.
Numerical Solution of Polynomial and Transcendental Equations
Given an equation f ( x )=0 it is generally not possible to find roots ' x ' such
that f ( x ) becomes zero exactly. We discuss two numerical methods for the
solution of algebraic and transcendental equation.
Equation involving algebraic quantity like x , x 2, x 3,… are called algebraic
equation.
Eg: x 3−3 x−4=0 , x 4 + x 3=80
Equation involving non algebraic quantity like e x , logx , sinx , tanx , … are
called transcendental equation.
Eg: xe x −2=0 , xlogx−1.2=0 , tanx=2 x
Problems
1. Using the method of false position find the real root correct to 3 decimal
places of the equation x 3 +5 x −11=0.
Sol: Given f ( x )=x 3 +5 x−11
f ( 0 )=−11
f ( 1 ) =−5<0
f ( 2 )=7>0
1. ( 7 )−2. (−5 )
x 1=
( 7 )−(−5 )
7+10
x 1=
7+5
x 1=1.417
f ( 1.417 )=−1.070< 0
f ( 2 )=7>0
f ( 1.494 )=−0.195<0
f ( 2 )=7>0
( 1.494 ) ( 7 ) −2 (−0.195 )
x 3=
( 7 )−(−0.195 )
x 3=1.508
f ( 1.508 )=−0.031<0
f ( 2 )=7>0
( 1.508 ) ( 7 ) −2 (−0.031 )
x4 =
( 7 ) −(−0.031 )
x 4 =1.510
f ( 1.510 )=−0.007< 0
f ( 2 )=7>0
x 5=1.510
f ( 1 ) =−1
f ( 2 )=−9<0
f ( 3 )=5>0
f ( 2.643 )=−1.752<0
f ( 3 )=5>0
f ( 2.736 )=−0.199< 0
f ( 3 )=5>0
f ( 2 )=−0.5979<0
f ( 3 )=0.2314 >0
x 1=2.7210
f ( 2.7210 )=−0.0171<0
f ( 3 )=0.2314 >0
f ( 3 )=0.2314 >0
f ( 1 ) =−1.460<0
0 (−1.460 )−1 ( 2 )
x 1=
(−1.460 )−( 2 )
x 1=0.578
f ( 1 ) =−1.460<0
x 2=0.606
f ( 1 ) =−1.460<0
x 3=0.607
f ( 0.607 )=0
x 1=0.736
f ( 0.736 )=−0.464 <0
f ( 1 ) =0.718>0
The root lies between ( 0.736 , 1 ).
Step-2: a=0.736 b=¿ 1
f ( a )=−0.464 f ( b )=0.718
( 0.736 ) ( 0.718 )−1 (−0.464 )
x 2=
( 0.718 )−(−0.464 )
x 2=0.840
f ( 0.840 )=−0.054 <0
f ( 1 ) =0.718>0
The root lies between ( 0.840 , 1 ).
Step-3: a=0.840 b=¿ 1
f ( a )=−0.054 f ( b )=0.718
( 0.840 ) ( 0.718 )−1 (−0.054 )
x 3=
( 0.718 )−(−0.054 )
x 3=0.851
f ( 0.851 )=−0.007< 0
f ( 1 ) =0.718>0
The root lies between ( 0.851 , 1 ).
Step-4: a=0.851 b=¿ 1
f ( a )=−0.007 f ( b )=0.718
( 0.851 ) ( 0.718 ) −1 (−0.007 )
x4 =
( 0.718 ) −(−0.007 )
x 4 =0.852
∴ The real root is 0.852.
x 1=0.3147
f ( 0.3147 )=−0.5198 <0
f ( 1 ) =2.1780>0
The root lies between ( 0.3147 , 1 ).
Step-2: a=0.3147 b=¿ 1
f ( a )=−0.5198 f ( b )=2.1780
( 0.3147 ) ( 2.1780 )−1 (−0.5198 )
x 2=
( 2.1780 )−(−0.5198 )
x 2=0.4467
f ( 0.4467 )=−0.2036 <0
f ( 1 ) =2.1780>0
The root lies between ( 0.4467 , 1 ).
Step-3: a=0.4467 b=¿ 1
f ( a )=−0.2036 f ( b )=2.1780
( 0.4467 ) ( 2.1780 )−1 (−0.2036 )
x 3=
( 2.1780 )−(−0.2036 )
x 3=0.4940
f ( 0.4940 )=−0.0708< 0
f ( 1 ) =2.1780>0
The root lies between ( 0.4940 , 1 ).
Step-4: a=0.4940 b=¿ 1
f ( a )=−0.0708 f ( b )=2.1780
( 0.4940 )( 2.1780 )−1 (−0.0708 )
x4 =
( 2.1780 ) −(−0.0708 )
x 4 =0.5099
f ( 0.5099 )=−0.0237 <0
f ( 1 ) =2.1780>0
The root lies between ( 0.5099 , 1 ).
Step-5: a=0.5099 b=¿ 1
f ( a )=−0.0237 f ( b )=2.1780
( 0.5099 ) ( 2.1780 )−1 (−0.0237 )
x 5=
( 2.1780 )−(−0.0237 )
x 5=0.5152
f ( 0.5152 )=−0.0078< 0
f ( 1 ) =2.1780>0
The root lies between ( 0.5152 , 1 ).
Step-6: a=0.5152 b=¿ 1
f ( a )=−0.0078 f ( b )=2.1780
( 0.5152 ) ( 2.1780 )−1 (−0.0078 )
x 6=
( 2.1780 )−(−0.0078 )
x 6=0.5169
f ( 0.5169 )=−0.0026 <0
f ( 1 ) =2.1780>0
The root lies between ( 0.5169 , 1 ).
Step-7: a=0.5169 b=¿ 1
f ( a )=−0.0026 f ( b )=2.1780
( 0.5169 ) ( 2.1780 )−1 (−0.0026 )
x 7=
( 2.1780 )−(−0.0026 )
x 7=0.5175
f ( 0.5175 )=−0.0008< 0
f ( 1 ) =2.1780>0
The root lies between ( 0.5175 , 1 ).
Step-8: a=0.5175 b=¿ 1
f ( a )=−0.0008 f ( b )=2.1780
( 0.5175 ) ( 2.1780 )−1 (−0.0008 )
x 8=
( 2.1780 )−(−0.0008 )
x 8=0.5177
f ( 0.5177 )=−0.0002< 0
f ( 1 ) =2.1780>0
The root lies between ( 0.5177 , 1 ).
Step-9: a=0.5177 b=¿ 1
f ( a )=−0.0002 f ( b )=2.1780
( 0.5177 ) ( 2.1780 ) −1 (−0.0002 )
x 9=
( 2.1780 )−(−0.0002 )
x 9=0.5177
∴ The real root is 0.5177.
7. Use RF method to find the real root of the equation tanx+tanhx=0, the root
lies between 2 & 3. Carryout 3 iteration.
Sol: Given f ( x )=tanx+tanhx
f ( 2 )=−1.2210<0
f ( 3 )=0.8525> 0
The root lies between ( 2 , 3 ).
Wkt,
af ( b ) −bf (a)
x n=
f ( b ) −f (a)
Step-1: a=2 b=¿ 3
f ( a )=−1.2210 f ( b )=0.8525
2 ( 0.8525 )−3 (−1.2210 )
x 1=
( 0.8525 )−(−1.2210 )
x 1=2.5889
f ( 2.5889 )=0.3720> 0
f ( 2 )=−1.2210<0
The root lies between ( 2 , 2.5889 ).
Step-2: a=2 b=¿ 2.5889
f ( a )=−1.2210 f ( b )=0.3720
2 ( 0.3720 )−( 2.5889 ) (−1.2210 )
x 2=
( 0.3720 )−(−1.2210 )
x 2=2.4514
f ( 2.4514 )=0.1596>0
f ( 2 )=−1.2210<0
The root lies between ( 2 , 2.4514 ) .
Step-3: a=2 b=¿ 2.4514
f ( a )=−1.2210 f ( b )=0.1596
2 ( 0.1596 )−( 2.4514 ) (−1.2210 )
x 3=
( 0.1596 )− (−1.2210 )
x 3=2.3992
∴ The real root is 2.3992.
8. Find the real root of the equation x 3−3 x+ 4=0 using RF method .Carry out 3
iterations.
Sol: Given f ( x )=x 3−3 x + 4
f ( 0 )=4
f ( 1 ) =2
f ( 2 )=6
f ( 3 )=22
f (−1 )=6 f (−2 )=2>0 f (−3 )=−14 <0
The root lies between (−3 ,−2 ).
Wkt,
af ( b ) −bf (a)
x n=
f ( b ) −f (a)
Step-1: a=−3 b=−2
f ( a )=−14 f ( b )=2
(−3 ) ( 2 )−(−2 ) (−14 )
x 1=
(2 )−(−14 )
x 1=−2.1250
f (−2.1250 )=0.7793> 0
f (−3 )=−14 <0
The root lies between (−3 ,−2.1250 ).
Step-2: a=−3 b=−2.1250
f ( a )=−14 f ( b )=0.7793
(−3 ) ( 0.7793 )−(−2.1250 )(−14 )
x 2=
( 0.7793 )−(−14 )
x 2=−2.1711
f (−2.1250 )=0.2794 >0
f (−3 )=−14 <0
The root lies between (−3 ,−2.1711).
Step-3: a=−3 b=−2.1711
f ( a )=−14 f ( b )=0.2794
(−3 ) ( 0.2794 )−(−2.1711 ) (−14 )
x 3=
( 0.2794 )−(−14 )
x 3=−2.1873
∴ The real root is −2.1873.
Newton-Raphson Method
Formula:
f ( xn)
x n+1=x n − ' ; f ' ( x n ) ≠ 0 , n=0 , 1, 2 , 3 , …
f ( xn )
f ( x0 ) '
n=0 , x 1=x 0− ' ; f ( x0 ) ≠ 0
f ( x0 )
f ( x1 ) '
n=1 , x 2=x 1− ' ; f ( x 1 ) ≠0 and so on.
f ( x1 )
Problems
1. Use NR method to find the real root of the equation x 3−3 x−5=0 , correct to 3
decimal places.
Sol: Given f ( x )=x 3−3 x−5
f ( 0 )=−5
f ( 1 ) =−7
f ( 2 )=−3
f ( 3 )=13
The root lies between ( 2 , 3 ).
Since f ( 2 ) lies nearer to 0.
Let x 0=2
f ( xn)
We know that x n+1=x n − '
f ( xn )
3
Here f ( x )=x −3 x−5
f ' ( x )=3 x 2−3
f ( x0 )
Step 1: x 1=x 0− '
f ( x0 )
f ( 2)
x 1=2− '
f ( 2)
(−3 )
x 1=2−
( 9)
x 1=2.333
f ( x1 )
Step 2: x 2=x 1− '
f ( x1 )
f ( 2.333 )
x 2=2.333− '
f ( 2.333 )
( 0.699 )
x 2=2.333−
( 13.329 )
x 2=2.281
f ( x2 )
Step 3: x 3=x 2− '
f ( x 2)
f ( 2.281 )
x 3=2.281− '
f ( 2.281 )
( 0.025 )
x 3=2.281−
( 12.609 )
x 3=2.279
f ( x3)
Step 4: x 4 =x3 − '
f ( x3 )
f ( 2.279 )
x 4 =2.279− '
f ( 2.279 )
( 0)
x 4 =2.279−
( 12.582 )
x 4 =2.279
∴ The real root is 2.279.
2. Find the real root of the equation x 3 + x 2+3 x +4=0 applying NR method.
Sol: Given f ( x )=x 3 + x 2 +3 x+ 4
f ( 0 )=4
f ( 1 ) =11
f (−1 )=1>0
f (−2 )=−6< 0
The root lies between (−2 ,−1 ).
Since f (−1 ) lies nearer to 0.
Let x 0=−1
f ( xn)
We know that x n+1=x n − '
f ( xn )
Here f ( x )=x 3 + x 2 +3 x+ 4
f ' ( x )=3 x 2+ 2 x +3
f ( x0 )
Step 1: x 1=x 0− '
f ( x0 )
f (−1 )
x 1=(−1)− '
f (−1 )
( 1)
x 1=(−1)−
( 4)
x 1=−1.2500
f ( x1 )
Step 2: x 2=x 1− '
f ( x1 )
f (−1.25 )
x 2=−1.25− '
f (−1.25 )
(−0.1406 )
x 2=−1.25−
(5.1875)
x 2=−1.2229
f ( x2 )
Step 3: x 3=x 2− '
f ( x 2)
f (−1.2229 )
x 3=−1.2229− '
f (−1.2229 )
(−0.0020 )
x 3=−1.2229−
(5.0407 )
x 3=−1.2225
f ( x3)
Step 4: x 4 =x3 − '
f ( x3 )
f (−1.2225 )
x 4 =−1.2225− '
f (−1.2225 )
(0)
x 4 =−1.2225−
( 5.0385 )
x 4 =−1.2225
∴ The real root is −1.2225.
3. Use NR method to find the real root of xsinx+ cosx=0 near x=π . Carryout the
iteration upto 4 decimal places of accuracy.
Sol: Given f ( x )=xsinx +cosx
Let x 0=π
f ( xn)
We know that x n+1=x n − '
f ( xn )
Here f ( x )=xsinx +cosx
'
f ( x )=xcosx+ sinx−sinx
'
f ( x )=xcosx
f ( x0 )
Step 1: x 1=x 0− '
f ( x0 )
f (π )
x 1=(π )− '
f (π)
(−1 )
x 1=(π )−
(−π )
x 1=2.8233
f ( x1 )
Step 2: x 2=x 1− '
f ( x1 )
f ( 2.8233 )
x 2=2.8233− '
f ( 2.8233 )
(−0.0662 )
x 2=2.8233−
(−2.6815)
x 2=2.7986
f ( x2 )
Step 3: x 3=x 2− '
f ( x 2)
f ( 2.7986 )
x 3=2.7986− '
f ( 2.7986 )
(−0.0006 )
x 3=2.7986−
(−2.6356 )
x 3=2.7984
f ( x3)
Step 4: x 4 =x3 − '
f ( x3 )
f ( 2.7984 )
x 4 =2.7984− '
f ( 2.7984 )
(0 )
x 4 =2.7984−
(−2.6352 )
x 4 =2.7984
∴ The real root is 2.7984 .
4. Use NR method to find the real root of the equation xe x =2, correct to 3
decimal places.
Sol: Given f ( x )=xe x −2
f ( 0 )=−2<0
f ( 1 ) =0.718>0
The root lies between ( 0 , 1 ).
Since f ( 1 ) lies nearer to 0.
Let x 0=1
f ( xn)
We know that x n+1=x n − '
f ( xn )
x
Here f ( x )=xe −2
' x x
f ( x )=x e + e
f ( x0 )
Step 1: x 1=x 0− '
f ( x0 )
f ( 1)
x 1=1− '
f ( 1)
( 0.718 )
x 1=1−
( 5.437 )
x 1=0.868
f ( x1 )
Step 2: x 2=x 1− '
f ( x1 )
f ( 0.868 )
x 2=0.868− '
f ( 0.868 )
( 0.068 )
x 2=0.868−
( 4.450 )
x 2=0.853
f ( x2 )
Step 3: x 3=x 2− '
f ( x 2)
f ( 0.853 )
x 3=0.853− '
f ( 0.853 )
( 0.002 )
x 3=0.853−
( 4.348 )
x 3=0.853
∴ The real root is 0.853 .
5. Use NR method to find the real root of the equation x +log 10 x=2 .
Sol: Given f ( x )=x + log 10 x−2
f ( 1 ) =−1<0
f ( 2 )=0.3010>0
The root lies between ( 1 , 2 ).
Since f ( 2 ) lies nearer to 0.
Let x 0=2
f ( xn)
We know that x n+1=x n − '
f ( xn )
Here f ( x )=x + log 10 x−2
' 1
f ( x )=1+ log 10 e−0
x
' 0.4343
f ( x )=1+
x
f ( x0 )
Step 1: x 1=x 0− '
f ( x0 )
f ( 2)
x 1=(2)− '
f ( 2)
( 0.3010 )
x 1=(2)−
1.2172
x 1=1.7527
f ( x1 )
Step 2: x 2=x 1− '
f ( x1 )
f ( 1.7527 )
x 2=1.7527− '
f ( 1.7527 )
(−0.0036 )
x 2=1.7527−
(1.2478)
x 2=1.7556
f ( x2 )
Step 3: x 3=x 2− '
f ( x 2)
f ( 1.7556 )
x 3=1.7556− '
f ( 1.7556 )
( 0)
x 3=1.7556−
(1.2474 )
x 3=1.7556
∴ The real root of the equation is 1.7556 .
x n+1=
2 xn
2
xn + N
x n+1=
2 xn
[ ]
2
1 xn N
x n+1= +
2 xn xn
x n+1=
1
2 [
xn +
N
xn ]
,is an iterative formula.
To find √ 12:
Here N=12
Wkt, √ 9=3 , √ 16=4
Let x 0=3
1 N
Step-1: x 1= 2 x 0 + x [ 0
]
1
x 1=
2
3+
12
3 [ ]
x 1=3.5
1 N
Step-2: x 2= 2 x 1+ x [ 1
]
x 2=
1
2 [
3.5+
12
3.5 ]
x 2=3.4643
1 N
Step-3: x 3= 2 x 2 + x [ 2
]
x 3=
1
2 [
3.4643+
12
3.4643 ]
x 3=3.4641
1 N
Step-4: x 4 = 2 x3 + x [ 3
]
x4 =
1
2 [
3.4641+
12
3.4641 ]
x 4 =3.4641
Thus, √ 12=3.4641.
[ ]
3
1 2 xn N
x n+1= +
3 x n2 x n2
x n+1=
1
3[ N
]
2 x n + 2 ,is an iterative formula.
xn
To find √3 29 :
Here N=29
Wkt, √ 27=3 , √ 64=4
Let x 0=3
Step-1: x 1= 3 2 x 0 + x
1
[ N
0
2
]
x 1=
1
3 [ 29
2 ( 3) + 2
(3) ]
x 1=3.0741
Step-2: x 2= 3 2 x 1+ x
1
[ N
1
2
]
x 2=
1
3 [
2 ( 3.0741 ) +
29
( 3.0741 )2 ]
x 2=3.0723
Step-3: x 3= 3 2 x 2+ x
1
[ N
2
2
]
x 3=
1
3 [
2 ( 3.0723 ) +
29
( 3.0723 )2 ]
x 3=3.0723
Thus, √ 29=3.0723 .
3
9. Use NR method to find an iterative formula for the reciprocal of the square
root of a
−1
positive number and hence find ( 17 ) 2 correct to 4 decimal places.
1
Sol: Let x=
√N
Square on both sides
2 1
x=
N
2 1
x − =0
N
2 1
Here f ( x )=x − N
f ' ( x )=2 x
f ( xn)
We know that x n+1=x n − '
f ( xn )
x n+1 =x −
( x − )
1
N n
2
n
(2 xn)
x n+1 =
( 2 x −x
n
2
n
2
+
1
N )
2 xn
2 1
xn +
N
x n+1=
2 xn
[ ]
1
2
1 xn N
x n+1= +
2 xn xn
x n+1=
1
2[xn +
1
N xn ]
,is an iterative formula.
−1
To find ( 17 ) 2 :
Here N=17
1 1
Wkt, =0.3333 , =0.25
√9 √16
Let x 0=0.25
1 1
Step-1: x 1= 2 x 0 + N . x [
0
]
x 1=
1
2
0.25+
[ 1
17(0.25) ]
x 1=0.2426
1 1
Step-2: x 2= 2 x 1+ N . x [ 1
]
x 2=
1
2 [
0.2426+
1
17 (0.2426) ]
x 2=0.2425
1
Thus, =0.2425
√17
10. Use NR method to find an iterative formula for the reciprocal of positive
number and
1
hence find 31 .
1
Sol: Let x= N
Take reciprocal on b.s
1
=N
x
1
−N =0
x
1
Here f ( x )= x −N
' −1
f ( x )= 2
x
f ( xn)
We know that x n+1=x n − '
f ( xn )
x n+1 =x −
( 1
x
−N
) n
( )
n
−1
x n2
2
( )
1 xn
x n+1=x n + −N .
xn 1
( )
2
xn 2
x n+1=x n + −N x n
xn
2
x n+1=x n + x n−N x n
2
x n+1=2 x n−N x n
x n+1=x n [ 2−N x n ] , is an iterative formula.
1
To find 31 :
Here N=31
1
Let x 0= 25 =0.04
Step-1: x 1=x 0 [2−N x0 ]
x 1=(0.04) [ 2−31(0.04) ]
x 1=0.0304
Step-2: x 2=x 1 [ 2−N x 1 ]
x 2=(0.0304) [ 2−31(0.0304) ]
x 2=0.0322
Step-3: x 3=x 2 [ 2−N x 2 ]
x 3=(0.0322) [ 2−31(0.0322) ]
x 3=0.0323
1
Thus, 31 =0.323.
FINITE DIFFERENCES
Problems
1. Given f ( 0 )=1, f ( 1 ) =3, f ( 2 )=7, f ( 3 )=13, find f ( 0.1 ) using Newton’s forward
interpolation formula.
Sol:
x y ID II D III D
x 0=0 y 0=1
∆ y 0=3−1=2
1 3 2
∆ y 0 =4−2=2
7−3=4 3
∆ y 0 =2−2=0
2 7 6−4=2
13−7=6
3 13
x 0=1 y 0=0
∆ y 0=0.128
1.2 0.128 2
∆ y 0 =0.288
3
0.416 ∆ y 0 =0.048 4
∆ y 0=0
1.4 0.544 0.336 5
∆ y 0 =0
0.752 0.048 0
1.6 1.296 0.38 4
1.136 0.048
0.432
1.8 2.432 1.568
2 4
By NFIF,
x 0=0 y 0=225
∆ y 0=13
1 238 2
∆ y 0 =69
82 3
∆ y 0 =−131
2 320 −6 2
20
3 340
By NFIF,
r ( r −1 ) 2 r ( r−1 ) ( r−2 ) 3
y= y 0+ r ∆ y 0 + ∆ y0 + ∆ y 0 +…
2! 3!
( 0.5 ) ( 0.5−1 ) ( 0.5 )( 0.5−1 ) ( 0.5−2 )
y=225+ ( 0.5 ) ( 13 ) + ( 69 ) + (−131 )
2 6
y=214.6875
Thus, u0.5 =214.6875
80 5026
648
85 5674 40
688 −2
90 6362 38 4
∇ y n=4
726 3
∇ y n=2
2
95 7088 ∇ y n=40
∇ y n=766
x n=¿ 100 y n=¿7854
By NBIF,
r (r + 1) 2 r ( r +1 )( r + 2 ) 3 r ( r +1 ) ( r +2 ) ( r+ 3 ) 4
y= y n+ r ∇ y n + ∇ yn + ∇ yn + ∇ yn
2! 3! 4!
(1 )( 1+1 ) ( 1 )( 1+1 ) ( 1+2 ) ( 1 )( 1+1 ) ( 1+2 ) ( 1+ 3 )
y=7854 + ( 1 ) ( 766 ) + ( 40 ) + ( 2) + (4 )
2 6 24
y=8666
Thus, f ( 105 )=8666.
The area corresponding to the diameter 105 is 8666.
5. The following table give the values of tanx for 0.1 ≤ x ≤ 0.3 , find tan ( 0.26 ) .
x 0.1 0.15 0.2 0.25 0.3
0.1 0.1003
0.0508
0.15 0.1511 0.0008
0.0516 0.0002
0.2027 0.0010 4
∇ y n=0.0002
0.2
0.0526 3
∇ y n=0.0004
2
0.2553 ∇ y n=0.0014
0.25 ∇ y n=0.0540
By NBIF,
r (r + 1) 2 r ( r +1 )( r + 2 ) 3 r ( r +1 ) ( r +2 ) ( r+ 3 ) 4
y= y n+ r ∇ y n + ∇ yn + ∇ yn + ∇ yn
2! 3! 4!
(−0.8 )(−0.8+1 ) (−0.8 )(−0.8+ 1 )(−0.8+ 2 )
y=0.3093+ (−0.8 ) ( 0.0540 ) + ( 0.0014 )+ ( 0.0004 )
2 6
+ (−0.8 ) (−0.8+1 ) (−0.8+2 )(−0.8+3 )
( 0.0002 )
24
y=0.2660
Thus, tan ( 0.26 )=0.2660 .
6. From the following table find the number of students who have obtain
a) Less than 45 marks
b) Between 40 – 45 marks
c) More than 40 but less than 55
Marks 30-40 40-50 50-60 60-70 70-80
No. of 31 42 51 35 31
students
Sol:
x y ID II D III D IV D
x 0=40 y 0=31
∆ y 0=42
50 73 (31+42) 2
∆ y 0 =9
51 3
∆ y 0 =−25
4
60 124 (73+51) −16 ∆ y 0=37
35
−4 12
70 159 (124+35) 31
80 190 (159+31)
a) To find f ( 45 ) ⇒ x=45
Here h=10 , x 0=40
x−x 0
r=
h
45−40
r=
10
r =0.5
By NFIF,
r ( r −1 ) 2 r ( r−1 ) ( r−2 ) 3 r ( r−1 ) ( r−2 )( r −3 ) 4
y= y 0+ r ∆ y 0 + ∆ y0+ ∆ y0 + ∆ y0
2! 3! 4!
c) To find f ( 55 ) ⇒ x=55
Here h=10 , x 0=40
x−x 0
r=
h
55−40
r=
10
r =1.5
By NFIF,
r ( r −1 ) 2 r ( r−1 ) ( r−2 ) 3 r ( r−1 ) ( r−2 )( r −3 ) 4
y= y 0+ r ∆ y 0 + ∆ y0+ ∆ y0 + ∆ y0
2! 3! 4!
y=99.8047 ≅ 100
Thus, f ( 55 )=100.
No. of students who have obtained more than 40 but less than 55 ¿ f ( 55 )−f (40)
¿ 100−31
¿ 69
7. The population of a town is given by the following data
Year 1971 1981 1991 2001 2011
x y ID II D III D IV D
1991 18.37 3
∇ y n=−0.18
2
77.18 ∇ y n=−0.97
2001 ∇ y n=17.40
y n=94 .58
x n=¿ 201
1
The increase in population from the year 1975 to 2005¿ f ( 1975 )−f (2005)
¿ 84.2638−27.8797
¿ 56.3841 ( in thousands )
8. Extrapolate for 25.4 given the data
x 19 20 21 22 23
10. Given sin ( 45 )=0.7071, sin ( 50 ) =0.7660, sin ( 55 ) =0.8192, sin ( 60 ) =0.8660, find
sin ( 52 ) and sin ( 57 ) using an appropriate interpolation formula.
y=f ( x 0 ) + ( x−x 0 ) f ( x 0 , x1 ) + ( x −x 0) ( x− x1 ) f ( x 0 , x1 , x 2) + …
+ ( x−x 0 ) ( x−x 1 ) … ( x−x n−1 ) f ( x 0 , x 1 , … , x n )
f ( x 1 )−f ( x0 ) f ( x 1 , x 2 )−f ( x 0 , x 1 )
Here f ( x 0 , x 1) = ; f ( x 0 , x 1 , x 2) = ;
( x 1−x 0 ) ( x 2−x 0 )
f ( x 1 , x 2 , x 3 ) −f ( x 0 , x 1 , x 2 )
f ( x 0 , x 1 , x 2 , x 3 )=
( x 3− x0 )
Problems
1. Use NDDF to find f (43) , given that
x 40 42 44 45
f (x) 43833 46568 49431 50912
Sol:
x f (x) I DD II DD III DD
x 0=40 f ( x 0 ) =43833
46568−43833
f ( x 0 , x 1) = =1367.5 1431.5 −1367.5
42−40 f ( x 0 , x 1, x 2 ) = =16 16.5 −16
x 1=42 f ( x 1 ) =46568 49431−46568 44−40 f ( x 0 , x 1, x 2 , x 3 ) = =0
f ( x1 , x2)= =1431.5 45−40
44−42 1481−1431.5
x 2=44 50912−49431 f ( x 1 , x 2 , x3 ) = 45−42 =16.5
f ( x 2 ) =49431 f ( x 2 , x3 ) = =1481
45−44
x 3=45 f x =50912
( 3)
By NDDF,
y=f ( x 0 ) + ( x−x 0 ) f ( x 0 , x1 ) + ( x −x 0) ( x− x1 ) f ( x 0 , x1 , x 2) + ( x−x 0 )( x−x 1) ( x−x 2 ) f ( x 0 , x1 , x2 , x 3)
y=47983.2
Thus, f ( 43 )=47983.2
Sol:
x f (x) I DD II DD III DD IV DD
x 0=0 f ( x 0 ) =0
f ( x 0 , x 1) =3
x 1=2 f ( x 1 ) =6 f ( x 0 , x 1, x 2 ) =4
x 2=3 f ( x 0 , x 1, x 2 , x 3 ) =1
f ( x 1 , x 2 ) =15
f ( x 2 ) =21 f ( x 1 , x 2 , x3 ) =9 f ( x 0 , x 1, x 2 , x 3 , x 4 )=0
x 3=5 f ( x 1 , x 2 , x 3 , x 4 ) =1
f ( x 3 ) =105 f ( x 2 , x3 ) =42
f ( x 2 , x3 , x 4 )=13
x 4 =6
f ( x 4 )=186 f ( x 3 , x 4 )=81
By NDDF,
y=f ( x 0 ) + ( x−x 0 ) f ( x 0 , x1 ) + ( x −x 0) ( x− x1 ) f ( x 0 , x1 , x 2) + ( x−x 0 )( x−x 1) ( x−x 2 ) f ( x 0 , x1 , x2 , x 3) + ( x−x 0 ) ( x−x 1) ( x
y=0+ ( 0.5−0 ) ( 3 ) + ( 0.5−0 ) ( 0.5−2 ) ( 4 ) + ( 0.5−0 ) ( 0.5−2 )( 0.5−3 ) ( 1 ) + ( 0 )
y=0.3750
Sol:
x f (x) I DD II DD III DD
x 0=2 f ( x 0 ) =4
f ( x 0 , x 1) =26
x 1=4 f ( x 1 ) =56 f ( x 0 , x 1, x 2 ) =15
f ( x 1 , x 2 ) =131
x 2=9 f ( x 0 , x 1, x 2 , x 3 ) =1
f ( x 2 ) =711 f ( x 1 , x 2 , x3 ) =23
f ( x 2 , x3 ) =269
x 3=10
f ( x 3 ) =980
By NDDF,
y=f ( x 0 ) + ( x−x 0 ) f ( x 0 , x1 ) + ( x −x 0) ( x− x1 ) f ( x 0 , x1 , x 2) + ( x−x 0 )( x−x 1) ( x−x 2 ) f ( x 0 , x1 , x2 , x 3)
y=4+ ( x −2 )( 26 ) + ( x−2 ) ( x−4 ) (15 )+ ( x−2 ) ( x −4 )( x−9 ) (1 )
y=4+ 26 x −52+ 15 ( x2−2 x−4 x +8 ) + ( x 2−2 x−4 x +8 ) ( x−9 )
y=4+ 26 x −52+ 15 ( x2−6 x+ 8 ) + ( x 2−6 x +8 ) ( x−9 )
2 3 2 2
y=4+ 26 x −52+ 15 x −90 x +120+ x −6 x +8 x−9 x +54 x−72
y=x −2 x , is the required polynomial.
3
3
f ( x)=x −2 x
When x=3 , f (3)=21
x=5 , f (5)=115
x=7 , f (7)=329
x=11 , f (11)=1309
Consider,
3
f (x)=x −2 x
3 2
f ( x )= ( x −1 ) + 3 x −3 x +1−2 x ( x−1 )3=x 3−3 x 2 +3 x−1
3 2
f ( x )= ( x −1 ) + 3 x −5 x +1 ( x−1 )2=x 2−2 x +1
f ( x )= ( x −1 )3+ 3 [ ( x −1 )2+2 x−1 ] −5 x +1
3 2
f ( x )= ( x −1 ) + 3 ( x−1 ) +6 x−3−5 x+ 1
3 2
f ( x )= ( x −1 ) + 3 ( x−1 ) + x−2
3 2
f ( x )= ( x −1 ) + 3 ( x−1 ) + x−1−1
3 2
f ( x )= ( x −1 ) + 3 ( x−1 ) + ( x−1 )−1
When
x=1.1 , f ( x )= (1.1−1 )3 +3 ( 1.1−1 )2 + ( 1.1−1 )−1=−0.8690
x=1.5 , f ( x )= (1.5−1 )3 +3 ( 1.5−1 )2 + ( 1.5−1 )−1=0.375
x 0=−4 f ( x 0 ) =1245
f ( x 0 , x 1) =−404
f ( x 0 , x 1, x 2 ) =94
x 1=−1 f ( x 1 ) =33 f ( x 0 , x 1, x 2 , x 3 ) =−14
f ( x 0 , x 1, x 2 , x 3 , x 4 )=3
f ( x 1 , x 2 ) =−28 f ( x 1 , x 2 , x3 ) =10
x 2=0 f ( x 2 ) =5 f ( x 1 , x 2 , x 3 , x 4 ) =13
f ( x 2 , x3 , x 4 )=88
x 3=2 f ( x 3 ) =9 f ( x 2 , x3 ) =2
x 4 =5 f ( x 3 , x 4 )=442
f ( x 4 )=1335
By NDDF,
y=f ( x 0 ) + ( x−x 0 ) f ( x 0 , x1 ) + ( x −x 0) ( x− x1 ) f ( x 0 , x1 , x 2) + ( x−x 0 )( x−x 1) ( x−x 2 ) f ( x 0 , x1 , x2 , x 3)
+ ( x−x 0 ) ( x−x 1 ) ( x−x 2 ) ( x−x 3 ) f ( x 0 , x 1 , x 2 , x 3 , x 4 )
2 2 2 4 3 2 3 2
y=1245−404 x−1616+94 x + 470 x +376−14 x −70 x −56 x+ 3 x + 15 x +12 x −6 x −30 x −24 x
+ ( y − y 0 ) ( y− y 1 ) … ( y − y n−1)
xn
( y n− y 0 ) ( y n − y 2 ) … ( y n− y n−1 )
Problems
1. Apply Lagrange’s interpolation formula to find y ( 11) from the following data
x 2 5 8 14
y 94.8 87.9 81.3 68.7
Wkt
( x−x 1 )( x −x2 ) ( x−x 3 ) ( x−x 0 ) ( x−x 2 )( x−x 3 ) ( x−x 0 ) ( x−x 1 )( x −x3 ) ( x−x 0 ) ( x−x 1 ) ( x−x
y= y0+ y1+ y2+
( x 0−x 1 ) ( x 0−x 2 ) ( x 0−x 3 ) ( x 1−x 0 )( x 1−x 2 ) ( x 1−x 3 ) ( x2 −x 0 )( x 2−x 1 ) ( x 2−x 3 ) ( x3 −x 0 )( x 3− x1 ) ( x 3−
( 11−5 ) ( 11−8 )( 11−14 ) ( 11−2 )( 11−8 ) ( 11−14 ) (11−2 ) ( 11−5 )( 11−14 ) ( 11−2 )( 11−
y= ( 94.8 ) + ( 87.9 ) + ( 81.3 ) +
( 2−5 )( 2−8 ) ( 2−14 ) ( 5−2 ) ( 5−8 ) (5−14 ) ( 8−2 )( 8−5 ) ( 8−14 ) ( 14−2 ) (14−
y=74.925
y ( 11)=74.925
x 0 1 2 5
y 2 3 12 147
( x−1 ) ( x−2 ) ( x−5 ) ( x−0 ) ( x−2 ) ( x−5 ) ( x−0 )( x−1 )( x−5 ) ( x−0 )( x−1 )( x−2 )
y= ( 2) + ( 3 )+ ( 12 )+ (147 )
( 0−1 )( 0−2 ) ( 0−5 ) ( 1−0 ) (1−2 ) (1−5 ) ( 2−0 ) ( 2−1 ) ( 2−5 ) ( 5−0 ) ( 5−1 ) ( 5−2 )
Wkt ( x−a )( x−b ) ( x−c )=x 3−( a+b+ c ) x 2+ ( ab+bc +ca ) x−abc
−( x 3−8 x 2 +17 x−10 ) ( 3 x3 −21 x 2 +30 x ) ( 2 x 3−12 x 2+10 x ) ( 147 x 3−441 x 2 +294 x )
y= + − +
5 4 1 60
−12 ( x 3−8 x 2+17 x −10 ) +15 ( 3 x 3−21 x 2 +30 x )−60 ( 2 x 3−12 x2 +10 x ) + ( 147 x 3−441 x 2 +294 x )
y=
60
3 2 3 2 3 2 3 2
−12 x + 96 x −204 x+ 120+45 x −315 x + 450 x−120 x + 720 x −600 x +147 x −441 x +294 x
y=
60
3 2
60 x + 60 x −60 x +120
y=
60
3 2
y=x + x −x +2 , is the required polynomial.
3. Use Lagrange’s interpolation formula to fit a polynomial for the data and
hence find y at x=2.
x 0 1 3 4
y -12 0 6 12
Wkt
( x−x 1 )( x −x2 ) ( x−x 3 ) ( x−x 0 ) ( x−x 2 )( x−x 3 ) ( x−x 0 ) ( x−x 1 )( x −x3 ) ( x−x 0 ) ( x−x 1 ) ( x−x
y= y0+ y1+ y2+
( x 0−x 1 ) ( x 0−x 2 ) ( x 0−x 3 ) ( x 1−x 0 )( x 1−x 2 ) ( x 1−x 3 ) ( x2 −x 0 )( x 2−x 1 ) ( x 2−x 3 ) ( x3 −x 0 )( x 3− x1 ) ( x 3−
Put x=2
3 2
y=2 −7 ( 2 ) + 18(2)−12
y=4
4. Use Lagrange’s interpolation formula to fit a polynomial for the data y ( 1 )=3 ,
y ( 3 )=9 , y ( 4 )=30 , y ( 6 )=132.
Sol: Given x 0=1 x 1=3 x 2=4 x 3=6
y 0=3 y 1=9 y 2=30 y 3=132
Wkt
( x−x 1 )( x −x2 ) ( x−x 3 ) ( x−x 0 ) ( x−x 2 )( x−x 3 ) ( x−x 0 ) ( x−x 1 )( x −x3 ) ( x−x 0 ) ( x−x 1 ) ( x−x
y= y0+ y1+ y2+
( x 0−x 1 ) ( x 0−x 2 ) ( x 0−x 3 ) ( x 1−x 0 )( x 1−x 2 ) ( x 1−x 3 ) ( x2 −x 0 )( x 2−x 1 ) ( x 2−x 3 ) ( x3 −x 0 )( x 3− x1 ) ( x 3−
−( x 3−13 x 2 +54 x−72 ) +15 ( x 3−11 x 2 +34 x−24 )−50 ( x 3−10 x 2 +27 x−18 ) + 44 ( x 3−8 x 2 +19 x−12 )
y=
10
3 2 3 2 3 2 3 2
−x +13 x −54 x+ 72+15 x −165 x +510 x−360−50 x +500 x −1350 x +900+ 44 x −352 x + 836 x−528
y=
10
3 2
8 x −4 x −58 x +84
y=
10
2 ( 4 x 3 −2 x 2−29 x +42 )
y=
10
( 4 x 3−2 x2 −29 x + 42 )
y= , is the required polynomial.
5
5. Use Lagrange’s interpolation formula to find y at x=5 for the data y ( 1 )=3 ,
y ( 3 )=18 , y ( 4 )=30 , y ( 6 )=132.
Numerical Integration
b
Problems
6
0
rd
1
Simpson’s rule.
3
Sol: Given a=0 , b=6 , y=3 x 2
b−a
Now, h=
n
6−0
h=
6
h=1 , n=6
x 0 1 2 3 4 5 6
2
y=3 x 0 3 12 27 48 75 108
Wkt,
b
∫ y dx= h3 [ ( y 0 + y 6 ) + 4 ( y 1 + y 3 + y 5 ) +2 ( y 2 + y 4 ) ]
a
∫ 3 x 2 dx=216.
0
1 rd
2. Evaluate ∫ 1+dxx 2 using Simpson’s
1
3
rule by taking 5 ordinates (4 equal parts) and
0
hence deduce an approximate value of π .
1
Sol: Given a=0 , b=1 , y= 2
1+ x
b−a
Now, h=
n
1−0
h=
4
1
h= , n=4
4
x 0 1 2 3 1
4 4 4
Wkt,
b
∫ y dx= h3 [ ( y 0 + y 4 )+ 4 ( y 1+ y 3 ) + 2 ( y 2 ) ]
a
1
1
1 4
∫ 1+ x 2 dx= 3 [ ( 1+0.5 )+ 4 ( 0.9412+0.64 ) +2 ( 0.8 ) ]
0
1
∫ 1+1x 2 dx=0.7854
0
By integration,
0
−1 −1
0.7854=tan 1−tan 0
π
0.7854=
4
π=3.1416
[ ]
rd
2
1 π
3. Find the approximate value of ∫ √ cosθ dθ by Simpson’s rule by dividing 0 ,
3 2
0
into 6 equal parts.
π
Sol: Given a=0 , b= , y= √ cosθ
2
b−a
Now, h=
n
π
−0
2 ;
h=
6
π °
h= =15 ,
12
n=6
z 0
°
15
° °
30 45
°
60
°
75
°
90
°
Wkt,
b
∫ y dx= h3 [ ( y 0 + y 6 ) + 4 ( y 1 + y 3 + y 5 ) +2 ( y 2 + y 4 ) ]
a
π π
2
12
∫ √cosθ dθ= 3 [ (1+ 0 ) +4 ( 0.9828+0.8409+0.5087 ) +2 ( 0.9306+0.7071 ) ]
0
π
2
∫ √cosθ dθ=1.1873
0
0.6 rd
1
4. Evaluate ∫ e
2
−x
dx using Simpson’s rule by dividing [ 0 , 0.6 ] in 6 subintervals.
0 3
2
Sol: Given a=0 , b=0.6 , y=e−x
b−a
Now, h=
n
0.6−0
h=
6
h=0.1, n=6
x 0 0.1 0.2 0.3 0.4 0.5 0.6
2
Wkt,
b
∫ y dx= h3 [ ( y 0 + y 6 ) + 4 ( y 1 + y 3 + y 5 ) +2 ( y 2 + y 4 ) ]
a
0.6
∫ e− x dx= 0.1
2
3
[( 1+0.6977 ) +4 ( 0.99+0.9139+0.7788 )+ 2 ( 0.9608+ 0.8521 ) ]
0
0.6
∫ e− x dx=0.5351
2
1 rd
dx 1
5. Evaluate 2∫(
using Simpson’s rule by taking 7 ordinates.
0 1+ x ) 3
1
Sol: Given a=0 , b=1 , y=
( 1+ x )2
b−a
Now, h=
n
1−0
h=
6
1
h= , n=6
6
x 0 1 2 3 4 5 1
6 6 6 6 6
∫ y dx= h3 [ ( y 0 + y 6 ) + 4 ( y 1 + y 3 + y 5 ) +2 ( y 2 + y 4 ) ]
a
1
1
1 6
∫ ( 1+ x )2 dx= 3 [ ( 1+ 0.25 ) +4 ( 0.7347+0.4444 +0.2975 ) +2 ( 0.5625+0.36 ) ]
0
1
1
∫( 2
dx=0.5001
0 1+ x )
1 rd
x 1
6. Evaluate ∫ 2
dx using Simpson’s rule by taking 6 equal parts and hence find
0 1+ x 3
log2.
x
Sol: Given a=0 , b=1 , y= 2
1+ x
b−a
Now, h=
n
1−0
h=
6
1
h= , n=6
6
x 0 1 2 3 4 5 1
6 6 6 6 6
∫ y dx= h3 [ ( y 0 + y 6 ) + 4 ( y 1 + y 3 + y 5 ) +2 ( y 2 + y 4 ) ]
a
1
1
x 6
∫ 1+ x 2 dx= 3 [ ( 0+0.5 ) + 4 ( 0.1622+0.4 +0.4918 ) +2 ( 0.3+0.4615 ) ]
0
∫ 1+xx 2 dx=0.3466
0
By integration,
1 1
1
0.3466= [ log 2−log 1 ]
2
log 2=2∗0.3466
log 2=0.6932
π
dx
7. Evaluate ∫ by taking 6 sub intervals.
0 2+cosx
1
Sol: Given a=0 , b=π , y=
2+cosx
b−a
Now, h=
n
π −0
h=
6
π
h= =30 ° , n=6
6
x 0° 30 ° 60 ° 90 ° 120 ° 150 ° 180 °
Wkt,
b
∫ y dx= h3 [ ( y 0 + y 6 ) + 4 ( y 1 + y 3 + y 5 ) +2 ( y 2 + y 4 ) ]
a
π
π
1 6
∫ 2+cosx dx= 3 [ ( 0.3333+1 ) + 4 ( 0.3489+0.5+ 0.8819 ) +2 ( 0.4+ 0.6667 ) ]
0
π
1
∫ 2+cosx dx=1.8134
0
8
1
8. Evaluate ∫ dx by taking 6 sub intervals.
2 log 10 x
1
Sol: Given a=2 , b=8 , y=
log10 x
b−a
Now, h=
n
8−2
h=
6
h=1, n=6
x 2 3 4 5 6 7 8
Wkt,
b
∫ y dx= h3 [ ( y 0 + y 6 ) + 4 ( y 1 + y 3 + y 5 ) +2 ( y 2 + y 4 ) ]
a
∫ log1 x
dx=
1
3
[ ( 3.3219+1.1073 )+ 4 ( 2.0959+1.4307 +1.1833 ) +2 ( 1.661+ 1.2851 ) ]
2 10
∫ log1 x
dx=9.7203
2 10
th
3
Simpson’s rule
8
Formula:
b
Problems
1 th
1 3
1. Evaluate ∫ dx by taking 7 ordinate using Simpson’s rule. Hence deduce the
0 ( 1+ x ) 8
value of log2.
1
Sol: Given a=0 , b=1 , y=
( 1+ x )
b−a
Now, h= , n=6
n
1−0
h=
6
1
h=
6
x 0 1 2 3 4 5 1
6 6 6 6 6
∫ y dx= 38h [ ( y 0 + y 6 ) +3 ( y 1 + y 2 + y 4 + y 5 ) + 2 ( y 3 ) ]
a
3∗1
1
1 6
∫ ( 1+ x ) dx= 8 [ ( 1+0.5 ) +3 ( 0.8571+0.75+ 0.6+0.5455 )+ 2 ( 0.6667 ) ]
0
∫ ( 1+1 x ) dx=0.6932
0
By integration,
0
0.6932= [ log 2−log 1 ]
log 2=0.6932
th 4 1
3
2. Use Simpson’s rule to evaluate ∫ e x dx by taking 3 equal parts.
8 1
1
Sol: Given a=1 , b=4 , y=e x
b−a
Now, h= , n=3
n
4−1
h=
3
h=1
x 1 2 3 4
1
2.7183 1.6487 1.3956 1.2840
y=e x
Wkt,
b
∫ y dx= 38h [ ( y 0 + y 3 ) +3 ( y 1 + y 2 ) ]
a
4 1
3∗1
∫ e x dx= 8
[ ( 2.7183 +1.2840 ) +3 ( 1.6487 + 1.3956 ) ]
1
4 1
∫e x
dx=4.9257
1
5.2 th
3
3. Evaluate ∫ log e x dx using Simpson’s rule by taking 6 equal parts.
4 8
Sol: Given a=4 , b=5.2 , y=log e x
b−a
Now, h= , n=6
n
5.2−4
h=
6
h=0.2
x 4 4.2 4.4. 4.6 4.8 5.0 5.2
Wkt,
b
∫ y dx= 38h [ ( y 0 + y 6 ) +3 ( y 1 + y 2 + y 4 + y 5 ) + 2 ( y 3 ) ]
a
5.2
3∗( 0.2 )
∫ log e x dx= 8
[ ( 1.3863+1.6487 ) +3 ( 1.4351+1.4816 +1.5686+1.6094 ) +2 (1.5261 ) ]
4
5.2
∫ log e x dx=1.8278
4
0.3 3 th
3
4. Evaluate ∫ ( 1−8 x ) dx using Simpson’s
2 2
rule by taking 7 ordinates.
0 8
3
Sol: Given a=0 , b=0.3 , y=( 1−8 x 2 ) 2
b−a
Now, h= , n=6
n
0.3−0
h=
6
h=0.05
3
1 0.9702 0.8824 0.7425 0.5607 0.3536 0.1482
y=( 1−8 x )
2 2
Wkt,
b
∫ y dx= 38h [ ( y 0 + y 6 ) +3 ( y 1 + y 2 + y 4 + y 5 ) + 2 ( y 3 ) ]
a
0.3 3
3∗( 0.05 )
∫ ( 1−8 x 2 ) 2 dx= 8
[ ( 1+0.1482 ) +3 ( 0.9702+0.8824 +0.5607+ 0.3536 ) +2 ( 0.7425 ) ]
0
0.3 3
∫ ( 1−8 x ) 2 2
dx=0.2050
0
1 2 th
x 3
5. Evaluate ∫ 3
dx using Simpson’s rule by taking 7 ordinates and hence find
0 1+ x 8
log2.
2
x
Sol: Given a=0 , b=1 , y= 3
1+ x
b−a
Now, h= , n=6
n
1−0
h=
6
1
h=
6
x 0 1 2 3 4 5 1
6 6 6 6 6
2
x 0 0.0276 0.1071 0.2222 0.3429 0.4399 0.5
y= 3
1+ x
Wkt,
b
∫ y dx= 38h [ ( y 0 + y 6 ) +3 ( y 1 + y 2 + y 4 + y 5 ) + 2 ( y 3 ) ]
a
3∗1
1 2
x 6
∫ 1+ x 3 dx= 8 [ ( 0+0.5 )+ 3 ( 0.0267+0.1071+0.3429+ 0.4399 ) +2 ( 0.2222 ) ]
0
1 2
∫ 1+x x 3 dx=0.2311
0
By integration,
1 2 1 2
∫ 1+x x 3 dx= 13 ∫ 1+
3x
x
3
dx
0 0
1 1
0.2311=
3
[ log ( 1+ x ) ]0
3
1
0.2311= [ log 2−log 1 ]
3
log 2=3∗0.2311
⇒ log 2=0.6933
6 th
dx 3
6. Evaluate ∫ 2 using Simpson’s rule by taking 7 ordinates.
0 1+ x 8
1
Sol: Given a=0 , b=6 , y= 2
1+ x
b−a
Now, h= , n=6
n
6−0
h=
6
h=1
x 0 1 2 3 4 5 6
Wkt,
b
∫ y dx= 38h [ ( y 0 + y 6 ) +3 ( y 1 + y 2 + y 4 + y 5 ) + 2 ( y 3 ) ]
a
∫ 1+1x 2 dx=1.3571
0
1 th
x 3
7. Evaluate ∫ 2
dx using Simpson’s rule by taking 3 equal parts and hence find
0 1+ x 8
log √ 2.
x
Sol: Given a=0 , b=1 , y= 2
1+ x
b−a
Now, h= , n=3
n
1−0
h=
3
1
h=
3
x 0 1 2 1
3 3
∫ y dx= 38h [ ( y 0 + y 3 ) +3 ( y 1 + y 2 ) ]
a
3∗1
1
x 3
∫ 1+ x 2 dx= 8 [ ( 0+0.5 )+ 3 ( 0.3+0.4615 ) ]
0
∫ 1+xx 2 dx=0.3481
0
By integration,
1 1
1 1
0.3481=
2
[ log ( 1+ x ) ]0
2
1
0.3481= [ log 2−log 1 ]
2
1
log 2=0.3481
2
log √ 2=0.3481
π
th
2
3
8. Evaluate ∫ e sinx dx using Simpson’s rule by taking 3 equal parts.
8
0
π
Sol: Given a=0 , b= , y=e sinx
2
b−a
Now, h= , n=3
n
π
−0
2
h=
3
π
h= =30 °
6
x 0° 30 ° 60 ° 90 °
sinx
y=e 1 1.6487 2.3774 2.7183
Wkt,
b
∫ y dx= 38h [ ( y 0 + y 3 ) +3 ( y 1 + y 2 ) ]
a
π 3∗π
2
6
∫ e sinx dx= 8 [ ( 1+2.7183 ) +3 ( 1.6487+2.3774 ) ]
0
π
2
∫ e sinx dx=3.1001
0