Numfracpy, Fractional Calculus Techniques with Python
Abstract
This work introduces a Python library that implements techniques of fractional calculus. This type of
calculus has seen a significant increase in its applications across various scientific areas in recent decades.
However, the calculations required for its development are not straightforward, and there are limited
computational tools available, especially in Python. Numfracpy is publicly available on the Python Package
Index (PyPI) and incorporates various fractional calculus concepts, such as Riemann-Liouville integral and
derivative, Caputo derivative, Grünwald-Letnikov derivative, Mittag-Leffler functions, numerical solution of
a specific fractional differential equation, and a system of such differential equations. The paper presents
several implemented algorithms, and the obtained results are compared with those reported in the literature,
demonstrating good approximations in the various illustrated examples.
Keywords
Fractional Calculus, Caputo, Grüwald-Letnikov, Numerical Methods, Python, Riemann- Liouville.
References
- B. Ross, “The development of fractional calculus 1695 -1900”, Historia Mathematica, vol. 4, no. 1, pp. 75 - 89, 1977. doi:10.1016/0315-0860(77)90039-8.
- N.H. Abel, L. Sylow and S. Lie “Solution de quelques problémes á láide díntégrales définies”, Oeuvres complétes de Niels Henrik Abel, pp. 11 - 27, 2012.doi:10.1017/cbo9781139245807.003.
- I. Podlubny, R. L. Magin, and I. Trymorush, “Niels Henrik Abel and the birth of fractional calculus”, Fractional
- Calculus and Applied Analysis, vol. 20, no. 5, pp. 1068-1075, 2017. doi:10.1515/fca-2017-0057.
- J. Liouville, “Mémoire sur quelques questions de géométrie et de mécanique, et sur un nouveau genre de calcul
- pour résoudre ces questions”, Journal de l’École Polytechnique, Paris, 13: 1-69. 1832.
- J. Liouville, “Mémoire sur le calcul des différentielles á indices quelconques”, Journal de l’École Polytechnique,Paris, 13: 71-162. 1832.
- K. Oldham and J. Spanier, “The fractional calculus theory and applications of differentiation and integration to arbitrary
- order”. Elsevier, 1974.
- I. Podlubny, “Fractional differential equations: an introduction to fractional derivatives, fractional differential equations, to methods of their solution and some of their applications”. Elsevier, 1998.
- G. Sales Teodoro, J. A. Tenreiro Machado, and E. Capelas de Oliveira, “A review of definitions of fractional derivatives and other operators”, Journal of Computational Physics, vol. 388, pp. 195-208, 2019.
- doi:10.1016/j.jcp.2019.03.008.
- J. T. Machado, V. Kiryakova, and F. Mainardi, “Recent history of fractional calculus”, Communications in Nonlinear
- Science and Numerical Simulation, vol. 16, no. 3, pp. 1140-1153, 2011. doi:10.1016/j.cnsns.2010.05.027.
- J. A. Tenreiro Machado et al., “Some applications of fractional calculus in engineering”, Mathematical
- Problems in Engineering, vol. 2010, pp. 1-34, 2010. doi:10.1155/2010/639801.
- R. C. Koeller, “Applications of fractional calculus to the theory of viscoelasticity”, Journal of Applied Mechanics, vol. 51, no. 2, pp. 299-307, 1984.doi:10.1115/1.3167616.
- J. F. Reverey et al., “Superdiffusion dominates intracellular particle motion in the supercrowded cytoplasm of
- pathogenic Acanthamoeba castellanii” Scientific Reports, vol. 5, no. 1, 2015. doi:10.1038/srep11690.
- N. Challamel and T. M. Atanackovic, “Fractional Calculus with Applications in Mechanics: Wave Propagation,
- Impact and Variational Principles”. John Wiley and Sons Incorporated, 2014.
- S. Holm and S.P. Näsholm. “A causal and fractional allfrequency wave equation for lossy media”. The Journal of the Acoustical Society of America, 130(4), pp. 2195-2202, 2011.
- F. Ciuchi, A. Mazzulla, N. Scaramuzza, E.K. Lenzi and L.R. Evangelista. “Fractional diffusion equation and the
- electrical impedance: Experimental evidence in liquidcrystalline cells”. The Journal of Physical Chemistry C, 116(15), 8773-8777, 2012.
- P.D. Mandi´c, T.B. Sekara, M.P. Lazarevi´c, and m. Boskovi ´c. “Dominant pole placement with fractional order PID
- controllers: D-decomposition approach”. ISA transactions, 67, 76-86, 2017.
- J. Zhang, Z. Wei, and L. Xiao, L. “Adaptive fractionalorder multi-scale method for image denoising”. Journal of Mathematical Imaging and Vision, 43, 39-49, 2012.
- H. Sun, Y. Zhang, D. Baleanu, W. Chen, and Y. Chen, “A new collection of real world applications of fractional
- calculus in Science and Engineering”, Communications in Nonlinear Science and Numerical Simulation, vol. 64,
- pp. 213-231, 2018. doi:10.1016/j.cnsns.2018.04.019.
- V. Tarasov, “On history of mathematical economics: Application of fractional calculus”, Mathematics, vol. 7, no. 6, p. 509, 2019. doi:10.3390/math7060509.
- Z. Li, L. Liu, S. Dehghan, Y. Chen, and D. Xue, “A review and evaluation of numerical tools for fractional calculus and Fractional Order controls”, International Journal of Control, vol. 90, no. 6, pp. 1165-1181, 2016. doi:10.1080/00207179.2015.1124290.
- R. Garrappa, “Numerical solution of fractional differential equations: A survey and a software tutorial”, Mathematics, vol. 6, no. 2, p. 16, 2018. doi:10.3390/math6020016
- R. Marazzato and A. C. Sparavigna. “Astronomical image processing based on fractional calculus: the AstroFracTool.” arXiv preprint arXiv:0910.4637, 2009.
- T. Onyedi, A. Tepljakov, and E. Petlenkov, “Fomconpy: Fractional-order modelling and Control Library for python”, 2020 43rd International Conference on Telecommunications and Signal Processing (TSP), 2020. doi:10.1109/tsp49548.2020.9163581.
- T. Dasgupta and M. Maitra, “An extremely fast and accurate fractional order differentiator” in 2017 8th International Conference on Computing, Communication and Networking Technologies (ICCCNT), pp. 1-4, July,2017.
- T. Midya, D. Garai, and T. Dasgupta, “A fast and accurate module for calculating fractional order derivatives and integrals in Python”, 2018 9th International Conference on Computing, Communication and Networking Technologies (ICCCNT), 2018. doi:10.1109/icccnt.2018.8494055.
- M. Adams, “differint: A Python Package for Numerical Fractional Calculus”, arXiv:1912.05303 [cs.MS], December,
- , doi:10.48550/arXiv.1912.05303.
- R. Garrappa, “Numerical evaluation of two and three parameter Mittag-Leffler functions”, SIAM Journal on Numerical Analysis, 53(3), pp. 1350-1369, 2015, doi:10.1137/140971191.
- R. Herrmann, “Fractional calculus: an introduction for physicists”. World Scientific Publishing, 2018.
- S. Chapra, “Numerical methods for engineers”. Mcgrawhill, 2010.
- R. Hamming, “Numerical methods for scientists and engineers”. Courier Corporation, 2012.
- E. Isaacson and H. B. Keller, “Analysis of numerical methods”. Dover Publications, 1994.
- P. J. Davis and P. Rabinowitz, “Methods of numerical integration”. Dover Publications, 2007.
- Scipy, Disponible en https://scipy.org/ (accessed March 7, 2024).
- QUADPACK, Disponible en https://en.wikipedia.org /wiki/ QUADPACK (accessed March 7, 2024)
- C. Li and F. Zeng. “Numerical methods for fractional calculus”. CRC Press, 2015.
- T. A. M. Langlands, and B. I. Henry. “The accuracy and stability of an implicit solution method for the fractional diffusion equation.” Journal of Computational Physics 205.2, pp 719-736, 2005, doi: 10.1016/j.jcp.2004.11.025
- F. Zeng and C. “A new Crank-Nicolson finite element method for the time-fractional subdiffusion equation”. Applied Numerical Mathematics 121, pp: 82-95, doi:10.1016/j.apnum.2017.06.011
- Saeed. Fractional calculus 03 Riemann Liouville fractional integral dr saeed, YouTube. Disponible en https://www.youtube.com/watch?v=lHMScG219P4&list =RDCMU COjjhlMi0O2WSIPEn9TDZ5Q&index=2 (Accessed: March 7 2024).
- K. Diethelm and N. J. Ford, “Analysis of fractional differential equations”, Journal of Mathematical Analysis and Applications, 265(2), pp. 229-248, 2002, doi:10.1006/jmaa.2000.7194.
- D. Baleanu, K. Diethelm, E. Scalas and J. J. Trujillo. “Fractional calculus: models and numerical methods”. Vol. 3. World Scientific, 2012.
- K. Khinsen. Khinsen/Mittag-Leffler: The generalized mittag-leffler in Python, GitHub. Disponible en https://github.com/khinsen/mittag-leffler (Accessed: March 7 2024).
- K. Diethelm, N. J. Ford, A. D. Freed, and Y. Luchko, “Algorithms for the fractional calculus: A selection of numerical methods”, Computer Methods in Applied Mechanics and Engineering, vol. 194, no. 6-8, pp. 743-773, Feb. 2005, doi: 10.1016/j.cma.2004.06.006.
- K. Diethelm and A. D. Freed, “On the Solution of Nonlinear Fractional-Order Differential Equations Used in the Modeling of Viscoplasticity”, in Springer eBooks, 1999, pp. 217-224. doi: 10.1007/978-3-642-60185-9_24.
- P. J. Torvik and R. L. Bagley (1984) “On the appearance of the fractional derivative in the behavior of real materials”, Journal of Applied Mechanics, 51(2), pp. 294-298, Jun. 1984, doi:10.1115/1.3167615.
- K. Diethelm and J. Ford, “Numerical solution of the Bagley-Torvik equation”, BIT NumericalMathematics, vol. 42, no. 3, pp. 490-507, 2002. doi:10.1023/a:1021973025166.
- M.G. Sakar, O. Saldir and A. Akgül, A, “Novel Technique for Fractional Bagley-Torvik Equation”. Proc. Natl. Acad. Sci., India, Sect. A Phys. Sci. 89, pp. 539-545, 2019. doi:10.1007/s40010-018-0488-4.
- “Build software better, together”, GitHub. Disponible en https://github.com/topics/fractional-calculus (accessed
- March 7 2024).