Numerical Methods 2
Numerical Methods 2
the value of a
and x, is called interpolation. Thus interpolation is the technique of estimating
variable while the process of computing
function for any intermediate value of the independent
called extrapolation. The study of the
the value of the function outside the given range is
differences of a function which we proceed to discuss. For
interpolation is based on the concept of
a detailed study, the reader
should refer to author's book Numerical Methods in Engineering
and Science'.
that the function y =f«) is tabulated for the equally spaced values x x0, Xo + h, =
found useful:
intermediate values of z, the following three types of differences are
entry is called the leading term and Ayo, ayo, ayo ete. are called the leading differences.
875
876 HIGHER ENGINEERING MATHEMATICS
Obs. Any higher order forward difference can be expressed in terms of the entries.
We have A'Yo = Ay1- Avg =(2-'1)-01-o) =ya -21+Yo
A2
X0+3h 3
y
o+4h
y4
y2
Ay4
o+ 5h
Y5
(2) Backward differences.
The
Vy1. Vy2,. differences y1-X0 J2-Y1, ..., yn-Yn -1 when denoted
Vy respectively, are called the first backward by
difference operator. Similarly we define differences where V is the backward
higher order backward differences. Thus
we have
Vy, =y,-yr-1.Vy,= Vy,- Vy, -1
These differences
vy,=- V¥-1 etc.
are exhibited in the following
Backward Difference Table
Value of x Value of y 1st. diff. 2nd diff. 3rd diff.
Yo 4th diff. 5th diff.
x0 + h
Vy1
y2
y2
xo + 2h
y2
x0 + 3h Y3
x0 + 4h 4 ys
VY5
0+5h Y5
FINITE DIFFERENCES AND INTERPOLATION
877
(3) Central differences. Sometimes it is convenient to employ another system of differences
central differences. In this system, the central difference operator 8 is defined by the
relations 1 - y o = oy1/2, 2 - y 1 = öy3/2 YnYn - 1 Yn - 1/2
Value of x Value of y 1st. diff 2nd diff. 3rd diff. 4th diff. 5th diff
öy1/2
ro +h 1
8 Y3/2 &'y3/2
xo +2h
y5/2 &'ys/2 y5/2
x0+ 3h y3
y1/2 y1/2
xo + 4h y4
o y9/2
0 +5h y5
etc.
poy1 =~ôy12+ys/),uö'Ys/2 =~6y1+8y2)
notation which changes and not the differences.
Obs. The reader should
note that it is only the
1-Yo= Ay% Vy1 =dy1/2
=
log 2x
=eh log +( +h -x) log 2x
log|1.4|-1) log2
) a r+h (r +h cos 2x-x cos 2(x +h)
cos 2x cos 2(r + h) cos 2x cos 2(r + h) cos 2a
cos 2x)
=
A cos 2
(x +h) -A cos 2x
=
[cos 2 (x +2h) cos 2 (x + h)]
[cos
-
2 (x +h) -
cos 2]
=-2 sin (2x +
3h) sin h +2 sin (2x+h) sin h
= -
2 sin h
[sin (2x +3h) sin (2x -
+h)]
=-2 sin h (2 cos
(2x + 2h) sin h] =
4 sin h (2r +2h).
-
cos
Example 28 2. Evaluate (i) A ¥+12_
6x+16 16) () 4 (ab")
interval of differencing
being unity.
(Rohtak, 2003)
Sol.)2
Sol. ) 2-+12=?x+12
x+6x+66 +2 +3)=a+2x+3
1
-2 +2) ( +3) -34 1
*+3) (x 4) +
-2
3)&+4+2)(*+2) (r +3) 4
+4) (x + 5) +3)
(*+3) & +454)
(x+
x
+2) (x +3) (x +4) (x+ 6
3) (* + 4) (x +5) 2 5x +16)
(iü) A (ab) =a A(B) =a (6*** b) (x +2) (* + 3) (x + 4) (x +5)
=ab* (6 1) -
(tt) Ae = ë= (e 1) e"
*
-
-
=
(e -
1ye.
FINITE DIFFERENCES ANDINTERPOLATION 879
282. DIFFERENCES OF APOLYNOMIAL
The nth differences of a polynomial of the nth degree are constant and all higher order
differences are zero.
Continuing this process, for the nth differences we get a polynomial of degree zero i.e.
A fc)=ann -
(Madras, 1996 S)
Example 28-3. Evaluate A"[1 -ax)(1 bx*1 ex*(1 dx*))
- -
-
1= x ( -1)(x-2), etc.
" = x(x - 1)(r - 2 ) . . . x - n + 1)
In general
In case, the interval of differencing is h, then
lal" = z{r -h)x - 2h)...x-n - 1h)
The factorial notation is ofspecial utility in the theory offinite differences. It helps in finding
the successive differences ofa polynomial directly by simple rule of diferentiation.
The result of differencing bwl is analogous to that of diferentiating x'.
(2) To express a polynomial in the factorial notation
(i) arrange the coefficients of the powers of x in descending order, replacing missing powers by zeros
(i) using detached coefficients divide by x, x - 1, x-2,etc. successively.
880 HIGHER ENGINEERING MATHEMATICS
Obs. Every polynomial ofdegreen can be expressed as a factorial polynomial ol the same degree and
vice versa.
Example 28-4. Express y =2 - 3 x + 3x- 10 in a factorial notation and hence show that
ay=12
Sol. Let y =Aul+Bul+ Cxl+D.
Then
1 2 3 - 10 D
-3
2 -1
2 2 -1 2C
3 2 3 = B
2A
Hence y =2«1+3t«l+2] - 10
Ay=2x 3]+3 x 2x]+2
Ay = 6x2x] +6
Ay 12, which shows that the third differences ofy are constant,
=
ayo=0 and
ie. 3y1 +y3=9; 1+3y3=3-6.
Solving these, we get y= 2925, y3 = 0-225.
Otherwise: As only three entries yo 3, y2 =2, y4 =- 24 are given, the function y can be
represented by a second degree polynomial.
Ay
o1
2
1 Y1-1
2 8
A 16
2 2=1
-2 8
16
3 Y3-1
41
16
Ay4
5 16
y5
Ays
Y6
Ay6
7
Since the values of y belong to a polynomial of degree 4, the fourth differences must be
constant. But Ay = 16.
882 HIGHER ENGINEERING MATHEMAIICS
Problems 281
1. Write forward difference table if
10 20
y 1-1 30 40
2. 2-0 4.4
Construct the table of differences for the data below: 79
0
2 3
fx) 10 1-5 2.2
4
Evaluate af (2). 3.1 4-6
3.
If u =
3, u =
12,
ug 81, ug =2000, u4 100,
=
4.
calculate Auo. =
1,0, 1, 2, 3, 4, 5.
Continue the table to obtain
7. Extend the f(6).
following table to two more terms on either side
by constructing the difference table
23 0-0
3-0
0-2
3-4
0-4 06
8. Show that 428 08 10
7-08 14-2 29-0
9. Evaluate
fx) f r+ 1) Gi)
alog f) log{1+ fCx))
=
() A (x + cos x)
10. Evaluate:
natan (i) a+5x+6)
(i) a" (a)
(Burdwan, 2003)
11. Prove that
() ys =y2 +41 +Ayo+ A'yo (ii)
12. Evaluate: ys=ys- 2y7+y6&'ys =
() A I(1-x)(1-2x) (1-3x)] ys-2y5 +4
i) a (1 -x)(1-2x) (1 3r)(1-4x*), -
4+ 6x2
+ 2x+ l as a factorial
polynomial and find differences of all orders.
16. Find the first and second differences
difference is constant.
of - 6+ 11x -
This shows that the operators A and E are connected by the symbolic relation
A E-1 or E = 1 +A.
(iü) Vy -s-h =) -E y =
(1-E )y
V=1-E' or E =(1 - V)*
886 HIGHER ENGINEERING MATHEMATICs
2
4 Au u+244 =R.H.S.
Problems 282
1. Explain thedifference between (2 4, and (Madras, 2003)
E
2. Evaluate taking h as the interval of differencing
)sinx ",(h = 1) (Madras, 1996 S)
hl 4 sin (r+h)
s i n (x + h)+ i v ) (a+Vj'«*+x), th =1).
g sin (x +h)
3. With the usual notations, show that
) A =1-er hD (ii) =2 sinh
ii) (1+A1 - V) = 1. (iv) AV =VA =8* (Madras, 1996)
4. Prove that
) 8=A(1+A)"/2=V(1 V)-1/2 -
i)p=1+
(i) 8(El/2+E-1/2) = AE +A
5. Show that (i)
uð={(A+ V) (ii) 1+8/2 = V(1 +8°4
(Madras, 1998)
i~i) v=h*D?- h^D"+ h*D-. (iv) a+V=- (Madurai, 1996 S)
6. Prove that
differences of yo
Obs. This formula is used for interpolating the values of y near the beginning of a set of tabulated
values and extrapolating values
of y a little backward (i.e. to the left) of Yo
(2) Newton's backward interpolation formula. Let the function y =f(x) take the values
Yo-1 Y2. corresponding to the values xo, zo +h, xo +2h,. of x. Suppose it is required to
evaluatefx) for x = xo +ph, where p is any real number. Then we have
100 1063
2.40
- 0-39
150 13-03
2-01 0 15
- 024 - 0-07
200 15-04
1.77 0-08
- 0-16 0-05
250 1681
1-61 0-03
- 0-13 - 001
300 1842
1.48 0-02
350 19.90 - 0.11
137
400 21-27
888 HIGHER ENGINEERING MATHEMATICS
()Ifwe take xo = 200, then yo = 16-04, Ayo = 1-77, Ayo = - 016, A'yo =003 etc
18
Since x 218 and h =
50, pa 036
h 50
Using Newton's forward interpolation formula, we get
Ayo+PP-p-2) avo+.
218 o+pAyo+ 12 3
f(218) 1504+ 036(177) + 0-36(-0-64) (-016) + 0-36(-0-64)(- 164) (0 03)+
2 6 (0-03)+.
1504 0637+0-018+0-001.. = 15-696 i.e. 157 nautical miles
Since =410 is near the end of the table, we use Newton's backward interpolation
formula.
Taking , =
400, p= 02
Using the line of backward differences
yn21-27, Vyn = 137, vy = - 0-11, vy, = 0-02 etc.
Newton's backward formula gives
Ayx
40 31
4
50 73
51
60 124 -25
-16
35 37
70 12
159
31
80 190
FINITE DIFFERENCES AND INTERPOLATION
We shall find ya5 i.e. 889
number of students with marks less than 45.
Taking xo =40, =45, we havep= x 5
1005 h =10
Using Newton's forward interpolation formula, we
get
y45=Y40+ pdyso+ 2 sy40 +PP 1 2 3 0t.
=31 +0-5x 42 +5-0:5), a 05(0-5(-1-5),oEi 0-5-0-5-15(-25)27
2 6 24
47-87,on simplification.
The number of students with
.
marks less than 45 is 47-87 i.e., 48.
But the number of students with
marks less than 40 is 31.
Hence the number
of students getting marks between 40 and 45 =48-31 17. =
Example 28 In the table below, the values of y are consecutive terms a series which
13.
23-6 is the 6th term. Find the of of
first and tenth terms of the series:
3 4 5 6 8 9
y: 4-8 8-4 145 23-6 36-2 52-8 739
Sol. The difference table is
Ay
4-8
3.6
4 8.-4 2-5
6-1 0-5
5 145 3-0
9.1 0-5
6 23-6 3-5
12-6 05
36-2 4-0 0
16-6 0-5
8 52 8 4-5
211
9 73.9
To find the first term, use Newton's forward interpolation formula with xo = 3,x = 1, h =1
y(10)=73-9+x21-1+x
12
45 123
x05= 100.
Example 28-14. Find the cubic polynomial which takes the following values:
2 3
1 2 10
f(x)
Hence or otherwise evaluate f (4). (Madras, 1997 S)
890 HIGHER ENGINEERING MATHEMATICS
Sol. The difference table is
1 2 -2
-1 12
10
3 10
1 14 18 22
flx) 3.49 4-82 5-96 6.5
2. State Newton's interpolation formula and use it to0 calculate (Kottayam, 1999; Tirupati, 1998)
the value
table : of exp (1-85), given the following
17 18 19 20 21 2:2 2.3
f): 6474 6-050 6-686 7-389 8-166 9025 9974
3. Iff(1-15) =1-0723,f(120)= 1-0954,f(125) 1-1180 andf(130) 11401,
= =
find f (128).
4. Given sin 45°=0-7071, sin 50° 0 7660, sin 55° 08192, sin 60°=
0-8660, find sin 52, using
=
=
20 25 30 35 40 45
8. Find the number of men getting wages between Rs. 10 and 15 from the following data
9 30 35 42
Frequency
9. From the following data estimate the rumber of persons having incomes between 2000 and 2500
6 10
3 8 16
1
(Madras, 2000 S)
Hence evaluate y for x = 5.
Newton's backward difference formula to the data below, to obtain a polynomial of degree 4 in
11. Apply
1 2 3 4
1 -1 1 -1
of a series of which 125 is the 5th term.
values of y are consecutive terms
12. In the following table, the
of the series
Find the first and tenth terms
5 6 7 8
3 4 729
12-5 216 34-3 512
2.7 6.4
(Panjab, 1997)
13. Given uj =
40, ug =
45, us =
54, find ug and u4.
14. If u =
10, u1 =
8, u 10, u4 50, find ug and u3.
= =
Ayo
892 HIGHER ENGINEERING MATHEMATICS
Ay-2 (= oy-3/2)
Xo-h y-1
Ay-1(= ôy- 1/2) ay-a(8y- 1/
yo
Ayo=oy1/2) ay-81
+h Y1
Ay1=8y3/2)
o+2h Y2
(1) Gauss's forward interpolation formula. The Newton's forward interpolation formula is
YpYo tp Ayo + (pAyo +PP)p-2) 3
1 2 3 1)
We have
Ayo-Ay-1=4'y-1
i.e. ayo =Ay-1+A°y- 1 2)
Similarly Ayo=Ay-1 +Ay-1 .(3)
Ayo=A^y1+A'y-1 etc. ..4)
Also Ay-1-4-2 =4^y- 2
i.e. Ay =Ay2+Ay-2
Similarly A-1=A'y-2 +A°y- 2 etc. .5
Substituting for Ayo, Ayo, A0 .from (2), (3), (4).. in (1), we get
p yo tp Ayo +* 1-2 y1+ay-)+P2 y-1+ay-
P(p-1) 12.3.4
(p-2) (p-3) (ay+ A`Y- 1) *.
Hence p =yo +p4yo + y 1 4 P*)p
3!
(p-1) ,
p+ 1)pp-1p-2)
4! y-2tusing (5)
interpolation formuda.
which is called Gauss's forward
FINITE DIFFERENCES AND INTERPOLATION
p =Yo+pAyo + )yo+2P=)p-2)
12-3
yn+ ...(1)
We have Ayo 4y1 4^y-1
L.e.
Ayo Ay1+Ay-1 ..(2)
Similarly o= ay-1 +Ay-1 ...(3)
Ayo=A*y-1+Ay.1 ete. ...4)
Also y1-ay-2 =ay-2
L.e. ay-1 =ay-2 +Ay- 2 ..(5)
Similarly 4y-1 = Ay-2 +A'y- 2 ete. .6)
Substituting for Ayo, Ayo, A°y0, . from (2), (3), (4) in (1), we get
P p-1)(p-2)p-3) y+...
12.3.4
p+o+py-1+ y+P+)p(p-1) -2
Hence 3!
p y o +payo + 1)(1
P P-
3'
+1pp-1)
4
p-2) sy_+1Pp"- p-2) x(ay-1 -4y- z) +... using (2), (3) ete.
+pAya +2P-1),ay-1+AY% (p- 1
=Yo
2
p
2 -a
p (p-1)(p-2) 4y- 2 +4y-1
4! 2
Obs. This is a very useful formula for practicalpurposes. It involves odd diferences below the centro!
line and means ofeven differences of and below his line as shown below:
4! 5!
896 HIGHER ENGINEERING MATHEMAICS
Ay Ay Ay
28-7. CHOICE OF AN INTERPOLATION FORMULA
The coeflicients in the contral
difference formulae are smaller and
in Newton's formulae. After a few converge faster than those
terms, the coefficients in the Stirling's formula decrease
pidly than those of the Bessel's formula and the more
rapidly than those of Newton's formula. As coefficients of Bessel's formula decrease more
hould be used much, whenever possible, central difference
in
preference to
formulae. Newton's formulae
The right choice of
interpolation
mterpolated value in the given data.
an
formula however, depends on the
position of the
The following rules will
a
be
1.To find tabulated valuefound useful
near the
2. To finda value near the end of the beginning of the table, use Newton's
table, use Newton's backward forward formula.
3. To find an
or Everett's formula.interpolated value near the centre of the table, use formula.
either Stirling's or Bessel's
If
interpolation is required for p lying between 1/4 and
If
interpolation is
desired for p lying between 1/4 1/4, prefer Stirling's formula.
and 3/4, use Bessel's
Example 28 15. Use Gauss's forward or Everett's
formula.
2317 8144, y29= 171070, y33 16-3432 formula to evaluate y30, given that y21 184708,
=
and y7 =15-5154. =
P p
21 2 18 4708
Ayp
06564
25 17 8144
-0-0510
- 0 7074
- 0-0074
29 171070 -00564
-07638 -0-0022
33 163432 - 00640
- 00076
- 0 8278
37 2 155154
FINITE DIFFERENCES AND INTERPOLATION
897
Gauss's forward formula is
12.3 1234
y30 17.1070 + (25)(-0.7638) + 26) (07b) (-0.0564)+25) (C25) (= 06) -0.00761
2 6
1 25) 25) (-075) (-173)
24
g (-00022)
=
17 1070 -019095 +000529 +0-0003 0-00004 169216 approx.
Example 28-16. Interpolate by means of Gauss's backward formula, the population of a town
for the year 1974, given that:
Year 1939 1949 1959 1969 1979 1989
Population (in thousands): 12 15 20 27 39 52
(Madras 2003)
Sol. Taking xo = 1969, h = 10, the population of the town is to be found for
1974 -1969
10 0.5. -
p Ayp
1939 -3 12
3
1949 -2 15 2
1959 - 1 20 2 3
- 10
3
1969 0 2Z
12
1979 39 1
13
1989 2 52
(5)
ie. yg=27 +(0-5)(7)+ ) (5) + L5)(5)-5) a1+(2:5) (15)
24
+
(2.5)(15) (5) (-5) (-15)10
120
Calculate the angular velocity and the angular acceleration of the rod, whent = 06 second
(V.T.U., 2004; Burduwan, 2003; Madras, 2003)
12. Ify =f x) and y, denotes f (to + nh), prove that, if powers of h above h° be neglected.
d 3
d 4h O-1-5v2-y.2+45 0-Y.3
13. Using the following data, find x for which y is minimum and find this value ofy.
12 13 1-4 15 16
09320 0-9636 0-9855 0-9975 0-9996
(Madras, 1998)
2812. NUMERICALINTEGRATION
The process of evaluating a definite integral from a set oftabulated values of the integrand
fa) is called numerical integration. This process when applied to a function of a single variable,
is known as quadrature.
y=fx)
o 2
0 Xth*o+2h
Fig. 281
(1) Newton-Cote's quadrature formula
Let I=f dx
where f(x) takes the values yo, 1, Y2--n for x
=xo, X1, X2,
Let us divide the interval (a, b) into n sub-intervals of width h so that xo = a, x1 = *0t h,
rmdepo*~aovo
2h
Similarly fd=a|*v 1+)
*** ****. *°°*°°°°.
o+nh
n-1hf) dr =5 On-1+yn)
Adding these n integrals, we obtain
nh
fx) dx =
+yn) +2(y1 +V2t.
This is known
+Yn -1 .2)
as the trapezoidal rule.
Obs. The areaof each strip
ordinates at x and zo+ nh is (trapezium) is found
separately. Then the area under the curve and
approximately equal to the sum of the
areas of the n the
3) Simpson's one-third trapeziums.
X0 Yo), (x1, y1) and (2, Y2) as a rule". Puttingn
parabola i.e. a
=2 in (1) above and taking the
order higher than second
vanish, we get polynomial of second order so thatcurve through
(o+ 2h
differences o
fdx 2hivo +Ayo =
o)=o+41+y
fo+4h
This is known as the Simpson's one-third rule or simply Simpson's rule and is most commonly
used.
Obs. While applying (3), the given interval must be divided into even number of equal sub-intervals.
since wefind thearea of twostrips at a time.
(4) Simpson's three-eighth rule. Putting n =3 in (1) above and taking the curve through
x yd:i =0, 1, 2,3 as a polynomial of third order so that differences above the third order
vanish, we get
f*o+ 3h
Similarly,
o64
Bh
3h f) da =0s+3y4 +3ys +J6) and so on.
Similarly
o + 12h
3h
+6y9+ 1 0 + 6y11 t12)
Af(x) dx 16 + 6y7 +8 =
and so on.
Adding all these integrals from xo to zo nh,
+ where n is a multiple of 6, we get
(otnh
3h ....5)
Obs. While applying (5), the numberof sub-intervals should be taken asa multiple of6
914 HIGHERENGINEERING MATHEMATIcs
Example 2827.Fvaluate
ted by using
) Trapezoidal rule, (i) Simpson's 1/3 rule (Madras, 2003; Andhra, 19991
ii) Simpson's 3/8 rule, (Bhopal, 2002 S
(u) Weddle's rule and compare the result with its actual value. (Rohtak, 2003)
Sol. Divide the interval (0, 6) into six parts each of width h = 1. The values of f(x) =
1 2 3 4 5
fix 1 0-5 02 01 0-0588 0 0385 0-027
1 y2 Y3 Y4 5
() By Trapezoidal rule,
J d
1+ 2 vo+6)+201 +2 +y3+4+ys)
=
(1 +0-027) + 2(05 +0,2 +0-1+0-0588 + 0-0385)) =
14108.
) By Simpson's 1/3 rule,
=0311+505) +02+6(0
1)+00588+5(0-0385) +0-027) =13735
Also tan 6 = 14056