A New 3-Dimenional Polynomial Intepolation Method: An Algoithmic Appoach Amitava Chattejee* and Rupak Bhattachayya** A new 3-dimenional intepolation method i intoduced in thi pape. Coeponding to the method a novel intepolation opeato ha been contucted and ued to obtain eult. The main objective i to develop a mechanical way of intepolation that doe not equie vey high degee of knowledge of mathematical analyi but only elementay mathematic. The popetie of the opeato have been dicued in detail. Unlike othe method the numbe of node equied in the popoed intepolation method i much le. A numeical example i alo funihed in uppot of the fomula obtained. Keywod: 3-dimenional intepolation 3D intepolation opeato Intepolating uface Intoduction The method of intepolation in claical numeical analyi i a baic and fundamental one. The polynomial appoximation fo the point in 2-dimenional Euclidean pace i well-known to u and vaiou method vi. Newton divided diffeence intepolation method Lagange intepolation method etc. (Beut and Tefethen 2004; and Veeaajan and Ramachanda 2005 ae aleady etablihed to funih thi pat of numeical analyi. Nevethele the intepolation method (Scaboough 1966 o fa developed fo the point of thee o highe dimenional Euclidean pace ae not that much handy a mot of thee method equie detail knowledge of mathematical analyi o they ae bounded by ome etiction. The main objective of the pape i to contuct a 3-dimenional intepolation method that equie only pimay knowledge of mathematic. In addition the n intepolation method dicued hee equie 1 ( n + 2 node which i much 2 le than the numbe of node equied in any othe algoithmic method. * Reeach Schola Depatment of Mathematic National Intitute of Technology Dugapu Wet Bengal India. E-mail: amitava.math@gmail.com ** Aitant Pofeo and Head Depatment of Mathematic Camellia Intitute of Engineeing and Technology Bud Bud Budwan and Reeach Schola Depatment of Mathematic National Intitute of Technology Dugapu Wet Bengal India; and i the coeponding autho. E-mail: mathup@gmail.com A New 20113-Dimenional IUP. All Right Polynomial Reeved. Intepolation Method: An Algoithmic Appoach 29
In thi pape we popoe a compact intepolation method to intepolate point in 3D. Simila method can be etablihed fo n-dimenional intepolation (n > 3. A new intepolation opeato i defined and ued hee. Fo 2-dimenional intepolation thi opeato coincide with the divided diffeence opeato. Some theoem in uppot of thi ae alo etablihed. The pape i oganied a follow: In Section 2 the intepolation opeato i defined and dicued. In Section 3 the intepolation method i dicued and the coeponding algoithm i peented. Subequently in Section 4 a numeical example i peented in uppot of the fomula obtained and finally the concluion i offeed. 2. The 3D Intepolation Opeato Let u conide a function = f(x y (a x b c y d whoe analytical fom i not known. Let u conide the (n + 1 point x 0 x 1 x 2 x n 1 x n uch that (a = x 0 < x 1 < x 2 < < x n 1 < x n (= b. We alo conide the (n + 1 point y 0 y 1 y 2... y n uch that (c = y 0 < y 1 < y 2 < y 3 < < y n (= d. The point x i (i = 0 1 2 n and y j (j = 0 1 2 n ae not neceaily equally paced. Let the value of be known coeponding to the et of value of x and y: {(x i : i = 0 1 2 n; j = 0 1 2 n i + j n} and let = f(x i [i = 0 1 2 n; j = 0 1 2 n; i + j n] be the value. n 1 ( n + 2 Thu we obtain Table 1 containing n 1 n 2 1 tem. 2 x y Table 1: Table of Node y 0 y 1 y 2 y n 2 y n 1 y n x 0 00 01 02 0(n 2 0(n 1 0n x 1 10 11 12 1(n 2 1(n 1 x 2 20 21 22 2n. x (n 2 (n 20 (n 21 (n 22 x (n 1 (n 10 (n 11 x n n0 Definition: The value of the ( th odeed opeato Б fo the et of point {(x i : i j = 0 1 2 n i + j n} i defined a: 30 The IUP Jounal of Computational Mathematic Vol. IV No. 1 2011
Б + ( 1 ( 1 ( 2 ( 1 ( 1 ( 2 10 01 00 1 j xi x yj y i0 0 0 0 i j...(1 Note that the um of the uffixe of the element within {} in Б + ae epectively + + 1 + 2 2 1 0. {} contain all the poible combination of that type. Theoem 1: The value of the 3D opeato of any ode of the function k.f(x y i k time the value of the 3D opeato of that ode of the function f(x y. Poof: Let = f(x y be the function and = f(x i be the entie. Alo let w = k. = k.f(x y uch that w = k. = k.f(x i We have Б + ( 1 ( 1 ( 2 ( 1 ( 1 ( 2 10 01 00 1 j xi x yj y i0 0 0 0 i j Hence Б + w w w w w w w w w 1 ( 1 ( 1 ( 2 ( 1 ( 1 ( 2 10 01 00 j xi x yj y i0 0 0 0 i j w A New 3-Dimenional Polynomial Intepolation Method: An Algoithmic Appoach 31
1 k. 1 0 0 0 0 i j i j. k i0 j0 i0 j0 xi x yj y xi x yj y + = k. Б 1 1 2 1 1 2 10 01 00 Hence the theoem i poved. Theoem 2: The 3D opeato i not ymmetic i.e. + + Б Б. Poof: The poof i immediate fom the fact that + Б involve the point ( { ( 1 ( 1 }{ ( 2 ( 1( 1 ( 2 } { 10 01 } 00 wheea + Б involve the point ( { ( 1 ( 1 }{ ( 2 ( 1( 1 ( 2 } { 10 01 } 00 and fo the two et of value ae not ame. Note 1: If we conide a a function of a ingle vaiable then the 3D intepolation opeato coincide with the Newton divided diffeence opeato. Poof: Fo = f(x with entie i = f(x i the 3D opeato will be denoted by Б and clealy Б 1 2 0 i = 0 = 0 i = the th ode divided diffeence Note 2: We note that Б + x i i x f xi f x x x 1 2 i = 0 x x = = = 0 i 1 1 2 1 1 2 i 1 j xi x yj y i0 0 0 0 i j 10 01 00 32 The IUP Jounal of Computational Mathematic Vol. IV No. 1 2011
1 i yj y xi x j0 0 0 0 j i 3. The 3-Dimenional Polynomial Intepolation Method If = f(x y i pecified by a given explicit fomula then we can find the value o value of coeponding to fixed given value of x and y by imply ubtituting the value of x and y in the fomula. But if = f(x y i not explicitly known even then we can compute an appoximate epeentative value of the function up to a deied degee of accuacy with the help of the 3D opeato developed hee. Let the analytic fom of the function = f(x y be not known but the value of coeponding to the et of value {(x i : i = 0 1 2 n; j = 0 1 2 n; i + j n} ae identified. Let = f(x i i = 0 1 2 n; j = 0 1 2 n; i + j n be the value that take (ee Table 1. Etimating the value of the function at non-tabula point having an eo bound between the etimated and the tue value i the main objective of intepolation. Hee we detemine an algebaic equation (x y uch that (x i = f(x i = i = 0 1 2 n; j = 0 1 2 n; i + j n. Let (x y = a 00 + {a 10 + a 01 ( y y 0 } + {a 20 (x x 1 + a 11 ( y y 0 + a 02 ( y y 0 ( y y 1 } + {a 30 (x x 1 (x x 2 + a 21 (x x 1 ( y y 0 + a 12 ( y y 0 ( y y 1 + a 03 ( y y 0 ( y y 1 ( y y 2 } + + {a n0 (x x 1 (x x 2 (x x n 2 (x x n 1 + a (n 11 (x x 1 (x x 2 (x x n 2 (y y 0 + a (n 22 (x x 1 (x x 2 (x x n 3 ( y y 0 ( y y 1 + + a 1(n 1 ( y y 0 ( y y 1 ( y y 2 ( y y n 2 + a 1n ( y y 0 ( y y 1 ( y y 2 ( y y n 1 } n m i1 j1 i.e. x y a x xk y yl m0 i j0 k0 l0 i jm...(2 A New 3-Dimenional Polynomial Intepolation Method: An Algoithmic Appoach 33
Now when x = x 0 and y = y 0 then = 00 (ee Table 1. Again (x 0 y 0 = 00. Hence fom Equation (2 we get 00 = a 00. When x = x 1 y = y 0 then = 10. Then fom Equation (2 we get 10 = (x 1 y 0 = 00 + a 10 (x 1 x 0 a 10 x x 10 00 1 0 10 00 a10 x x x x 1 0 0 1 1+0 a10 = Б 10 00 When x = x 0 y = y 1 then = 01. Then fom Equation (2 we get 01 = 00 + a 01 (y 1 y 0 a 01 y y 01 00 1 0 a Б 01 00 0+1 01 01 00 y1 y0 y0 y 1 When x = x 2 y = y 0 then = 20. Then fom Equation (2 we get 20 = a 00 + a 10 (x 2 x 0 + a 20 (x 2 x 0 (x 2 x 1 a x x x x x x 10 00 20 2 0 2 1 20 00 2 0 x1 x0 a 20 20 10 00 x x x x x x x x x x x x 2 0 2 1 1 0 1 2 0 2 0 1 2+0 a20 = Б 20 10 00 When x = x 1 y = y 1 then = 11. Then fom Equation (2 we get 11 = a 00 + a 10 (x 1 x 0 + a 01 (y 1 y 0 + a 11 (x 1 x 0 (y 1 y 0 a x x y y x x y y 10 00 01 00 11 1 0 1 0 11 00 1 0 1 0 x1 x0 y1 y0 a x x y y 11 1 0 1 0 11 10 01 00 34 The IUP Jounal of Computational Mathematic Vol. IV No. 1 2011
1 00 01 1 10 11 a11 x0 x1 y0 y1 y1 y0 x1 x0 y0 y1 y1 y0 1+1 a11 = Б 11 10 01 00 When x = x 0 y = y 2 then = 02. Then fom Equation (2 we get 02 = a 00 + a 01 ( y 2 y 0 + a 02 ( y 2 y 0 ( y 2 y 1 a y y y y y y 01 00 02 2 0 2 1 02 00 2 0 y1 y0 a 02 02 01 00 y y y y y y y y y y y y 2 0 2 1 1 0 1 2 0 1 0 2 0+2 a02 = Б 02 01 00 When x = x 2 y = y 1 then = 21. Hence fom Equation (2 we get a a x x a y y a x x x x 21 00 10 2 0 01 1 0 20 2 0 2 1 a x x y y a x x x x y y 11 2 0 1 0 21 2 0 2 1 1 0 a x x x x y y 21 2 0 2 1 1 0 21 00 x x y y x2 x0 y1 y0 10 00 01 00 1 0 1 0 20 10 00 x x x x x x x x x x x x 2 0 2 1 1 0 1 2 0 2 0 1 00 01 x x x x 2 0 2 1 1 x0 x1 y0 y1 y1 y0 1 x2 x0 y1 y0 x1 x0 y0 y1 y1 y 0 10 11 A New 3-Dimenional Polynomial Intepolation Method: An Algoithmic Appoach 35
1 21 1 20 a21 x x x x y y x x x x y y 2 0 2 1 1 0 2 0 2 1 0 1 1 11 1 10 x x x x y y x x x x y y 1 0 1 2 1 0 1 0 1 2 0 1 1 01 1 00 x x x x y y x x x x y y 0 1 0 2 1 0 0 1 0 2 0 1 1 21 20 a21 x2 x0 x2 x1 y1 y0 y0 y1 1 11 10 x1 x0 x1 x2 y1 y0 y0 y1 1 01 00 x0 x1 x0 x2 y1 y0 y0 y1 2+1 a21 = Б 21 20 11 10 01 00 Thu we get: 1+0 0+1 a10 = Б 10 00 a01 Б 01 00 2+0 1+1 0+2 a20 = Б 20 10 00 a11 Б 11 10 01 00 a02 Б 02 01 00 2+1 1+2 a21 = Б 21 20 11 10 01 00 a12 Б 12 11 02 10 01 00 3+0 2+2 a30 = Б 30 20 10 00 a22 Б 22 21 12 20 11 02 10 01 00 + Б 1 1 2 1 1 2 a = 10 01 00 Hence fom Equation (2 and uing Equation (1 we obtain the equied intepolating polynomial a: x y 36 The IUP Jounal of Computational Mathematic Vol. IV No. 1 2011
a n m i1 j1 a x x y y k l m0 i j0 k0 l0 i jm n m i j i1 j1 1 i j x xk y yl m0 i j0 0 0 k0 l0 i jm x x y y 0 0 i+ m-i ai mi = Б imi imi 1 i 1 mi i mi2 i1 mi1 i2 mi 10 01 00...(3 We note that if f(x y i itelf a polynomial then the above-dicued method will give the exact eult i.e. if f(x y i a polynomial then f(x y = (x y. Next we peent a compute-oiented algoithm to find the value of the coefficient a i.e. of + Б a well a the intepolated value of coeponding to pecific value of x and y. 3.1 Algoithm to Intepolate 1. define x[20] y[20] [20][20] a[20][20] //thee ae double type aay 2. ead n 3. fo i = 0 to n do till (5 4. ead the value of x i 5. next i 6. fo i = 0 to n do till (8 7. ead the value of y i 8. next i 9. fo i = 0 to n do till (13 10. fo j = 0 to n i do till (12 A New 3-Dimenional Polynomial Intepolation Method: An Algoithmic Appoach 37
11. ead the value of ow wie 12. next j 13. next i 14. take ow = 1 column = 15 15. fo i = 0 to n do till (18 16. et the cuo poition to the ow column and pint the value of y i up to 5 decimal place 17. inceae column by 12 18. next i 19. take column = 1 and ow = 3 20. fo i = 0 to n do till (23 21. et the cuo poition to the ow column and pint the value of x i up to 5 decimal place 22. inceae ow by 1 23. next i 24. et ow = 3 column = 15 25. fo i = 0 to n do till (31 26. fo j = 0 to n i do till (29 27. et the cuo poition to the ow column and pint the value of up to 5 decimal place 28. inceae column by 12 29. next j 30. inceae ow by 1 and et again column = 15 31. next i 32. et N = 1 33. while N 0 34. ead the value of N // eithe N = 1 (if value i needed o N = 0 (if value i not needed 35. if N = 1 then do tep up to (77 36. ead the value of the fit vaiable X and econd vaiable Y 38 The IUP Jounal of Computational Mathematic Vol. IV No. 1 2011
37. 3 0 38. fo m = 0 to n do till (75 39. p 1 q 1 2 0 40. fo i = 0 to m do till (73 41. j m i p 1 q 1 1 42. if i > 0 do tep up to (45 43. fo k = 0 to i 1 do till (45 44. p p*(x x k 45. next k 46. if j > 0 do tep up to (49 47. fo l = 0 to j 1 do till (49 48. q q*(y y l 49. next l 50. p*q 51. t 0 p 1 1 1 0 0 52. fo p = 0 to i do till (68 53. t 1 1 d 1 1 t 2 0 p 1 1 54. fo a 1 = 0 to i do till (58 55. if a 1 p do tep (56 56. t 1 t 1 *(x p x a1 57. d 1 1/t 1 58. next a 1 59. 0 t 2 0 60. fo q = 0 to j do till (66 61. p 1 1 62. fo b 1 = 0 to j do till (64 63. if b 1 q then do p 1 p 1 *(y q y b1 64. next b 1 65. t 2 pq /p = + t 2 A New 3-Dimenional Polynomial Intepolation Method: An Algoithmic Appoach 39
66. next q 67. t d 1 * + t 68. next p 69. a 70. wite the value of i j and the value of a up to 15 decimal place 71. 1 * 72. 2 2 + 1 73. next i 74. 3 3 + 2 75. next m 76. Z 3 77. wite the value of Z 78. go to tep (34 79. ele beak 80. top 4. Example Let u conide the et of data given in Table 2. Table 2: Table of Node x y 1 2 4 7 8 1 2 3 5 8 9 3 64 49 19 26 4 209 165 77 6 1117 943 8 3649 Let x ybe the equied intepolating polynomial. Then fom Equation (2 we have: x y 1 2 1 3 4 1 3 1 2 a x 1 a y 1 a x 1 x 3 a x 1 y 1 10 01 20 11 a y y a x x x a x x y 02 30 21 40 The IUP Jounal of Computational Mathematic Vol. IV No. 1 2011
1 2 4 1 3 4 6 a y y y a x x x x 03 40 1 3 4 1 1 3 1 2 a x x x y a x x y y 31 22 1 1 2 4 1 2 4 7 a x y y y a y y y y 13 04...(4 Now uing Equation (1 we get: 1+0 1+0 a10 = Б 10 00 Б 64 2 31 0+1 0+1 a01 = Б 01 00 Б 3 2 1 2+0 2+0 a20 = Б 20 10 00 Б 209 64 2 38 1+1 1+1 a11 = Б 11 10 01 00 Б 49 64 3 2 8 a 0+2 0+2 12 02 = Б 02 01 00 Б 5 3 2 1 10 3+0 3+0 a30 = Б 30 20 10 00 Б 1117 209 64 2 13 2+1 2+1 a21 = Б 21 20 11 10 01 00 Б 165 209 49 64 3 2 7 11 1+2 2+1 a12 = Б 12 02 11 10 01 00 Б 19 5 49 64 3 2 3.3 10 a 0+3 0+3 12 03 = Б 03 02 01 00 Б 8 5 3 2 1 10 4+0 4+0 a40 = Б 40 30 20 10 00 Б 3649 1117 209 64 2 1 3+1 a31 Б 31 30 21 20 11 10 01 00 3+1 = Б 943 1117 165 209 49 64 3 2 1 1+3 a13 Б 13 03 12 02 11 10 01 00 12 1+3 = Б 26 8 19 5 49 64 3 2 5.5 10 2+2 a22 Б 22 21 12 20 11 02 10 01 00 A New 3-Dimenional Polynomial Intepolation Method: An Algoithmic Appoach 41
11 2+2 = Б 77 165 19 209 49 5 64 3 2 1.1 10 0+4 0+4 a04 = Б 04 03 02 01 00 Б 9 8 5 3 2 0 Hence fom Equation (4 by ubtituting the value of a we get the intepolating polynomial a: 4 3 2 x y x x y x y xy x 1 Thi intepolating uface i hown in Figue 1. Figue 1: The Suface Coeponding to the Example x 4 x 3 y + x 2 y + xy x +1 4000 3500 3000 2500 2000 1500 1000 500 0 10 500 1000 6 4 2 y 0 2 4 6 10 5 0 x 5 Concluion The intepolation method etablihed and dicued in thi pape i one of it kind. It involve vey lucid knowledge of mathematic. The algoithmic appoach give it the compact fom and it make the tak of obtaining the appoximate value of eaie. Thee ae two main ue of thi intepolating uface. The fit ue i in econtucting the function f(x y when it i not given explicitly and only the value of (x y and/o it cetain ode deivative at a et of point called node tabula point o agument ae known. The econd ue i to eplace the uface f(x y by 42 The IUP Jounal of Computational Mathematic Vol. IV No. 1 2011
the intepolating uface (x y o that many common opeation which ae intended fo the function f(x y may be pefomed uing (x y. Acknowledgment: The autho ae thankful to Mouumi Ghoh fo he valuable contibution egading compute pogamming and elated topic. Refeence 1. Beut J P and Tefethen L N (2004 Baycentic Lagange Intepolation SIAM Review Vol. 46 No. 3 pp. 501-517. 2. Scaboough J B (1966 Numeical Mathematical Analyi 6 th Edition pp. 121-124 Oxfod and IBH Publihing Co. Pvt. Ltd. New Delhi. 3. Veeaajan T and Ramachanda T (2005 Numeical Method TMH Outline Seie pp. 253-255 and 487-489 New Delhi. Refeence # 61J-2011-03-03-01 Fom IV 1. Place of publication : Hydeabad 2. Peiodicity of it publication : Quately 3. Pinte Name : E N Muthy Nationality : Indian (a Whethe a citien of India? : Ye Adde : M/. ICIT Softwae Cente Pvt. Ltd. Plot No. 165 & 166 P Phae-V IDA Jeedimetla Hydeabad 500055. 4. Publihe Name : E N Muthy Nationality : Indian (a Whethe a citien of India? : Ye Adde : # 126 Mahalaxmi Towe Sinaga Colony Hydeabad 500073. 5. Edito Name : E N Muthy Nationality : Indian (a Whethe a citien of India? : Ye Adde : # 126 Mahalaxmi Towe Sinaga Colony Hydeabad 500073. 6. Name and addee of individual who own the newpape and holding moe than one pecent of the total capital IUP Publication # 126 Mahalaxmi Towe Sinaga Colony Hydeabad 500073. I E N Muthy heeby declae that the paticula given above ae tue to the bet of my knowledge and belief. Date Sd/- Mach 2011 Signatue of Publihe A New 3-Dimenional Polynomial Intepolation Method: An Algoithmic Appoach 43