Sie sind auf Seite 1von 6

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/281344007

New Richardson’s Extrapolation Spreadsheet Calculator Using VBA


Programming for Numerical Differentiations

Conference Paper · May 2014

CITATIONS READS

3 349

1 author:

Tay Kim Gaik


Universiti Tun Hussein Onn Malaysia
71 PUBLICATIONS   156 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

PROCESS ORIENTED GUIDED INQUIRY LEARNING (POGIL) View project

Numerical Solutions for Nonlinear Evolution Equations View project

All content following this page was uploaded by Tay Kim Gaik on 30 August 2015.

The user has requested enhancement of the downloaded file.


New Richardson’s extrapolation spreadsheet calculator using VBA programming for
numerical differentiations
Kim Gaik Tay, Sie Long Kek, and Rosmila Abdul-Kahar

Citation: AIP Conference Proceedings 1660, 050063 (2015); doi: 10.1063/1.4915696


View online: http://dx.doi.org/10.1063/1.4915696
View Table of Contents: http://scitation.aip.org/content/aip/proceeding/aipcp/1660?ver=pdfcov
Published by the AIP Publishing

Articles you may be interested in


Improved Richardson’s extrapolation spreadsheet calculator for numerical differentiation
AIP Conf. Proc. 1605, 740 (2014); 10.1063/1.4887682

Use of a spreadsheet for Fowler–Nordheim equation calculations


J. Vac. Sci. Technol. B 17, 534 (1999); 10.1116/1.590589

Wing Z Spreadsheet Program


Comput. Phys. 3, 93 (1989); 10.1063/1.4822861

The use of spreadsheet programs for noise control problems


J. Acoust. Soc. Am. 79, S2 (1986); 10.1121/1.2023158

Spreadsheet programs and physics


Am. J. Phys. 53, 1132 (1985); 10.1119/1.14067

This article is copyrighted as indicated in the article. Reuse of AIP content is subject to the terms at: http://scitation.aip.org/termsconditions. Downloaded to IP: 103.31.34.2
On: Sun, 24 May 2015 05:43:58
New Richardson’s Extrapolation Spreadsheet Calculator
Using VBA Programming for Numerical Differentiations
Kim Gaik Taya, Sie Long Kekb and Rosmila Abdul-Kahar
a
Faculty of Electrical and Electronic Engineering, Universiti Tun Hussein Onn Malaysia,
Batu Pahat, Johor, Malaysia
b
Department of Mathematics & Statistics, Faculty of Science, Technology and Human Development,
Universiti Tun Hussein Onn Malaysia, Batu Pahat, Johor, Malaysia

Abstract. In this paper, we have further improved the limitations of our previous two Richardson’s extrapolation
spreadsheet calculators for computing differentiations numerically. The new feature in this new Richardson’s
extrapolation spreadsheet calculator is fully automated up to any level based on the stopping criteria using VBA
programming. The new version is more flexible because it is controlled by programming. Furthermore, it reduces
computational time and CPU memory.

Keywords: Spreadsheet calculator; Richardson’s extrapolation; numerical differentiation.


PACS: 01.40.gb, 01.50.hv

INTRODUCTION

In real-world problems, applications of the rate of change have been well-defined. For example, flow rate in a
tank, productivity of an industrial process and marginal revenue of a manufacturing company. In fact, calculating
the rate of change requires the knowledge of differentiation, which is an interesting topic in numerical analysis.
Since the physical problems are complex, the exact differentiation is impossible to obtain. In such situations, an
approximation of the definite differentiation is important to provide a practical solution. Richardson’s extrapolation
[1-2], which is one of the powerful approaches in numerical differentiation, improves the rate of convergence of a
sequence in numerical differentiation.
Implementation of Richardson’s extrapolation via mathematical software or any computational tool leads to a
desired definite differentiation. According to the works of [3-11], Excel spreadsheet shows the calculation ability
for a wide range of numerical methods. In addition, the application of Excel spreadsheet in implementing
Richardson’s extrapolation for numerical differentiation has been developed in [12, 13] recently. However, previous
Richardson’s extrapolation Excel spreadsheet calculator [12] is limited to level four in calculating the numerical
differentiation and the initial value D(0, 0) of approximation to the derivative of a function is required to be keyed in
by users using 3-point central difference formula. The improved version of Richardson’s extrapolation Excel
spreadsheet calculator [13] overcomes the previous two limitations, in which users only need to enter x, f(x) and h
instead of the initial value D(0, 0) and it is able to calculate up to level 10. However, the work of [13] is still not yet
flexible up to any level. Hence, in this work, we further improved its flexibility using VBA programming.

RICHARDSON’S EXTRAPOLATION
There are two ways to improve derivative estimates when employing finite divided differences; decreasing the
step size or using a higher-order formula that employs more points. A third approach, based on Richardson’s
extrapolation which uses two derivatives, estimates a more accurate approximation. [14]
For a given function of f , approximations D, to the derivative of f at a specified value of x, can be computed for
a chosen value of h, using Richardson’s extrapolation method as follows: [15]

4K D( J , K  1)  D( J  1, K  1)
D( J , K )  O(h2 K  2 ), J 1, 2, ..., K 1, 2, ... (1)
4 1
K

International Conference on Mathematics, Engineering and Industrial Applications 2014 (ICoMEIA 2014)
AIP Conf. Proc. 1660, 050063-1–050063-4; doi: 10.1063/1.4915696
© 2015 AIP Publishing LLC 978-0-7354-1304-7/$30.00

050063-1
This article is copyrighted as indicated in the article. Reuse of AIP content is subject to the terms at: http://scitation.aip.org/termsconditions. Downloaded to IP: 103.31.34.2
On: Sun, 24 May 2015 05:43:58
f ( x  hJ )  f ( x  hJ )
D( J , 0) ,J 0, 1, 2, ... (2)
2hJ
h h h
h0 h, h1 , h2 ,..., hJ (3)
2 4 2J

The iteration process (1) is repeated until D( J , J )  D( J , J  1)  H or D( J , J )  D( J  1, J  1)  H for a specified


value of H . The value of D( J , J ) then approximates f c( x) at this level.

Richardson’s extrapolation table for K from 1 to 4 is shown in TABLE (1).

TABLE (1). Richardson’s Extrapolation table for level K values from 1 to 4.


J hJ K
0 1 2 3 4
D( J ,0) D( J ,1) D( J ,2) D( J ,3) D( J ,4)
0 h0 D(0,0)
1 h1 D(1,0) D(1,1)
2 h2 D(2,0) D(2,1) D(2,2)
3 h3 D(3,0) D(3,1) D(3,2) D(3,3)
4 h4 D(4,0) D(4,1) D(4,2) D(4,3) D(4,4)

NUMERICAL EXAMPLE
In this section, a numerical example to be solved by Richardson’s extrapolation is provided.

Question
The velocity (m/s) of a particle at time t seconds is given by
2t
. v(t )
1 t2
Using Richardson’s extrapolation, find the acceleration of the particle at time t =5s with h = 0.5 with h 0.5. If the
dv(t ) 2 2t 2
exact solution is a(t )  , find the absolute error.

3
dt 1 t2 1 t 2

Solution
2t
Let f (t ) be the velocity function, v(t ), then f (t ) v(t )
1 t2

Thus acceleration function given by a(t ) f c(t ) vc(t ) can be approximated using Richardson’s extrapolation at
t =5s with h = 0.5.

The numerical solution of this example is shown in Figure 1 in Section 4, where a(5) is approximately 0.0151,
while the absolute error is shown in cell G4 in FIGURE 1.

050063-2
This article is copyrighted as indicated in the article. Reuse of AIP content is subject to the terms at: http://scitation.aip.org/termsconditions. Downloaded to IP: 103.31.34.2
On: Sun, 24 May 2015 05:43:58
THE NEW IMPROVED RICHARDSON’S EXTRAPOLATION
SPREADSHEET CALCULATOR

FIGURE 1 illustrates the new improved Richardson’s extrapolation spreadsheet calculator. This new
spreadsheet calculator is able to compute the Richardson’s extrapolation value up to any level. Users need to enter
the function to be differentiated into cell C4, h into cell D4 and a chosen point of x into cell C3. Users can select the
desired accuracy of one decimal place, two decimal places, up to nine decimal places calculation from the drop
down menu in cell J3. To obtain the changes on the Richardson’s extrapolation table up to the desired accuracy,
users need to click on the APPLY button and the values in the Richardson’s extrapolation table will be calculated
automatically. The APPLY button is associated with VBA programming calculating the values in the Richardson’s
extrapolation table based of the stopping criteria. The details of the programming can be found in Appendix A. The
final answer is shown in cell E4. To calculate the absolute error, users need to enter the exact differentiated function
into cell F4. The absolute error will then be calculated automatically in cell G4.

FIGURE 1: Solution of new improved Richardson’s extrapolation spreadsheet calculator.

The advantage of this new improved Richardson’s extrapolation spreadsheet calculator is it is more flexible up to
any level based on the stopping criteria instead of level 10 in the previous improved Richardson’s extrapolation
spreadsheet calculator. Hence it freezes the memory reserves for level 10, saves memory and allows faster
computation.

CONCLUSION
A new improved Richardson’s extrapolation spreadsheet calculator has been developed to approximate the
derivative of the given function at a chosen point with a step size h. The VBA programming that calculates
Richardson’s extrapolation values is given in Appendix A and the layout of the spreadsheet calculator is shown in
Figure 1. The spreadsheet calculator is very user-friendly. It provides an alternative tool for approximating the
numerical differentiation by Richardson’s extrapolation. It can be used as a marking scheme for educators and
students who need full solutions. Moreover, it reduces calculation time and is hoped to improve students’ learning
ability.

ACKNOWLEDGMENTS
This project is financially supported by UTHM MDR research grant scheme vote 1109.

050063-3
This article is copyrighted as indicated in the article. Reuse of AIP content is subject to the terms at: http://scitation.aip.org/termsconditions. Downloaded to IP: 103.31.34.2
On: Sun, 24 May 2015 05:43:58
REFERENCES
1. L.F. Richardson, Philosophical Transactions of the Royal Society of London, Series A 210( 459-470), 307–357 (1911).
2. L.F. Richardson and J.A. Gaunt, Philosophical Transactions of the Royal Society of London, Series A 226 (636-646), 299–
349 (1927).
3. K.G. Tay, S. L. Kek and R. Abdul-Kahar, Proceeding of the 3rd International Conference on Science and Mathematics
Education (CoSMED 2009), 2009, pp. 452-456.
4. S. L. Kek, S. L. and Tay, K. G, Proceeding of the National Symposium on Application of Science Mathematics 2008
(SKASM 2008), 2008, pp 605-615.
5. S. L. Kek, S.L. and Tay, K. G, National Seminar on Science and Technology 2009 (PKPST 2009), 2009, pp. 69-73.
6. K. G. Tay, S. L. Kek and R. Abdul-Kahar, Proceeding of the National Symposium on Application of Science Mathematics
2010 (SKASM 2010) and 18th Mathematical Science National Symposium (SKSM 2010), 2010, pp. 331-337.
7. K. G. Tay and S. L. Kek, Proceeding of the National Symposium on Application of Science Mathematics 2008 (SKASM
2008), 2008, pp. 599-604.
8. K. G. Tay and S. L. Kek, Proceeding of the 17th National Symposium on Mathematical Science (SKSM 2009), 2009, pp.
653-658.
9. K. G. Tay and S. L. Kek, Proceedings of the 4th International Conference on Research and Education in Mathematics
(ICREM4), 2009, pp. 666-672.
10. K. G. Tay, S. L. Kek and Abdul-Kahar, Spreadsheets in Education (eJSiE) 5(2), 1-10 (2012).
11. K. G. Tay, S. L. Kek and R. Abdul-Kahar, National Seminar on Science and Technology 2009 (PKPST 2009), 2009, pp. 40-
45.
12. K.G. Tay, S.L. Kek, R. Abdul-Kahar M.A. Azlan and M.F. Lee, Spreadsheets in Education (eJSiE): 6(2),1-5 (2013).
13. K.G. Tay, S.L. Kek, R. Abdul-Kahar, Proceeding of the 21st National Symposium on Mathematical Science (SKSM 2013),
6-8 Nov 2013, Gurney Resort Penang.
14. S. C. Chapra. Numerical Methods for Engineers. 5th Edition. Boston: Mc Graw Hill, 2006.
15. J. H. Mathews and K. D. Fink. Numerical Methods Using Matlab. Upper Saddle River, New Jersey: Pearson Education, Inc,
2004.

050063-4
This article is copyrighted as indicated in the article. Reuse of AIP content is subject to the terms at: http://scitation.aip.org/termsconditions. Downloaded to IP: 103.31.34.2
On: Sun, 24 May 2015 05:43:58
View publication stats

Das könnte Ihnen auch gefallen