Tải bản đầy đủ (.pdf) (10 trang)

A textbook of Computer Based Numerical and Statiscal Techniques part 24 pdf

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (119.6 KB, 10 trang )

216
COMPUTER BASED NUMERICAL AND STATISTICAL TECHNIQUES
Difference table is:
ufufufufu∆∆ ∆



23
() () () ()
1 2854
308
0 3162 3618
3926 6648
1 7088 3030
896
2 7984
By Everett’s formula,
() ( )
()()
()()
()
1.25 (0.25) 0.75 1.75 0.75 ( 0.25)
(.25) (0.25)(7088) 3030 0.75 (3162) 3618
3! 5!
f
−−
 
=+ −++ +
 
 
= 4064


Hence f(30) = 4064.
Example 3. Apply Laplace Everett’s formula to find the value of log 2375 from the data given below:
x
x
21 22 23 24 25 26
log 1.3222 1.3424 1.3617 1.3802 1.3979 1.4150
Sol. Here h = 1
We take origin at 23.
Now difference table is given by
xx∆∆ ∆ ∆ ∆

−−
−−


2345
log
2 21 1.3222
0.0202
1 22 1.3424 0.0009
0.0193 0.0001
0 23 1.3617 0.0008 0.0001
0.0185 0 0.0003
1 24 1.3802 0.0008 0.0002
0.0171 0.0002
2 25 1.3979 0.0006
0.0171
3 26 1.4150
INTERPOLATION WITH EQUAL INTERVAL
217

Here h = 1
∴ u =
23.75 23
0.75
1
xa
h
−−
==
w = 1 – 0.75 = 0.25
From Laplace Everett formula, we have
() ()()()()
24
1( 1) 2 1 1 2
() (1) (0) (1)
3! 5!
uuu u uuu u
fu uf f f
+− ++ −−

=+ ∆+ ∆−+


()() ()()()()
24
1 1 21 12
(0) ( 1) ( 2)
3! 5!
www w www w
wf f f

+− ++−−
 
++ ∆−+ ∆−+
 
 
=
()()
()
()()()( )( )
()
1.75)(0.75 0.25 1.75 2.75 0.75 0.25 1.25
0.75 1.3802 0.0008 0.0002
6 120
−−−

×+ ×− + ×


+
()
2.25 (1.25)(0.25)( 0.75)( 1.75)
0.25(1.25)( 0.75( 0.0008)
0.25 1.3617 ( 0.0001)
6 120
−−

−−
++ + ×−



= 1.035419 + 0.340455
= 1.375874
log 2375 = log (23.75 × 100) = log 23.75 + log 100
⇒ log 2375 = 1.375872 + 2 = 3.375872
Example 4. Find the value of e
–x
when x = 1.748 from the following data:
x
x
e

1.72 1.73 1.74 1.75 1.76 1.77
0.1790 0.1773 0.1755 0.1738 0.1720 0.1703
Sol. Here h = 0.01, take origin as 1.74.
The difference table for the given data is as:
x
xe

∆∆∆∆∆




−−

−−

2345
1.72 0.1790
0.0017

1.73 0.1773 0.0001
0.0018 0.0002
1.74 0.1755 0.0001 0.0004
0.0017 0.0002 0.0008
1.75 0.1738 0.0001 0.0004
0.0018 0.0002
1.76 0.1720 0.0001
0.0017
1.77 0.1703
218
COMPUTER BASED NUMERICAL AND STATISTICAL TECHNIQUES
1.748 1.74
0.8
0.01
u

==
w = 0.2
()()()()()
2.8 1.8 0.8 0.2 1.2 (0.0004)
(0.8) 0.8(0.1738) (0.8)(1.8)( 0.2)( 0.00017)
120
f
−−
=+−−+
()()()
()
()()()()()
()
0.8 0.2 1.2 1.2 2.2 0.2 0.8 1.8

0.2(0.1755) 0.0001 0.0004
6120
−−−
++ ×+ ×−
= 0.13904 + 0.0000816 + 0.000003225 + 0.0351 – 0.0000032 + 0.000002534
= 0.174224.
Example 5. Prove that if third differences are assumed to be constant
y
x
=
() ()
!!
22
22
100 1
xx 1 uu 1
xy y uy y
33

−−
+∆++∆
where u = 1 – x. Apply this formula to find the value
of y
11
and y
16
if y
0
= 3010, y
5

= 2710, y
10
= 2285, y
15
= 1860, y
20
= 1560, y
25
=1510, y
30
= 1835.
Sol.
1
11 10
0.2,
5
x

==

2
16 15
0.2.
5
x

==
xxxx
xy y y y
∆∆ ∆







25
03010
300
5 2710 125
425 125
10 2285 0
425 125
15 1860 125
300 125
20 1560 250
50 125
25 1510 375
325
30 1835
Using given formula,

()
2
2
22
100 1
1
(1)
3! 3!

x
xx
uu
yxy yuy y



=+ ∆++ ∆

()
() ()
11
1.2 (0.2)( 0.8) 0.8)(0.64 1
0.2 (1860) (125) (0.8)(2285) (10)
66
y
−−
=+ ++
= 2196
INTERPOLATION WITH EQUAL INTERVAL
219
()( )
()()( )
()()( )
()( )
()
16
1.2 0.2 0.8 0.8 0.2 (1.8
0.2 1560 250 0.8 1860 125
66

y
−−
=+ ++
= 1786
Example 6. Find the compound interest on the sum of Rs. 10,000/- at 7% for the period 16 years
if,
n
x
5 1015202530
(1.07) 1.40255 1.96715 2.75903 3.86968 5.42743 7.61236
Sol. The difference table can be formed as:
xy ∆∆ ∆ ∆ ∆




23 45
2 5 1.40255
0.5646
1 10 1.96715 0.22728
0.79188 0.09149
0 15 2.75903 0.31877 0.35901
1.11065 0.26752 1.60246
1 20 3.86968 0.05125 1.24345
1.5775 0.97593
2 25 5.42743 1.02718
2.18493
3 30 7.61236
Here, h = 5
∴ u =

16 15
0.2
5
xa
h
−−
==
∴ w =
110.20.8u−=− =
.
On applying Laplace Everett formula, we have
0.2(0.2 1)(0.2 1) 0.2(0.2 2)(0.2 1)(0.2 1)(0.2 2)
( ) 0.2 3.86968 0.05125 1.24345
3! 5!
fu
+− ++−−
 
=× + × + ×
 
 
()
0.8 2.75903 0.8(0.8 1)(0.8 1 0.8(0.8 2)(0.8 1)(0.8 1)(0.8 2)
0.31877 0.35901
6 120
× + +− ++−−
 
+×+ ×−
 
 
= 0.776593 + 2.189027 = 2.96595 (Approx.)

220
COMPUTER BASED NUMERICAL AND STATISTICAL TECHNIQUES
Example 7. The values of the ellipitc integral
()
()
/2
1/2
2
0
km 1 msin d

=−

π
θθ
for certain equidistant
values of m are given below. Use Everett’s formula to determine k (0.25).
m
km
0.20 0.22 0.24 0.26 0.28 0.30
( ) 1.659624 1.669850 1.680373 1.691208 1.702374 1.713889
Sol. Here h = 0.02, take origin as 0.24
u =
0.25 0.24
0.5
0.02
xa
h
−−
==

w = 1 – u = 0.5
mkm ∆∆ ∆ ∆ ∆


23 4 5
()
0.20 1.659624
0.010226
0.22 1.669850 0.000297
0.010523 0.000015
0.24 1.680373 0.000312 0.000004
0.010835 0.000019 0.000005
0.26 1.691208 0.000331 0.000001
0.011166 0.000018
0.28 1.702374 0.000349
0.011515
0.30
1.713889
f(u)=
()()
()
()()
22
11 1 1
(1) (0) 0 ( 1)
3! 3!
uuu www
uf f wf f
+− + −
 

+∆++ ∆−
 
 
=
()( )
()
()
()()()()()
()
(0.5)(1.5) 0.5 1.5 .5 .5 1.5 2.5
0.5 1.691208 0.000331 0.000001
6120
−−−
 
++−
 
 
()( )
()( )( )
()
()( ) ( )( )
()
.5 1.5 .5 .5 1.5 ( .5) 2.5 1.5
0.5 1.680073 0.000312 .000004
6120
−−−
++ + ×
= 0.845604 – 0.00002069 – 0.00000014 + 0.84018650 – 0.0000195 + 0.00000005
= 1.685750
INTERPOLATION WITH EQUAL INTERVAL

221
Example 8. Find the value of log 337.5 by using Laplace Everett’s formula. Given that:
x
x
310 320 330 340 350 360
log 2.49136 2.50515 2.51851 2.53148 2.54407 2.55630
Sol. Here h = 10, take origin as 340
337.5 340
0.25
10
xa
u
h
−−
== =−
w = 1 – u = 1+ 0.25 = 1.25
For the given data difference table is as:
x x fx fx fx fx fx∆∆∆∆ ∆

−−
−−−



234 5
log ( ) ( ) ( ) ( ) ( )
3 310 2.49136
0.01379
2 320 2.50515 0.00043
0.01336 0.00004

1 330 2.51851 0.00039 0.00005
0.01297 0.00001 0.00004
0 340 2.53148 0.00038 0.00001
0.01259 0.00002
1 350 2.54407 0.00036
0.01
223
2 360 2.55630
() ()
()()
()
()()()()
()
24
11 2112
10 1
3! 5!
uuu u uuu u
fu uf f f
+− ++−−

=+ ∆+ ∆−


()
()()
()
()()()()
()
24

11 2112
01 2
3! 5!
www w www w
wf f f
+− ++−−
 
++ ∆−+ ∆−
 
 

()
()()()
()
1.25 0.25 0.75
0.25 2.54407 0.00036 1.25 2.53148
6
−−
=− × + ×− + ×
()()()
()
0.25 1.25 2.25
0.00038
6
+−
()()()()( )
()
3.25 2.25 1.25 0.25 0.75
0.00001
120


+
= –0.6360175–0.0000140625 + 3.16435 – 0.00004453125 – 0.0000001428
= 2.528273 (Approx.)
222
COMPUTER BASED NUMERICAL AND STATISTICAL TECHNIQUES
PROBLEM SET 4.7
1. Eliminate odd difference from the Gauss Forward formula to drive Everett’s formula:
()
()() ()()
22
01 0 1
12 1 1
1
2! 3!
u
uu u u uu
yufu S S
−− + −
=− +δ= δ+ δ+
where
0
xx
u
h

=
2. From the following table of values of x and y = e
x
, interpolate the value of y when x = 1.91:

1.7 1.8 1.9 2.0 2.1 2.2
5.4739 6.0496 6.6859 7.3891 8.1662 9.0250
x
x
ye
=
[Ans. 6.7531]
3. From the following present value annuity a
n
table:
n
x
a
20 25 30 35 40
11.4699 12.7834 13.7648 14.4982 15.0463
Find the present value of the annuity a
31
, a
33
.
[Ans. 13.9186, 14.2306]
4. Find the value of x
1/3
when x = 51 to 54 from the data:
x
x
1/3
40 45 50 55 60 65
3.4200 3.3569 3.6840 3.8030 3.9149 4.0207
[Ans. 3.7084096, 3.7325079, 3.7563005, 3.7797956]

5. From the following data, find the value of f(31), f(32),
f(20) = 3010, f(25) = 3979, f(30) = 4771, f(35) = 5441,
f(40) = 6021, f(45) = 6532
[Ans. 4913, 5052]
6. Apply Everett’s formula to find the value of f(26) and f(27) from the data given below:
x
fx
15 20 25 30 35 40
( ) 12.849 16.351 19.524 22.396 24.999 27.356
[Ans. 20.121431, 20.707077]
7. The following table gives the values of e
x
for certain equidistant values of x:
0.61 0.62 0.63 0.64 0.65 0.66 0.67
1.840431 1.858928 1.877610 1.896481 1.915541 1.934792 1.954237
x
x
e
Find the value of e
x
when x = 0.644 using Everett’s formula.
[Ans. 1.904082]
INTERPOLATION WITH EQUAL INTERVAL
223
8. Apply Everett’s formula to find the values of e
–x
for x = 3.2, 3.4, 3.6, 3.8 if,
123456
0.36788 0.13534 0.04979 0.01832 0.00674 0.00248
x

x
e

[Ans. 0.04087, 0.03354, 0.02749, 0.02248]
9. Use Everett’s formula to find the present value of the annuity of n = 36 from the table:
25 30 35 40 45 50
12.7834 13.7648 14.4982 15.0463 15.4558 15.7619
x
x
a
[Ans. 14.620947]
10. Obtain the value of y
25
, given that:
y
20
= 2854, y
24
= 3162, y
28
= 3544, y
32
= 3992 [Ans. 3250.875]
GGG
CHAPTER 5
Interpolation with Unequal Interval
5.1 INTRODUCTION
The interpolation formulae derived before for forward interpolation, Backward interpolation and
central interpolation have the disadvantages of being applicable only to equally spaced argument
values. So it is required to develop interpolation formulae for unequally spaced argument values

of x. Therefore, when the values of the argument are not at equally spaced then we use two such
formulae for interpolation.
1. Lagrange’s Interpolation formula
2. Newton’s Divided difference formula.
The main advantage of these formulas is, they can also be used in case of equal intervals but
the formulae for equal intervals cannot be used in case of unequal intervals.
5.2 LAGRANGE’S INTERPOLATION FORMULA
Let f(x
0
), f(x
1
) f(x
n
) be (n + 1) entries of a function y = f(x), where f(x) is assumed to be a polynomial
corresponding to the arguments x
0
, x
1
, x
2
, x
0
. So that
The polynomial f(x) may be written as
f(x) = A
0
(x – x
1
) (x – x
2

) (x – x
n
) + A
1
(x – x
1
) (x – x
2
) (x – x
n
) +
+ A
n
(x – x
1
) (x – x
2
) (x – x
n–1
) (1)
where A
0
, A
1
, A
n
, are constants to be determined.
Putting x = x
0
, x

1
, x
2
, , x
n
in (1) successively, we get
For x = x
0
, f(x
0
)=A
0
(x
0
– x
1
) (x
0
– x
2
) (x
0
– x
n
)
⇒ A
0
=
()
()()

()
0
0102 0

n
fx
xxxx xx
−− −
(2)
For x = x
1
, f(x
1
)=A
1
(x
1
– x
0
)(x
1
– x
2
) (x
1
– x
n
)
⇒ A
1

=
()
()()( )
1
10 1 2 0

n
fx
xx x x x x
−− −
(3)
Similarly,
For x = x
n
,f(x
n
)=A
n
(x
n
– x
0
)(x
n
– x
1
) (x
n
– x
n–1

)
224
INTERPOLATION WITH UNEQUAL INTERVAL
225
A
n
=
()
()()( )
02 1

n
nn nn
fx
xxxx xx

−− −
(4)
Substituting the values of A
0
, A
1
, A
n
, in equation (1), we get
f(x) =
()()()
()()()
()
()()()

()()()
()
12 02
01
0102 0 1012 1


nn
nn
xx xx xx xx xx xx
fx fx
xxxx xx xxxx xx
−− − −− −
+
−− − −− −
+ +
()()( )
()
()( )
()
01 1
01 1


n
n
nn nn
xx xx xx
fx
xxxx x x



−− −
−− −
(5)
This is called Lagrange’s interpolation formula. In equation (5), dividing both sides by
(x – x
0
) (x – x
1
) (x – x
n
), Lagrange’s formula may also to written as
()()()()()()()
0
0 1 0102 0 0
() ( )

nn
fx fx
xx xx xx x x x x x x xx
=
−− − − − −−
()()()() ()()( )()
1
1012 1 1 0 1 1
() ()
11



n
nnnnnn
fx fx
xxxx xx xx xxxx xx xx

+++
−− −− −− − −
Corollary. Show that Lagrange’s formula can be put in the form
()
()()
)
0
()(
'
n
r
n
rr
r
xfx
Px
xx x
=
φ
=
−φ

where
()
0

n
r
x
=
φ=

(x – x
r
) and
φ
’(x
r
) =
()
{}
d
x
dx

φ


x=xr
Sol. We have, P
n
(x)=
()()( )( )()
()()( )( )()
01 1 1
01 1 1

0


n
rr n
rr rr rrn
r
xx xx xx xx xx
xxxx xx xx xx
−+
−+
=
−− − − −
−− − − −

f(x
r
)
=
()
()
()
()
()( )( )
()
−+
=

φ



−−−−− −



01 1 1
0

n
r
r
r r rr rr rn
r
fx
x
xx xxxx xx xx xx
(1)
Now,
()
x
φ
=
()
0
n
xx
r
r



=
(given)
Therefore,
()
x
φ
=
()()()
()
()
()
()
012 1 1

rrr n
xx xx xx xx xx xx xx
−+
−−− − −− −

φ′(x) =
()
1
xx

()()()()()()()
202

rn rn
xx xx xx xx xx xx xx
−−−+−−−−

+
()()()( )()()()()( )
01 1 01 1

rr n r n
xx xx xx xx xx xx xx xx xx
+−
−− −− −+−− − −

φ′(x) = [φ′(x)]
x = xr
= (x
r
– x
0
) (x
r
– x
1
) (x
r
– x
r–1
) (x
r
– x
r+ 1
) (x
r
– x

n
) (2)
Hence from equation (1)
()
()
()
()
0
()
'
n
r
n
rr
r
xfx
Px
xx x
=
φ
=
−φ

[Using (2)]

×