Notes-Unit3-NM Differentiation & Integration
Notes-Unit3-NM Differentiation & Integration
integral of the function y=f ( x ) at a given point. When the x -values are
equally spaced, we use Newton’s forward or backward difference formula
'
to fit a polynomial, differentiate it to get the polynomial representing f ( x )
. For unequal intervals, we use Newton’s divided difference formula or
Lagrange’s formula to fit the polynomial and then differentiate it.
[ ]
2
dy 1 2 u−1 2 3u −6 u+2 3 3 2 4
= Δ y 0+ Δ y0+ Δ y 0 +4 u −18 u +22u−6 ¿ ¿ ¿ 24 Δ y 0+… …
dx h 2 6
[ ]
2
d2 y 1 2 (6 u −18 u+11) 4
2
= 2 Δ y 0 + ( u−1 ) Δ 3 y 0 − Δ y 0 +… …
dx h 12
d3 y 1 3
dx 3
h [
= 3 Δ y 0−
( 12u−18) 4
12
Δ y 0+… … ]
At x=x 0,i.e u=0, the above equations reduce to
( )
dy 1
0
1
2 [ 1
3
1
= Δ y 0− Δ2 y 0+ Δ3 y 0− Δ 4 y 0 +……
dx x=x h 4 ]
( ) [ ]
2
d y 1 2 3 11 4
2
= 2
Δ y 0− Δ y 0− Δ y 0+ ……
dx x= x0 h 12
( )
d3 y
dx 3 x= x0
=
1 3
h 3 [ 3
Δ y 0 − Δ 4 y 0+… …
2 ]
Newton’s backward difference formula for derivative:
[ ]
2
dy 1 2 v+1 2 3 v +6 v +2 3 3 2 4
= ∇ yn + ∇ yn+ ∇ y n +4 v +18 v +22 v −6 ¿ ¿ ¿ 24 ∇ y n +……
dx h 2 6
[ ]
2
d2 y 1 2 (6 v +18 v +11) 4
2
= 2 ∇ y n + ( v +1 ) ∇ 3 y n+ ∇ y n +… …
dx h 12
d3 y 1 3
dx 3
h [
= 3 ∇ yn+
(12 v +18) 4
12
∇ y n +……]
At x=x n,i.e v=0, the above equations reduce to
( )
dy
n
1
[1
2
1
3
1
= ∇ y n + ∇ 2 y n + ∇3 y n + ∇ 4 y n+… …
dx x−x h 4 ]
[ ]
2
d y 1 2 3 11 4
2
= 2 ∇ y n +∇ y n + ∇ y n+ ……
dx h 12
[ ]
3
d y 1 3 3 4
3
= 3 ∇ y n + ∇ y n+ ……
dx h 2
Problems
1. From the following table, which gives the velocity of a body at time t
find the acceleration at t=1.1
t : 1.0 1.1 1.2 1.3 1.4
v: 43.1 47.7 52.1 56.4 60.8
Solution:
X y ∆y ∆ y
2 3
∆ y ∆ y
4
1.0 43.1
4.6
1.1 47.7 -0.2
4.4 0.1
1.2 52.1 -0.1 0.1
4.3 0.2
1.3 56.4 0.1
4.4
1.4 60.8
dv dy
Accleration= =
dt dx
1.1.−1.0
t=1.1 ,u= =1
0.1
[ ]
2
dy 1 2 u−1 2 3u −6 u+2 3 3 2 4
= Δ y 0+ Δ y0+ Δ y 0 +4 u −18 u +22u−6 ¿ ¿ ¿ 24 Δ y 0+… …
dx h 2 6
dy 1
=
dx 0.1
4.6 +
2−1
2 [
(−0.2 ) +
3−6+2
6
( 0.1 ) + 4−18+22−6 ¿ ¿ ¿ 24 ( 0.1 ) +… . ]
= 44.
Time (sec) 0 5 10 15 20
Velocity 0 3 14 69 228
(m/sec)
Find (a) Initial acceleration using the entire data b) Final acceleration
Solution: The difference table is
t=x ∆y 2
∆ y
3
∆ y ∆ y
4
V=y
0 0
3
5 3 8
11 36
10 14 44 24
55 60
15 69 104
159
20 228
dv
For intial acceleration at t=0.here h=5
dt
Therefore we use newtons forward difference formula
( )
dy 1 1
2
0
1
3 [ 1
= Δ y 0− Δ2 y 0+ Δ3 y 0− Δ 4 y 0 +……
dx x=x h 4 ]
( dydx )t =0
=
1
5[ 1 1 1
3− ( 8 ) + ( 36 )− ( 24 ) + …
2 3 4 ]
1
= [ 3−4+12−6+… ] = 1 ( 5 )=1
5 5
∴ Initial acceleration (acceleration when t = 0) is 1 m/sec2
(b) Final acceleration exists at t = 20 = x4 [Nearer to.endingo.f table], so
use Newton’s backwarddifference interpolation formula for first derivative,
put
( ) ( )
dy
dx x−x
=
n
dy 1
dx t=20 h
1
2 [ 1
3
1
= ∇ y n + ∇2 y n+ ∇3 y n + ∇ 4 y n+… …
4 ]
¿
1
5 ( 1 1 1
159+ ( 104 ) + ( 60 )+ ( 24 )
2 3 4 )
1 2
¿ ( 237 )=47.2 m/sec
5
2
dy d y
3.Find and 2 at x=51 from the following data.
dx dx
X 50 60 70 80 90
Y 19.96 36.65 58.81 77.21 94.61
x−x 0 51−50
u= = =0.1
h 10
At x=51,u=0.1
x y ∆y 2
∆ y
3
∆ y
4
∆ y
50 19.96
16.69
60 36.65 5.47
22.16 -9.23
70 58.81 -3.76 11.99
18.40 2.76
80 77.21 -1
17.40
90 94.61
[ ]
2
dy 1 2 u−1 2 3u −6 u+2 3 3 2 4
= Δ y 0+ Δ y0+ Δ y 0 +4 u −18 u +22u−6 ¿ ¿ ¿ 24 Δ y 0+… …
dx h 2 6
[ ]
2
dy 1 0.2−1 3 ( 0.1 ) −6 ( 0.1 ) +2 3 2
= 16.69+ (5.47)+ (−9.23)+4 ( 0.1 ) −18 ( 0.1 ) +22(0.1)−6 ¿ ¿ ¿ 24 (11.99)
dx 10 2 6
dy 1
= [ 16.69−2.188−2.1998−1.9863 ( 5.47 ) ]
dx 10
¿ 1.0316
[ ]
2
d2 y 1 2 (6 u −18 u+11) 4
2
= 2 Δ y 0 + ( u−1 ) Δ 3 y 0 − Δ y 0 +… …
dx h 12
[ ]
( 6 ( 0.1 ) −18 ( 0.1 ) +11 )
2 2
d y 1
2
= 5.47 + ( 0.1−1 ) (−9.23)− (11)
dx 100 12
2
d y 1
2
= [ 5.47+ 8.307+9.2523 ]
dx 100
¿ 0.2303
4. A rod is rotating in a plane. The following table gives the angle θ (in
radians) through which the rod has turned for various values of time t
(seconds). Calculate the angular velocity and angular acceleration of the
rod at t=0.6 seconds.
t 0 0.2 0.4 0.6 0.8 1
θ 0 0.12 0.49 1.12 2.02 3.20
Solution:
Here x=0.6 lies at the end of the table.so we use backward difference
formula
To find angular velocity we use formula (1), to find angular acceleration
we formula (2)
[ ]
2
dy 1 2 u−1 2 3u −6 u+2 3 3 2 4
= Δ y 0+ Δ y0+ Δ y 0 +4 u −18 u +22u−6 ¿ ¿ ¿ 24 Δ y 0+… … ---(1)
dx h 2 6
d2 y 1 2
=
dx 2 h2 [ 3
Δ y 0 + ( u−1 ) Δ y 0 −
(6 u2−18 u+11) 4
12 ]
Δ y 0 +… … −−(2)
x −x n 0.6−1
v= = =−2
h 0.2
x ∆y 2
∆ y
3
∆ y
4
∆ y
y
0 0
16.69
0.2 0.12 5.47
22.16 -9.23
0.4 0.49 -3.76 11.99
18.40 2.76
0.6 1.12 -1
17.40
0.8 2.02
1 3.20
dθ 1
=
dt 0.2 [ 3 1
1.18− (0.28)+ (0.01)
2 3 ]
dθ
=5 [ 1.18−0.42+ 0.00333 ]
dt
=3.81665radians/sec
2
d θ 1
2
= [ 0.28−0.01 ]
dt 0.04
=6.75 radians/sec2
1
5. Find the first two derivatives of x 3 at x = 50 and x = 56 from the table:
x 50 51 52 53 54 55 56
1
3
3.6840 3.7084 3.7325 3.7563 3.7798 3.8030 3.8259
y=x
Solution:
x ∆y 2
∆ y
3
∆ y
Y
50 3.6840
0.0244
51 3.7084 -0.0003
0.0241 0
52 3.7325 -0.0003
0.0238 0
53 3.7563 -0.0003
0.0235 0
54 3.7798 -0.0003
0.0232 0
55 3.8030 -0.0003
0.0229
56 3.8259
x−x 0 50−50
u= = =0 , x 0=x=50,then,
h 1
( dydx ) x=x 0
=
1
h [ 1 1 1
Δ y 0− Δ2 y 0+ Δ3 y 0− Δ 4 y 0 +……
2 3 4 ]
( ) [ ]
2
d y 1 2 3 11 4
2
= 2
Δ y 0− Δ y 0− Δ y 0+ ……
dx x= x0 h 12
( dydx ) x=x
[1
=1 0.0244− (−0.0003 )
0
2 ]
¿ 0.0246
( )
2
d y
2
=1 [ −0.0003 ] =−0.0003
dx x= x 0
( dydx ) x−x n
=
1
h [ 1 1 1
∇ y n + ∇ 2 y n + ∇3 y n + ∇ 4 y n+… …
2 3 4 ]
( dydx ) x−x n
=
1
h [ 1
0.0229+ (−0.0003 )
2 ]
¿ 0.0228
[ ]
2
d y 1 2 3 11 4
2
= 2 ∇ y n +∇ y n + ∇ y n+ ……
dx h 12
2
d y
2
=1 (−0.0003 )
dx
¿−0.0003
6.Find the first derivatives of the function at x=2 and x=4 from the table.
Solution:To find
[ ]
2
dy 1 2 u−1 2 3u −6 u+2 3 3 2 4
= Δ y 0+ Δ y0+ Δ y 0 +4 u −18 u +22u−6 ¿ ¿ ¿ 24 Δ y 0+… …
dx h 2 6
x ∆y 2
∆ y
3
∆ y
4
∆ y
Y
1.5 3.375
3.6250
2 7 3
6.625 0.75
2.5 13.625 3.75 0
10.3750 0.75
3 24 4.5 0
14.8750 0.75
3.5 38.875 5.25
20.1250
4 59
x−x 0
When x=2, u= ,h=0.5 , thenu=1
h
dy 1
=
dx 0.5 [ 1 1
3625+ ( 3 )− (0.75) =10
2 6 ]
[ ]
2
dy 1 2 v+1 2 3 v +6 v +2 3 3 2 4
= ∇ yn + ∇ yn+ ∇ y n +4 v +18 v +22 v −6 ¿ ¿ ¿ 24 ∇ y n +……
dx h 2 6
x −x n
When x=4, v= , h=0.5 , then v=0
h
dy 1
=
dx 0.5 [ 1 1
20.125+ ( 5.25 )+ (0.75) = 46 .
2 3 ]
Practice problems
1. A rod is rotating in a plane. The following table gives the angle θ (in
radians) through which the rod has turned for various values of time t
(seconds). Calculate the angular velocity and angular acceleration of the
rod at t = 0.6 seconds.
t: 0 0.2 0.4 0.6 0.8 1.0
θ: 0 0.12 0.49 1.12 2.02 3.20
3. Find the gradient of the road at the middle point of the elevation above
a datum line of seven
points of road which are given below:
x: 0 300 600 900 1200 1500 1800
y: 135 149 157 183 201 205 193
4. The population (in thousands) of a certain town is given below. Find
the rate of growth of the population in 1931 and 1971.
Year x: 1931 1941 1951 1961 1971
Population y : 40.62 60.80 79.95 103.56 132.65
5. Find the first three derivatives of the function at x=1 .5 and x=4 . 0 from
the table:
x: 1.5 2.0 2.5 3.0 3.5 4.0
y: 3.375 7.0 13.625 24.0 38.875 59.0
6. A curve passes through the points (0, 18), (1, 10), (3, -18) and (6, 90).
Find the slope of the curve at
x=2 .
x: 0 2 3 4 7 9
f (x): 4 26 58 112 466 922
The population (in thousands) of a certain town is given below. Find the
rate of growth of the population in 1931 and 1961.
Year x: 1931 1941 1951 1961 1971
Population :y 40.62 60.80 79.95 103.56 132.65
Soln:
[ ]
2
dy 1 2 u−1 2 3u −6 u+2 3 3 2 4
= Δ y 0+ Δ y0+ Δ y 0 +4 u −18 u +22u−6 ¿ ¿ ¿ 24 Δ y 0+… …
dx h 2 6
[ ]
2
dy 1 2 v+1 2 3 v +6 v +2 3 3 2 4
= ∇ yn + ∇ yn+ ∇ y n +4 v +18 v +22 v −6 ¿ ¿ ¿ 24 ∇ y n +……
dx h 2 6
x ∆y 2
∆ y
3
∆ y
4
∆ y
Y
1931 40.62
20.18
1941 60.80 -1.03
19.15 5.49
1951 79.95 4.46 -4.47
23.61 1.02
1961 103.56 5.48
29.09
1971 132.65
X=1931, x0=1931,u=(x-x0)/h ,u=0,h=10
dy 1
=
dx 10 [
1 1
20.18− (−1.03)+ (5.49)+
2 3
−1
4
(−4.47) =2.3643
]
X=1961,xn=1971,v=x-xn/h, h=10, v=-1
[ ]
2
dy 1 2 (−1 )+ 1 3 (−1 ) +6 (−1 )+ 2
= 29.09+ (5.48)+ (1.02)+4 (−1 )3+ 18 (−1 )2 +22(−1)−6 ¿ ¿ ¿ 24(−4.47)
dx 10 2 6
=1/10(29.09-2.74-0.17+0.3725)
=2.6553
[ ]
2
dy 1 2 u−1 2 3u −6 u+2 3 3 2 4
= Δ y 0+ Δ y0+ Δ y 0 +4 u −18 u +22u−6 ¿ ¿ ¿ 24 Δ y 0+.. = 0
dx h 2 6
Solving above equation for u , we get values for u.
Using x=x0+uh, we get the values x at which y is an extremum.
1.Find the value of x for which y is minimum and find the minimum value:
x: 0.60 0.65 0.70 0.75
y: 0.6221 0.6155 0.6138 0.6170
x ∆y ∆ y
2 3
∆ y
y
0.60 0.6221
-0.0066
0.65 0.6155 0.0049
-0.0017 0
0.70 0.6138 0.0049
0.0032
0.75 0.6170
x−0.60
u=
0.05
[ ]
2
dy 1 2 u−1 2 3u −6 u+2 3 3 2 4
= Δ y 0+ Δ y0+ Δ y 0 +4 u −18 u +22u−6 ¿ ¿ ¿ 24 Δ y 0+.. -------(1)
dx h 2 6
i.e.,
dy
=
1
dx 0.05 [
−0.0066 +
2 u−1
2 ]
( 0.0049) -------(2)
[ ( 0.05 )
]
x−0.60
2 −1
i.e., dy 1 -------------(3)
= −0.0066 + (0.0049)
dx 0.05 2
To find max or min value, equate first derivative to zero.
1
0.05 [
− 0.0066+
2u−1
2
(0.0049) =0
]
−0.0066 (2 u−1) (0.0049)
+ =0
0.05 2 0.05
-0.1320 +0.049(2u-1)=0
0.049(2u-1)=0.1320
2u-1=0.1320/0.049
=2.6939
2u=2.6939+1
x−x 0
From the formula u= we find x
h
(i.e) x=x0+uh
= 0.60+1.8469(0.05)
=0.6923
Therefore y is minimum when x=0.6923.
Minimum y=0.6221+(1.8469)(−0.0066)+((1.8469)(1.8469−1))/2(0.0049)
¿ 0.6137
2. Find the value of x for which y is maximum and find the maximum
value
x: 1.2 1.3 1.4 1.5 1.6
y: 0.9320 0.9636 0.9855 0.9975 0.9996
x y Δy Δ2 y Δ3 y
1.2 0.9320
0.0316
1.3 0.9636 -0.0097
0.0219 -0.0002
x−0.60
u=
0.05
[ ]
2
dy 1 2 u−1 2 3u −6 u+2 3 3 2 4
= Δ y 0+ Δ y0 + Δ y 0 +4 u −18 u +22u−6 ¿ ¿ ¿ 24 Δ y 0+..
dx h 2 6
Implies
dy 1
=
dx 0.1 [
0.0316+
2 u−1
2 ]
(−0.0097) =¿0,
u=3.7577
x−x 0
From the formula u= we find x
h
(i.e) x=x0+uh
1.2+3.7577(0.1)
x =1.5758
Thereforemaximum y=0.9320+0.11874-0.0502586=1.00048=1
Derivatives using Newton’s divided differences
Let x 0 , x 1 , x 2 ,.......... , x n be n+1 arguments which may or may not be equally
spaced.
Problems
1. Find the value of f ' (8), f ' ' (9), from the following data, using an
approximate interpolation formula.
x: 4 5 7 10 11
y: 48 100 294 900 1210
Solution
x f (x) ⏃f ( x ) ⏃2 f ( x ) ⏃3 f ( x ) ⏃4 f ( x )
4 48
52=(100-
48)\(5-4)
5 100 97−52
=¿
7−4
15
294−100 1
=97
7−5
7 294 202−97 0
=¿
10−5
21
900−294 1
10−7
=202
10 900 310−202
=¿
11−7
27
1210−900
=¿
11−10
310
11 1210
f (x)=48+(x−4 )(52)+(x−4 )(x−5)(15)+(x−4)(x−5)(x−7)(1)
3 2
¿ 48+ 52 x−208+ 15 x −9 x+20+ x −x (16)+ x (83)−140
3 2
¿ x + x (−16+15)+ x( 83−135+52)−208+ 300−140+ 48
3 2
¿ x −x + x( 0)+ 0
3 2
∴ f ( x )=x – x
2
f ' ( x)=3 x −2 x , f ' (8)=176
f ' ' (x)=6 x−2 , f ' '(9)=52
Use Newton’s formula to find f ( x ) from the following data and hence find
'
f (6 )
x: 1 2 7 8
y: 1 5 5 4
x f (x) ⏃f ( x ) ⏃2 f ( x ) ⏃3 f ( x )
1 1
4
2 5 −2
3
0 1
14
7 5 −1
6
-1
8 4
¿ 1+ ( x−1 ) ( 4 ) + ( x−1 ) ( x −2 ) ( −23 )+( x−1) ( x−2) ( x −7) ( 141 )¿ 421 (3 x −58 x + 321 x−224 )
3 2
1
'
f ( x )= ( 9 x2 −116 x+ 321 )
42
' 1
f ( 6 )= ( 9 ( 36 )−116 ( 36 ) +321 )
42
1
¿ ( 324−4176+321 )=−84.07
42
2. Find the value of y ' ¿), from the following data, using an
approximate interpolation formula,also find the maximum value of
f(x)
x 0 2 3 4 7 9
y (x ) 4 26 58 112 466 922
Solution:
Since the arguments are not equally spaced , we will use newtons divided
difference formula.
x y ⏃f ( x ) ⏃2 f ( x ) ⏃3 f ( x ) ⏃4 f ( x )
0 4
11
2 26 7
32 1
3 58 11 0
54 1
4 112 16 0
118 1
7 466 22
228
9 922
y=4+(x−0)(11)+(x−0)(x−2)(7)+(x−0)(x−2)( x−3)(1)
3 2
¿ 4 +3 x+ x +2 x
2
y '(x )=3 x + 4 x +3
Therefore 3 x 2+ 4 x +3=0.
X=(-4± i √ 20 )/6
Practice problems
' ''
1. Evaluate y and y at x=2 given:
x: 0 1 3 6
y: 18 1 -18 40
' ''
2. Find f ( 4 ) and f ( 4 ) from the table:
x: 0 2 3 5
f (x): 8 6 20 108
Numerical integration
b
The process of computing ∫ ydx from set of tabulated values
a
∫ yd x= h2 [ ( y 0 + y n ) +2 ( y 1+ y 2+ .........+ y n−1) ]
a
h
¿
2
[ ( sumof first and last ordinates ) +2 ( sum of remaining ordinates ) ]
3
h
¿
2
[ ¿ ( sumof first and last ordinates ) + 4 ( sum of ordinates with odd subscripts ) +¿∧2 ( sum of remaining ordina
b
∫ x 4 dx =97.2
−3
1
2 .Evaluate ∫ 1+dxx 2 by using (1).Trapezoidal rule with h=0.2.
0
∫ 1+dxx 2 =¿ 0.2
2
[ ( 1+0.5 ) +2 ( 0.96154+0.86207+ 0.73529+0.60976 ) ] ¿¿ 0.783732
0
2. Dividing the range into 10 equal parts, find the approximate value of
π
by actual integration.
b−a π −0 π
Soln: a=0, b= n=10, = = =h
n 10 10
x 0 π 2π 3π 4π 5π 6π 7π 8π 9π π
10 10 10 10 10 10 10 10 10
y 0 0.3090 0.5878 0.8090 0.9511 1 0.95 0.809 0.5878 0.309 0
11 0 0
π
Here h=
10
[ )]
π
0
π
∫ sin x dx=¿ 20 (
( 0+0 ) +2 ¿ 0.3090+0.5878+0.8090+ 0.9511+1 ¿¿ 1.9843
¿+ 0.9511+0.8090+ 0.5875+0.3090
(2).Simpson’s one-third rule
[ ]
π
π
∫ sin x dx=¿ 30
0
( )
( 0+0 ) + 4 ¿ 0.3090+0.8090+1 + 2 ( 0.5878+0.9511+0.5878+ 0.9511) ¿
¿+ 0.8090+0.3090
¿ 2.00091
π
5. The table below gives the velocity v of a moving particle at time t sec.
Find the distance covered by the particle in 12 sec and also the
acceleration at t = 2 secs
t 0 2 4 6 8 10 12
v 4 6 16 34 60 94 136
2−0
u= .=1
2
Formula
( )
2 3 2
dy 1 2u−1 2 3 u −6 u+ 2 3 4 u −18 u +22u−6 4
= Δ y0 + Δ y0+ Δ y0+ Δ y 0+........
dx h 2 6 24
x y Δy 2
Δ y
3
Δ y
0 4
2
2 6 8
10 0
4 16 8
18 0
6 34 8
26 0
8 60 8
34 0
10 94 8
42
12 136
=0.5((2+0.5(8))
3m/sec 2
0
3/8thrule, dividing the
range into 6 equal parts.
1
3. Evaluate ∫ 1+dxx 2 using trapezoidal rule, with h=0.2. Hence obtain an
0
approximate value of π .
4.Dividing the range into 10 equal parts, find the approximate value of
π
∫ sin x dx by
0
Trapezoidal ruleand Simpson’s 1/3rdrule.Verify the answers by actual
integration.
Double integration
d b
To evaluate a double integral ∫∫ f ( x , y ) dxdy with constant limits , using
c a
trapezoidal rule , either we are given the table, or we form the table,
consisting of values of f ( x , y ) for different values of x and y in the required
intervals.
The x values are equally spaced with Δx=h and the y values are equally
spaced with Δy=k . Let the x values be given horizontally at the top of the
table and the y values be given vertically alon the left side of the table.
b
Using trapezoidal rule for each row gives us ∫ f ( x , y ) dx for various y
a
Trapezoidal rule:
d b
Simpsons rule:
d b
of fat the odd positionson the boundary except the corners )+4(sum of the
values of f at the even positionson the boundary except the corners )
+4(sum of the values of f at odd positionson the odd rows of the matrix
except boundary rows)+8(sum of the values of f at even positionson the
odd rows of the matrix except boundary rows)+8(sum of the values of f at
odd positionson the even rows of the matrix except boundary rows)
+16(sum of the values of f at even positionson the even rows of the
matrix except boundary rows)
2 4
dxdy
1. Evaluate∫ ∫ 2
, taking h=k =0.5, by Simpson’s rule.
1 3 x+ y
1
We first form the table for f ( x , y )= 2 with h=k =0.5.
x+ y
X 3 3.5 4 I
y
1 0.25000 0.22222 0.20000 0.22315
2 4
I= dxdy k 0.5
∫∫ x+ 2
y 3
= [ ( I 0 + I 2 ) + 4 ( I 1 ) ]=
3
[ ( 0.22315+0.13353 ) + 4 ( 0.17435 ) ]
1 3
¿ 0.17568
1.4 2.4
2. Evaluate ∫ ∫ dxdy
xy
, using trapezoidal and Simpsons rule.
1 2
Solution:
1 2.4−2 1.4−1
f ( x , y )= , h= =0.1 , k= =0.1
xy 4 4
Simpsons rule:
[
(0.1)(0.1) ¿ (0.5+0.4167 +0.3571+0.2976)+2(0.4167 +0.4545+0.3472+0.3247)
I= ¿+ 4 (0.3846+0.4545+ 0.4762+0.4348+0.3788+ 0.3205¿¿+0.3106 +0.3401)+ 4 (0.3788)+ 8(0.
9
¿+8 (0.3497+0.4132)+16(0.3663+0.3344+ 0.4329+0.3953)
=0.0614
Trapezoidal rule:
[
¿ (0.5+0.4167+ 0.3571+0.2976)+2(0.3846+ 0.4167+0.4545+ 0.4762+ 0.4545¿0.3247+ 0.3106
(0.1)(0.1) ¿+ 4 (0.4329+0.4132+0.3953 +0.3968+0.3788+ 0.36223+0.3663+
I=
4 ¿
¿
1 1
3. Evaluate ∫∫ e x+ y dx dy using trapezoidal rule and Simpsons rule.Also
0 0
evaluate directly and compare the error.
Solution:
Since we have to use Simpsons rule also ,divide each side of the rectangle
of integration into 2 parts.
Taking h=k=0.5 get the values of f ( x , y )=e x + y at each node.
x 0 0.5 1
y
0 1 1.6487 2.7183
0.5 1.6487 2.7183 4.4817
1 2.7183 4.4817 7.3891
Trapezoidal rule :
( 0.5 ) ( 0.5 )
I=
4
[ ( 1+2.7183+7.3891 )+2 ( 1.6487+1.6487 +4.4817+ 4.4817 )+ 4 ( 2.7183 ) ]
( 0.5 ) ( 0.5 )
I= [ 49.2205 ] =3.0763
4
Simpsons rule:
I=
9
( 0.25 )
[
( 0.5 ) ( 0.5 ) ( 1+2.7183+ 2.7183+7.3891 ) +2 ( 0 )
+ 4 ( 1.6487+ 1.6487+4.4817 +4.4817 )
+ { 4 ( 0 )+ 8 ( 0 ) } +{8 ( 0 ) +16 ( 2.7183 ) } ]
I= [ 106.3577=2.9545 ]
9
Direct integration:
1 1 1 1
∫∫ e x+ y
dx dy=¿∫ e dx ∫ e dy ¿
x y
0 0 0 0
1 1
Solution:
1
f ( x , y )= , h=0.1 , k =0.1
x+ y
Trapezoidal rule:
(0.1)(0.1)
I=
4
[ ( 0.5+0.4167 +0.4545+0.3846 ) +2 ( 0.4545+0.4762+0.4348+0.4 +0.4 +0.4167+0.4348 +0.4762
(0.1)(0.1)
I= [ 1.7558+6.9864+ 5.224 ] =0.0349
4
Simpsons rule:
(0.1)(0.1)
I=
9
[ ( 0.5+0.4167 +0.4545+0.3846 ) +2 ( 0.4545+0.4167 ) + 4 ( 0.4762+0.4762+0.4348+ 0.4+ 0.4+0.43
(0.1)(0.1)
I= [ 1.7558+1.7424+10.4880+ 3.4784+13.9392 ]=0.0349
9
Practice problems
2 2
1. Evaluate ∫∫ dxdy
x+ y
by trapezoidal rule with h=k =0.25
1 1
1 1
2. Evaluate ∫∫ 1+dxdy
x+ y
by Simpson’s 1/3rd rule with h=k =0.5
0 0
1 2
2 xy
3. Evaluate the double integral ∫∫ dydx , using
0 1 ( 1+ x 2 )( 1+ y 2 )
(i) Trapezoidal rule with h=k =0.25
(ii) Simpson’s 1/3rd rule with h=k =0.25.
4.Compare the answers with the exact solution
π /2 π
Evaluate
5. ∫ ∫ cos ( x+ y ) dxdy using(i) Trapezoidal rule (ii) Simpson’s 1/3 rd
0 π /2
π
rule with h=k =
4