bhadauriaijma17-20-2009
DESCRIPTION
fhdfhdfTRANSCRIPT
Int. Journal of Math. Analysis, Vol. 3, 2009, no. 17, 815 - 827
Finite Difference Formulae for Unequal Sub-
Intervals Using Lagrange’s Interpolation Formula
Ashok K. Singh a and B. S. Bhadauria b
Department of Mathematics, Faculty of Science, Banaras Hindu University, Varanasi-221005, India
[email protected], [email protected]
Abstract
General finite difference formulae and the corresponding error terms have been derived considering unequally spaced grid points, and using Lagrange’s interpolation formula. Further the finite difference formulae and the error terms for equally spaced sub-intervals have also been obtained as special cases of the present study.
Mathematics Subject Classification: Primary 65D30, Secondary 65D05 Keywords: Finite difference formulae, Lagrange’s interpolation formula, Error terms, Clamped Simpson’s rule
1. Introduction
Finite difference method is one of the very effective methods used for solving the differential equations (ordinary or partial) numerically. It involves replacing the derivatives appearing in the differential equation and boundary conditions by suitable finite difference approximations. The accuracy of the solution depends upon the number of grid points, chosen. By increasing the number of grid points one can increase the accuracy of the solution to a desire degree, however it involves increasingly tedious mathematical analysis.
Based on Tayor’s series, Khan and Ohba [2-8] presented some new difference schemes for finite difference approximation. They obtained closed-
816 Ashok K. Singh and B. S. Bhadauria
forms expressions of these new difference formulae, which can give approximations of arbitrary order. Recently, using Lagrange’s interpolation formula, Singh and Thorpe [9] have given a general method from which various types of finite difference formulae can be obtained by assigning the suitable values to the parameters. Further the method also facilitates the generation of finite difference formulae for higher derivatives by differentiation. However the applicability of the above methods appears to be limited as their method holds only when the grid points are equally spaced.
Another class of problem concerned with the finite difference formulae in the numerical analysis is to find them in case of unequal subintervals. This situation specially arises in the mathematical modelling when the function has been obtained experimentally and the independent variable is not under the control of the experimenter, thus one need to find the finite difference formulae for the observational data. To tackle this situation, by introducing generalized Vandermonde determinant, Li [2] presented general explicit difference formulae with arbitrary order accuracy for approximating first and higher order derivatives, which can be used for both equally and unequally spaced data. However, we use the available Lagrange’s interpolation formula to obtain the finite difference formulae for unequally spaced subintervals.
2. Analysis
Using the Lagrange’s interpolation formula, function ( )xf can be
expressed as[1]
( ) ( ) jj
n
j
fxlxf ∑=
=0
(1)
where jf stands for ( )jxf , while ( )xl j is as given below
( )( )
( ) ( )l xx
x x xj
j j
=− ′
π
π. (2)
In the above equation (2), prime denotes differentiation with respect to x and
( ) ( )( ) ( )nxxxxxxx −−−= .... 10π . (3)
The truncation error, in the evaluation of ( )xf is as given below:
Finite difference formulae 817
( ) ( )( ) ( )E x
xn
fnn=
++πξ
11
! (4)
where ( )ξ1+nf denotes ( )thn 1+ derivative of ( )ξf , while ξ lies between the interval [ ]nxx ,0 . The interval [ ]nxx ,0 be divided into n subintervals of unequal
widths ,1h ,2h ,3h nh.,.. such that .1
0 ∑=
+=n
iin hxx
(a) Three Point Finite difference formulae: For this case 2=n , and hence
setting
( ) 2121110 and,1 hshxxshxxhsxx −=−=−+=− (5)
in equation (1) we have expression for ( )xf as
( )( ) ( ) ( )( ) ( ) ( )
( ) ( )2212
21
12
210
21
21 11)( xfhhhhssxf
hhshsxf
hhhshsxf
++
+−+
−+−
= . (6)
Differentiating equation (6) with respect to x , we get
( )( )
( ) ( )( ) 2
212
11
21
210
211
21 12122)( fhhhhsf
hhhhsf
hhhhshxf
++
+−+
−+−
=′ . (7)
Then by putting respectively, 0,1−=s and 12 / hh , the formulae for the first order derivatives of ( )xf at the points 210 ,, xxx can be obtained as
( )( ) ( ) 2
221
11
21
210
211
210
2)( f
hhhh
fhh
hhf
hhhhh
xf+
−+
+++
−=′ , (8a)
( ) ( ) 2212
11
21
210
211
21 )( f
hhhhf
hhhhf
hhhhxf
++
−−
+−=′ , (8b)
and ( ) ( ) 2212
211
21
210
211
22
2)( f
hhhhh
fhh
hhf
hhhh
xf+
++
+−
+=′ . (8c)
818 Ashok K. Singh and B. S. Bhadauria
Using (5) in equation (4), the error terms have been calculated as follows
( )ξfhhshssE ′′′−+=
6))(1( 2
2212 (9)
and ( )ξfhhshshhsE ′′′−+−=′
6)223( 12121
2
2 . (10)
The corresponding error terms in the formulae (8a, b, c) for 0,1−=s and 12 / hh ,
result in respectively as ( )ξfhhh ′′′+
6)( 211 , ( )ξf
hh ′′′−6
21 and ( ) ( )ξf
hhh ′′′+6
221 .
Differentiation of equation (7) produces difference formula for second derivative as
( )[ ]( )2121
21121022)(
hhhhfhfhhfh
xf+
++−=′′ , (11)
and the corresponding error term can be obtained by differentiating equation (10). For 21 hhh == , we obtain the finite difference formulae and the corresponding truncation errors for equal sub-intervals as obtained by Singh and Thorpe [9]. (b) Four point finite difference formulae: In this case 3=n , and substituting
(Singh and Thorpe[10])
( ) ( )32132121110 and,,1 hhshxxhshxxshxxhsxx +−=−−=−=−+=− (12)
in the corresponding equation of (1), we get
( )( )
( )( )( )( )
( ) 1322
321210
121
13221 1)( f
hhhhhshhshs
fHhh
shhhhshsxf
+−−−+
++
−+−=
( ) ( )
( )( ) ( )
( ) 33321
212
12
3221
1322
1 11f
hhhHhshhssf
hhhhshhhhss
+−+
++
−+++ (13)
where .3211 hhhH ++= Differentiation of (13) produces
Finite difference formulae 819
( )( ) ( )
( ) 01211
1123221 322)( f
Hhhhshshhhhhsh
xf+
−++−=′
( )( ) ( )( ) 1
3121
31321121 123f
hhhhhhshhhshhsh
++−−−+−
+
( ) ( ) ( )( ) 2
3221
21321 2312 f
hhhhhsshhhs
++−++
+( ) ( )
( ) 33321
212
1 1223 fhhhH
hhsshs+
+−++ . (14)
For 12 /,0,1 hhs −= and ( ) 132 / hhh + , the respective finite difference formulae are obtained from (14) as follows:
( ) ( )
( )( )
( ) 13121
1210
1211
2111210
2)( f
hhhhHhh
fHhhh
hhhHhhxf
++
++
+++−=′
( )( )( ) 3
3321
2112
3221
11 fhhhH
hhhf
hhhhHh
++
++
− , (15a)
( )
( )( ) ( )
( ) 13121
3213220
1211
3221
2)( f
hhhhhhhhhh
fHhhh
hhhxf
++−+
+++
−=′
( )
( ) ( ) 33321
212
3221
321 fhhhH
hhf
hhhhhhh
+−
++
− , (15b)
( )( )
( ) 13121
3210
1211
322 )( f
hhhhhhh
fHhhh
hhxf
++
−+
=′
( ) ( )
( )( )( ) 3
3321
2212
3221
212213 2f
hhhHhhhf
hhhhhhhhhh
++
++
+−++ , (15c)
( )( ) ( ) 1
3121
310
1211
3323 )( f
hhhhhH
fHhhh
hhhxf
++
++
−=′
( )
( )( )
( ) .3
33321
213112
3221
321 fhhhH
hHhhHf
hhhhhhH
++−
++
+− (15d)
The associated error term for four point formula is obtained from equation (4) as
820 Ashok K. Singh and B. S. Bhadauria
( ) ( ){ }( ) ( )( )[ ] ( )ξivfhshsshhhshhshsshE 212
13212121
3 122324
−++−−+−+=′ . (16)
The truncation errors corresponding to equations (15a, b, c, d) are derived respectively, from equation (16) as
( ) ( ) ( )[ ,,, 213232212111 hhhhhhhhhhhH +−++− ( )]3231 hhhH + ( ) 24/ξivf . Differentiation of equation (14) gives difference formulae corresponding to the second derivatives as
( )
( )( )
( ) 13121
32110
1211
132 232624)( f
hhhhhhhsh
fHhhh
shhhxf
+−−+
++
−+=′′
( )( )
( )( ) 3
3321
2112
3221
1132 3232f
hhhHhhsh
fhhhh
shhhh+
−++
+−−+
+ . (17)
For 12 /,0,1 hhs −= and ( ) 132 / hhh + , expression (17) results in
( )( )
( )( ) 1
3121
3210
1211
3210
222232)( f
hhhhhhh
fHhhh
hhhxf
+++
−+
++=′′
( )
( )( )( ) 3
3321
212
3221
11 222 fhhhH
hhfhhhh
Hh++
−++
+ , (18a)
( )( )
( )( ) 1
3121
3210
1211
321
2222)( f
hhhhhhh
fHhhh
hhxf
+−−
+++
=′′
( )
( )( )( ) 3
3321
212
3221
11 222f
hhhHhh
fhhhh
hH+−
++
−+ , (18b)
( )( )
( )( ) 1
3121
310
1211
232
222)( f
hhhhhH
fHhhh
hhxf
+−
++−
=′′
( )( )
( )( ) 3
3321
212
3221
123 2222f
hhhHhh
fhhhhhhh
++
++
−−+ , (18c)
and ( )( )
( )( ) 1
3121
310
1211
323
222)( f
hhhhhH
fHhhhhh
xf++
+++−
=′′
Finite difference formulae 821
( )
( )( )
( ) 33321
3212
3221
11 32222f
hhhHhhh
fhhhh
hH+++
++
−− , (18d)
respectively. Truncation error concerned with equation (17) is obtained from differentiation of equation (16) as
( )( ) ( ) ( ){ }[ ] ( )ξivfhshsshhhhshhshE 312
13211213 1225121
+−++−−+−=′′ , (19)
from which respective truncation errors corresponding to equations (18) can be derived. Differentiation of equation (17) gives
( ) ( )⎢⎣
⎡+
++
−=′′′ 13121
012111
116)( fhhhh
fHhhhh
xf
( ) ( ) ⎥⎦
⎤+
++
− 33321
23221
11 fhhhH
fhhhh
(20)
which is the difference formula for the third derivative in terms of the function at the four points situated at unequal intervals. The corresponding truncation error can be obtained by differentiating equation (19). Putting 321 hhhh === in above expressions, we obtained the results for equal sub-intervals as obtained by Singh and Thorpe [9]. (c) Five point finite difference formulae: The value of n is four for five point difference formulae. Substituting ( ) ,,,1 2121110 hshxxshxxhsxx −=−=−+=− ( ) ( )432143213 , hhhshxxhhshxx ++−=−+−=− (21)
in the corresponding equation obtained from (1), and then differentiating the resulting equation, we get
( )( )( ) ( )( )( )( )( ) 0
4321321211
432121112132121 2222)( f
hhhhhhhhhhhhhshhshshhHshhhshhsh
xf++++++
−−−−++−−−−=′
( )( )( ) ( )( )( )( )( ) 1
4323121
4321211121321211 22212f
hhhhhhhhhhshhshshhHshhhshhhsh
+++−−−−+++−−−−+
−
( )( )( ) ( )( )( ) ( ) 2
433221
432122
112132111 2222f
hhhhhhhhhshsshhHshhhshhsh
++−−−+++−−−+
+
822 Ashok K. Singh and B. S. Bhadauria
( )( )( ) ( )( )( )( ) 3
4332321
432122
11212111 222f
hhhhhhhhhhshsshhHshhshhsh
+++−−−+++−−+
−
( ) ( )( ) ( )( )( )( )( ) 4
4434324321
32122
1321211 2212f
hhhhhhhhhhhhshsshhhshhshhs
++++++−−++−−−+
+ (22)
The expressions for the above derivative at 420 and, xxxx = are obtained by setting respectively, 12 /,1 hhs −= and ( ) 1432 / hhhh ++ :
( ) ( )( )( ) 0
21211
4221121210
22)( f
HHhhhhHhhhHHhh
xf+
−+++−=′ ( )
( )( ) 1123121
2121 fhHhhhh
HHhh−+
++
( ) ( ) 2433221
211 fhhhhhh
HHh++
−( )( ) 3
43321
2211 fhhhhH
Hhhh++
+( )
( )( ) 4443122
1211 fhhhhHH
Hhhh+−
+− (23)
( )( ) 0
21211
43322 )( f
HHhhhhhhh
xf+
+=′
( ) ( )( )( ) 1
123121
43321 fhHhhhh
hhhhh−+
++−
( ) ( ) ( ) ( )( ) ( ) 2
433221
4322143321 22f
hhhhhhhhhhhhhhhh
++++−++
+
( ) ( )( ) 3
43321
43221 fhhhhHhhhhh
+++
+( )
( )( ) 4443122
1211 fhhhhHH
Hhhh+−
+− (24)
and
( )( )( ) 0
21211
443124 )( f
HHhhhhhhhH
xf+
+−=′
( )( )( ) 1
123121
4432 fhHhhhh
hhhH−+
+−
( )( ) ( ) 2
433221
4122 fhhhhhh
hhHH++
−+
( )( )( ) 3
43321
43122 fhhhhH
hhhHH+
+−−
( )( ) ( )( )
( )( ) 4443122
4312244312 22f
hhhhHHhhhHHhhhhH
+−+−++−
+ , (25)
Finite difference formulae 823
where .43212 hhhhH +++= Also the truncation errors corresponding to (23)-(25) are as given below:
( ) ( ) ( )ξvfHHhhh
xE120
2121104
+=′ (26)
( ) ( ) ( ) ( )ξvfhhhhhh
xE120
43322124
++=′ (27)
and ( ) ( )( ) ( )ξvfhhhhHH
xE120
43212244
+−=′ (28)
The second and third order derivatives of the function ( )xf at ,0xx = 42 and xx
are
( )( ) ( )( )( ) 0
2321211
43212142210
3242223)( f
HhhhhhhhhHhHHhHhh
xf+++
−−++−+=′′
( )( )( )( ) 1
4323121
214221 222f
hhhhhhhHHhHhh
++++−+
−( )
( ) ( ) 2433221
21421 222f
hhhhhhHHhHh
+++−
+
( ) ( )( )( ) 3
4332321
2212211 22 fhhhhhhh
HhhHhhh+++
++++−
( ) ( )( )( ) 4
4434322
121311 222f
hhhhhhHHhhhHh
+++++−
+ , (29)
( ) ( )( )( ) 0
2321211
4334322
222)( f
Hhhhhhhhhhhhh
xf+++
+++−=′′ ( )( ) ( )
( )( ) 14323121
4334321 222f
hhhhhhhhhhhhhh
++++−++
+
( ) ( )( ) ( )( ) ( ) 2
433221
4334321212 22222f
hhhhhhhhhhhhhhhh
++++++−+
+
( )( ) ( )( )( ) 3
4332321
2124321 222f
hhhhhhhhhhhhhh
++++−++
+( ) ( )( )( ) 4
4434322
321221 222f
hhhhhhHhhhhhh
++++−+
+ (30)
( ) ( )( )( )( ) 0
2321211
431244324
3233)( f
HhhhhhhhhhHhhhh
xf+++
+−+++=′′
824 Ashok K. Singh and B. S. Bhadauria
( ) ( ) ( )
( )( ) 14323121
4434324432 32f
hhhhhhhhhhhhHhhhH
+++++++++
−
( ) ( )( ) ( ) 2
433221
212412 222 fhhhhhh
HhHhhH++−+−
+( )( ) ( )
( )( ) 34332321
1224312 222f
hhhhhhhhHHhhhH
+++−++−
−
( )( ) ( ) ( )
( )( ) 44434322
1224434312 22222f
hhhhhhHhHHhhhhhhH
+++−++++−
+ , (31)
( )( ) 0
21211
43210
2346)( f
HHhhhhhhh
xf+
+++−=′′′ ( )
( )( ) 1123121
4321 2336f
hHhhhhhhhh
−++++
+
( )( ) ( ) 2
433221
4321 2236f
hhhhhhhhhh
+++++
−( )
( ) 343321
4321 236f
hhhhHhhhh
++++
+
( )( )( ) 4
443122
321 236f
hhhhHHhhh+−++
− , (32)
( )( ) 0
21211
4322
26)( f
HHhhhhhh
xf+
−−=′′′ ( )
( )( ) 1123121
4321 26f
hHhhhhhhhh−+−−+
−
( )( ) ( ) 2
433221
4321 226f
hhhhhhhhhh
++−−+
+( )
( ) 343321
4321 26f
hhhhHhhhh
+−−+
−
( )
( )( ) 4443122
321 26f
hhhhHHhhh+−
−++ , (33)
( )( ) 0
21211
4324
326)( f
HHhhhhhh
xf+
++=′′′ ( )
( )( ) 1123121
4321 326f
hHhhhhhhhh
−++++
−
( )( ) ( ) 2
433221
4321 3226f
hhhhhhhhhh
+++++
+( )
( ) 343321
4321 3326f
hhhhHhhhh
++++
−
( )( )( ) 4
443122
4321 4326f
hhhhHHhhhh
+−+++
+ . (34)
Finite difference formulae 825 Equations (29)-(34) represent the forward, central and backward difference formulae which are widely used to approximate the derivatives in practice. Also the fourth order derivative is given by
( ) ( )( ) 1123121
021211
1616)( fhHhhhh
fHHhhh
xf iv
−+−
+=
( ) ( ) ( ) 343321
2433221
1616 fhhhhH
fhhhhhh +
−++
+
( )( ) 4443122
16 fhhhhHH +−
+ . (35)
The truncation errors corresponding to (29)-(35) can be obtained by differentiating (4), as obtained in (26)-(28) corresponding to (23)-(25). As particular cases, if we put 4321 hhhhh ==== in the above expressions (29)-(35), we obtained the results for equal sub-intervals as given below
243210
0 12115611410435
)(h
fffffxf
+−+−=′′ (36a)
243210
2 12163016
)(h
fffffxf
−+−+−=′′ (36b)
243210
4 12351041145611
)(h
fffffxf
+−+−=′′ (36c)
343210
0 231424185
)(h
fffffxf
−+−+−=′′′ (36d)
34310
2 222
)(h
ffffxf
+−+−=′′′ (36e)
343210
4 25182414
)(h
fffffxf
+−+−=′′′ (36f)
and 443210
2464
)(h
fffffxf iv +−+−
= , (36g)
826 Ashok K. Singh and B. S. Bhadauria which are exactly same as obtained by Singh and Thorpe [9]. Formulation of the above finite difference approximations clearly suggests that the finite difference formulae in terms of any number of points can be obtained with the help of equations (1) and (4). The mathematical expressions resulting due to further differentiation of equation (1) will give finite difference formulae for higher derivatives. 3. Conclusion
Here we have presented 3, 4, and 5 points explicit finite difference formulae along with the error terms, for approximating the first and higher order derivatives for unequally spaced data. By differentiating the equation (1), finite difference formulae for higher order derivatives can also be obtained. These formulae can be used directly to solve the ordinary and partial differential equations and will serve to approximate the derivatives at the unequally spaced grid points. A scientific program of the above formulae will facilitate the use of any finite difference formulae of desired derivatives.
Acknowledgment. Authors would like to thank the Centre for Interdisciplinary Mathematical Sciences, Banaras Hindu University, Varanasi-221005, for providing the financial assistance and other facilities.
References
[1] F. B. Hildebrand, Introduction to Numerical Analysis, Mc Graw Hill, Inc, New York,
1974. [2] Jianping Li, General explicit difference formulas for numerical differentiation, J. Comput. Appl. Math., 183 (2005), 29–52. [3] I. R. Khan and R. Ohba, Closed-form expressions for the finite difference approximations of first and higher derivatives based on Taylor series, J. Comput. Appl.Math., 107 (1999a), 179–193. [4] I. R. Khan and R. Ohba, Digital differentiators based on Taylor series, IEICE Trans. Fund. E82-A, 12 (1999b), 2822–2824.
Finite difference formulae 827 [5] I. R. Khan and R. Ohba, New finite difference formulas for numerical differentiation, J. Comput. Appl. Math.,126 (2000), 269–276. [6] I. R. Khan and R. Ohba, Mathematical proof of explicit formulas for tap-coefficients of Taylor series based FIR digital differentiators, IEICE Trans.Fund.E84-A, (6) (2001), 1581–1584. [7] I. R. Khan and R. Ohba, Taylor series based finite difference approximations of higher-degree derivatives, J. Comput. Appl. Math., 154 (2003a), 115–124. [8] I. R. Khan, R. Ohba and N. Hozumi, Mathematical proof of closed form expressions for finite difference approximations based on Taylor series, J. Comput. Appl. Math., 150 (2003b), 303-309. [9] A. K. Singh and G. R. Thorpe, Finite difference formulae from Lagrange’s interpolation formula, J. Scientific Research, 52 (2008), 263-270. [10] A. K. Singh and G. R. Thorpe, Simpson’s 1/3-rule of integration for unequal divisions of integration domain, J. Concrete Applicable Maths., 1(3) (2003), 247-252. Received: September, 2008