Eviatar Bach  About

Status of special functions in Sage


Sorry for not posting status updates in a while, but much of what I've been working on would not be interesting to a general audience of Sage users.

The Digital Library of Mathematical Functions has a Software Index, which lists the software that implement certain mathematical function. For Sage, that list is extremely out of date. Despite having sent an email to the DLMF with updates (the editor has confirmed that the table will be updated in the next release of the DLMF), I still think it's valuable to give a more detailed outline of the status of special functions in Sage so that gaps can be filled (especially the blue and violet entries, which have patches available!). Sorry about the excessive colour; I wanted to make it easy to discern the categories.

Green: Available in Sage
Blue: Patch implementing it is available
Yellow: Partially available
Violet: Available, and patch with improvements exists
Orange: Implemented in mpmath but not in Sage
Pink: Not available in mpmath nor Sage
4 Elementary Functions
5 Gamma Function
§5.24(ii) \(\mathop{\Gamma}\nolimits\!\left(x\right), x\in\mathbb{R}\)
§5.24(iii) \(\mathop{\psi}\nolimits\!\left(x\right), \mathop{\psi^{(n)}}\nolimits\!\left(x\right), x\in\mathbb{R}\)
§5.24(iv) \(\mathop{\Gamma}\nolimits\!\left(z\right), \mathop{\psi}\nolimits\!\left(z\right), \mathop{\psi^{(n)}}\nolimits\!\left(z\right), z\in\mathbb{C}\)
§5.24(v) \(\mathop{\mathrm{B}}\nolimits\!\left(a,b\right), a,b\in\mathbb{R}\)
§5.24(vi) \(\mathop{\mathrm{B}}\nolimits\!\left(a,b\right), a,b\in\mathbb{C}\) 12521 would fix this, but a better solution (both for speed and precision) would be to use mpmath.
6 Exponential, Logarithmic, Sine, and Cosine Integrals
7 Error Functions, Dawson’s and Fresnel Integrals
§7.25(ii) \(\mathop{\mathrm{erf}}\nolimits x, \mathop{\mathrm{erfc}}\nolimits x, \mathop{\mathrm{i}^{n}\mathrm{erfc}}\nolimits\!\left(x\right), x\in\mathbb{R}\)
§7.25(iii) \(\mathop{\mathrm{erf}}\nolimits z, \mathop{\mathrm{erfc}}\nolimits z, z\in\mathbb{C}\) \(\mathrm{erfc}\) is not yet implemented for complex numbers.
§7.25(iv) \(\mathop{C}\nolimits\!\left(x\right), \mathop{S}\nolimits\!\left(x\right), \mathop{\mathrm{f}}\nolimits\!\left(x\right), \mathop{\mathrm{g}}\nolimits\!\left(x\right), x\in\mathbb{R}\)
§7.25(v) \(\mathop{C}\nolimits\!\left(z\right), \mathop{S}\nolimits\!\left(z\right), z\in\mathbb{C}\)
§7.25(vi) \(\mathop{\mathcal{F}}\nolimits\!\left(x\right), \mathop{G}\nolimits\!\left(x\right), \mathop{\mathsf{U}}\nolimits\!\left(x,t\right), \mathop{\mathsf{V}}\nolimits\!\left(x,t\right), x\in\mathbb{R}\)
§7.25(vii) \(\mathop{\mathcal{F}}\nolimits\!\left(z\right), \mathop{G}\nolimits\!\left(z\right), z\in\mathbb{C}\)
8 Incomplete Gamma and Related Functions
§8.28(ii) Incomplete Gamma Functions for Real Argument and Parameter
§8.28(iii) Incomplete Gamma Functions for Complex Argument and Parameter
§8.28(v) Incomplete Beta Functions for Complex Argument and Parameters
§8.28(vi) Generalized Exponential Integral for Real Argument and Integer Parameter
§8.28(vii) Generalized Exponential Integral for Complex Argument and Parameter
9 Airy and Related Functions
§9.20(ii) \(\mathop{\mathrm{Ai}}\nolimits\!\left(x\right), {\mathop{\mathrm{Ai}}\nolimits^{\prime}}\!\left(x\right), \mathop{\mathrm{Bi}}\nolimits\!\left(x\right), {\mathop{\mathrm{Bi}}\nolimits^{\prime}}\!\left(x\right),  x\in\mathbb{R}\)
§9.20(iii) \(\mathop{\mathrm{Ai}}\nolimits\!\left(z\right), {\mathop{\mathrm{Ai}}\nolimits^{\prime}}\!\left(z\right), \mathop{\mathrm{Bi}}\nolimits\!\left(z\right), {\mathop{\mathrm{Bi}}\nolimits^{\prime}}\!\left(z\right),  z\in\mathbb{C}\) See 12455
§9.20(iv) Real and Complex Zeros
§9.20(v) Integrals of \(\mathop{\mathrm{Ai}}\nolimits\!\left(x\right), \mathop{\mathrm{Bi}}\nolimits\!\left(x\right), x\in\mathbb{R}\) See 12455
§9.20(vi) Scorer Functions
10 Bessel Functions
§10.77(ii) Bessel Functions–Real Argument and Integer or Half-Integer Order (including Spherical Bessel Functions)
§10.77(iii) Bessel Functions–Real Order and Argument
§10.77(iv) Bessel Functions–Integer or Half-Integer Order and Complex Arguments, including Kelvin Functions Kelvin functions are not implemented. They are in mpmath however.
§10.77(v) Bessel Functions–Real Order and Complex Argument (including Hankel Functions) See 15024
§10.77(viii) Bessel Functions–Complex Order and Argument
§10.77(ix) Integrals of Bessel Functions
§10.77(x) Zeros of Bessel Functions
11 Struve and Related Functions
§11.16(ii) Struve Functions
§11.16(iii) Integrals of Struve Functions
§11.16(iv) Lommel Functions
§11.16(v) Anger and Weber Functions
§11.16(vi) Integrals of Anger and Weber Functions
12 Parabolic Cylinder Functions
13 Confluent Hypergeometric Functions
§13.32(ii) Real Argument and Parameters See 14896
§13.32(iii)Complex Argument and/or Parameters See 14896
14 Legendre and Related Functions
§14.34(ii)Legendre Functions: Real Argument and Parameters
§14.34(iii)Legendre Functions: Complex Argument and/or Parameters
§14.34(iii)Legendre Functions: Complex Argument and/or Parameters
15 Hypergeometric Function
§15.20(ii) Real Parameters and Argument See 2516
§15.20(iii) Complex Parameters and Argument See 2516
16 Generalized Hypergeometric Functions and Meijer G-Function
§16.27(ii) Real Argument and Parameters See 2516
§16.27(iii) Complex Argument and/or Parameters See 2516
18 Orthogonal Polynomials
19 Elliptic Integrals
§19.39(ii) Legendre’s and Bulirsch’s Complete Integrals See 15046
§19.39(iii) Legendre’s and Bulirsch’s Incomplete Integrals See 15046
§19.39(iv) Symmetric Integrals
20 Theta Functions
21 Multidimensional Theta Functions
22 Jacobian Elliptic Functions See 14996
23 Weierstrass Elliptic and Modular Functions
24 Bernoulli and Euler Polynomials Euler polynomials are not implemented.
25 Zeta and Related Functions
§25.21(ii) Zeta Functions for Real Arguments
§25.21(iii) Zeta Functions for Complex Arguments
§25.21(iv) Hurwitz Zeta Function See 15095
§25.21(v) Dilogarithms, Polylogarithms
§25.21(vi) Clausen’s Integral
§25.21(vii) Fermi–Dirac and Bose–Einstein Integrals
§25.21(viii) Lerch’s Transcendent
§25.21(ix) Dirichlet L-series
26 Combinatorial Analysis
27 Functions of Number Theory
28 Mathieu Functions and Hill’s Equation
30 Spheroidal Wave Functions
33 Coulomb Functions
34 3j,6j,9j Symbols
35 Functions of Matrix Argument