Professional Documents
Culture Documents
Numerical Differentiation and Integration
Numerical Differentiation and Integration
286 55 56
53 54
52 3-8030 3-8259
50 51 3.7563 3-7798
3-7084 3.7325
3-6840 Newton's forward
50 we use
require f'x) at
=
x
Solution. Since we backward formula.
Newton's
at x 56 we use
and to get f'lx)
=
Tormula
Difference Table
Ay Ay
50 3.6840
00244 - 0-0003
51 3.7084
0-0241 - 00003
52 3.7325 0
0-0238 - 0-0003
53 3-7563 0
0-0235
- 00003
54 3-7798 0
0-0232
- 0-0003
55 3-8030
0-0229
56 3-8259
dy dy
dx = dx=0
-0024-000+
=0-02455
d =
-a'h+-]
50
= 1 [-00003] =-0-0003.
By Newton's backward difference formula,
dy dy
dr dr
from equation (12)
(dy
dx r= 56
00229+0003) +0
0-02275
the
Example 2. The population of
rqte of growth
=[-0-0003]=-0-0003
a
certain town
of the given below. Find is
Year X
population in
1931, 1941, 1961 and 1971.
1931 1941
Population 1951 1961 1971
inthousands 40-62 60-80 79.95 I03.56 132-65
Solution. We form the difference table.
Ay Ay ay
1931 40-62
y
1941
20-18
60-80
19.15
-
103
1-03 -
'.0=1931 corresponds u = 0.
(dy. {-f*-ja,-t-]
dx = 193
20
10L
18--103)+(649)--447)
=2018+0515+ 1-83+ 1-1175]
= 2-36425.
9 4 1 -1931 1
(i) If x = 1941, u= 10
1, in
Putting u =
dy +24 + 3u-6u+ZA'yo
6
4-18u+224-y
24
We get
d 2 0 - 1 8 + 1 0 3 ) - 6 4 9 ) + 1 7 - 4 4 7 )
288 Numerical Methods-1V
20 18-0-515-0915 - 0:3725]
= 1-83775 ...(2)
Note: If we neglect the data against 1931 and täke 1941 as xo, we have
Now using
dy
dx=1941
TO 1915-449)+(102)
= 17260. ..(3)
Evidently the values given by (2) and (3) are not same. In getting the
answer given by (2), we have assumed a polynomial of degree 4 whereas
in getting the answer given by (3), we have assumed the interpolating
polynomial of degree 3 only. In fact, both polynomials assumed are
different. Hence we see the difference in answers.
(iii) To get f' (1971), we'use the formula,
T 2909648-j00)-447)
dy
dr 1031-0525]=3-10525.
1971
29.09 (548)(102)--447)
.
2909 -2.74 0-17+0.3725]
= 2-65525.
Solution. We require
x = 900
Table
Ay Ay A'y A'y A°y
0 135
300 149 14
6
157 8 24
600 18 50
900 183
26 - 8 26 20
70
- 86
18 14
16
1200 201 4 2
16
1500 205 - 12
1800 193
Since x =900 is in the middle of the table we use one of the central
difference formula, in particular Stirling's formula.
dydx(avo ) +Ay-2
x=Xp
18+
300 26)--6-
12 26)+ 60 70-16
30
300
22+26666 +09
0-085222
Hence the gradient of the road at the
middle poinit is 0-084776.
results of an observation;
xample 4. The table below gives the
i s the observed temperature in degrees centigrade of a vessel of cooling
water; t is the time in minutes from the beginning of observation.
B 5 7 9
di -108+ 03)--23)+1
-10-8+ 165+0:38333 +0 13333|
(de =-4:31667
dt3
(i) Putting u= 1-25 in (2). de
dt =125 =l-108+0-75 (3.3)
-
4-0067
dt -3-96718
dt
=35
Example 5. Find the value of f (0-5) using Stirling's formula from
the foRDuing data:
35 ()-40 0-45 0-50 0-55 0-60 0-65
y=f(x) /52 1 506 1488 -467 1-444 1.418 1-389
Solution.
Ay Ay A'y A"y A'y
0-35 1521 0015 0-003
0-40 1-506 - 0-018 -0003
0-001
0-001
0-45 1-488-0-021 (A'y-2) (A'y2)
- 0-003
NUMERICAL INTEGRATION
9:7. Introduction
otnh
300 Numerical Methods-V
+ nh
where P, () is interpolating polynomial
P. (t) dx
of degreen.
" (u- 1) V
otuAyn uu-Dyo
2!
(u-)(u-2)
3!
+ hdu
Since dr hdu, and when x = X, u = 0 and when x=0tnh, u =n
..3)
otn
sdr- flx) dr
=s)dx+ o+2h
f) dr++ otnh - 1 ) AS
) ) dr
0o+)+0+*+-1+y,)
Numerical Differentiation and Integration 301
C%+yn+201+t+t+yn-1
=[(Sumofthe first and thelastordinates)
+2 (Sum oftheremaining ordinates)
This is known as Trapezoidal Rule.
9-10. Geometrical interpretation
ydx-o 1!
3! %+.
YoCa)+2Yo+ Yo+
(2)
if h is the equal interval length.
Also ydr=50o+y) area ofthefirst trapezium. =Ap
=
.(3)
308 Numerical Methods-v
Ele-a)h.M.
180
Hence, the error in Simpson's one-third rule is of the order hf
() By trapezoidal rule,
o 1+xI0%+y,)+2 (1 +t+ Yn -1
(1+0-5) +2 (096154 +0-86207+0-73529 +0-60976)1
=
(0.1) [1-5 +6-33732
= 0-7837332
Byactual integration,..
=(tan(tan )=t/4
o1+
=0-783732
4
T 3-13493 (approximately.
In this case, we cannot use Simpson's rule (both) and Weddle's rule.
() By Trapezoidal rule,
Note: If the number of intervals is a multiple of six, we can use all the above
formulae.
=2-02142857
Numerical Diferentiation and Integration 311
-1 =195873016
(ii) By Simpson's three-eighth's rule,
= 1-96607143
I31+5
10 (05)++
= 195285714
194591015.
dx =[log (1 +x)1=log,7 =
integration.
Solution. Range =T-0=T
Hence h10
We tabulate below the values of y at different x's.
0
10
2T
10
310 10 10
y= sin x 0-0 0-3090 0-5878 0-8090 0-9511 1-0
X 6 T 81
10
9E
10
TT
() By Trapezoidal rule,
I=90+0)+2(0-3090+0-5878+0-8090 +0.9511+10
+0.9511+0.8090+ 0-5878+0-3090)1
= 1-9843 nearly.
312
Numerical Methods-1V
(i) By Simpson's one-third rule (since three 11
are
ordinates),
16 C0+0)+2 (0-5878 +09511 +0.9511+ 0 5878)
= 2-0009 1
+4 (0-3090 +08090+ 1+0.8090+0.3090)1
Note: We cannot use
Simpson's three-eighth's rule or Weddle's rule here.
(iii) By actual
integration, I =(-cos x)6 =2
Hence, Simpson's rule is more accurate than the
Trapezoidal rule.
Example 7. Evaluate e dx by Simpson's one-third rule correct
to
five decimal places, by
proper choice of h.
Solution. Here, interval
length =b-a= 1
y=e:y= e.
Error = | El< 180 M, where M =Max (e) in the range.
180 e
We require (E) < 10
h'e
< 106
180
/4
h< 180x 10
h< 0.148
Hence we take h=01o have the
accuracy required.
0.1
dx=I(1 +e)+2 (++6+8
= 17182883
+4 (+3+5+ e7+]
1=
171828183
Correct to five
decimal places, the answer
is 171828.
Example 8. Evaluate J, dx
by () Trapezoidal rule
rule (ii) Weddle's rule. Also (ii) Simpson's
check up the
Solution. Here, b-a=6-0=6. results by actual integration
Divide into 6
h==1. Hence, the table is equal parts
1 2
3 4
5
S 1-00 0-500 0200 0-100
0-058824.
6
0-038462 0-027027
316 Numerical Methods-y
d' in metres
12. A river is 80 metres wide. The depth at
Example
A distance x metres from one bank is given by the following tahi
Calculate the area of cross-section of the river using SImpson's rule.
40 50 60 70 80
0 10 20 30
9 12 14 8 3
d 4
(A.M.I.E.
Solution. Here h = 10. Area of cross-section is ydr
15
A O+3) +2 (7+ 12 +14) +4 (4+9+ +8)]
10
=3+66+ 144] =710 sq. metres.
Exámple 13. The table below gives the velocity v of a moving
Particle at time t seconds. Find the distance covered by the particle in 12
seconds and also the acceleration at t = 2 seconds.
0 2 4 6 8 10 12
4 6 16 34 60 94 136
(MS 1971)
ds dv
Solution. We know and
dt v, a dt
S=vdt
To get S, we have to integråtev
l2
S = . vdt=[(4+ 136) +2 (16+ 60) +4 (6+34+94)]|
(using Simpson's one-third rule)
= [140+152+536] =552 metres
Acceleration =a =|dv
taking v=6
dt=2
10-3m/
EXERCISE 9.2
2. Compute the value of,using Simpson's rule and Trapezoidal rule. Take
ordinates.
2
5. Calculate sin x d by dividing the interval into ten equal parts, using
Hlint: v - dt 0 Takey
10. When a train is moving at 30
m/sec. steam is shut off and brakes are applied.
The speed of the train per second after seconds is given by
Time (): 5 10 15 20 25 30 35 40
Speed (): 30 24 195 16 13-6 117 10-0 85 70