Examples#
This gallery walks through every public feature of mathematicskit.special_functions:
the gamma/beta functions and Stirling’s series, Bessel, Airy, and
Mathieu functions, elliptic functions, hypergeometric functions, the
error function and Fresnel integrals, the Riemann zeta function, the
Lambert W function, orthogonal polynomial families, and the discrete
Fourier transform (naive DFT vs. hand-rolled radix-2 FFT vs.
numpy.fft).
Each script in this gallery is self-contained and can be run directly with
python examples/special_functions/<section>/<script>.py.
Sections#
gamma_beta – the gamma and beta functions, and Stirling’s approximation.
lambert_w – the Lambert W function and its two real branches.
elliptic – elliptic integrals, the arithmetic-geometric mean, and Jacobi elliptic functions.
hypergeometric – Gauss’s and Kummer’s hypergeometric functions.
error_functions – the error function and the Fresnel integrals.
bessel – Bessel functions of the first and second kind.
airy – the Airy functions Ai and Bi.
zeta – the Riemann zeta function and Euler’s product.
mathieu – Mathieu functions and their characteristic values.
orthogonal_polynomials – Legendre, Chebyshev, Hermite, and Laguerre polynomials, with numerically verified orthogonality.
fourier_transform – naive DFT vs. radix-2 FFT vs.
numpy.fft.
Airy functions#
Solutions of y'' = xy, oscillating on one side and exponential on the other.
Bessel functions#
Bessel functions of the first and second kind.
Elliptic functions#
Elliptic integrals, the arithmetic-geometric mean, and Jacobi elliptic functions.
Gauss’s arithmetic-geometric mean and the elliptic integral K
Error function and Fresnel integrals#
Gaussian integrals along the real axis and along the diagonal of the complex plane.
Discrete Fourier transform#
Naive DFT vs. hand-rolled radix-2 FFT vs. numpy.fft.
O(n^2) vs. O(n log n): naive DFT vs. radix-2 FFT vs. numpy.fft
Gamma and beta functions#
The gamma and beta functions, and Stirling’s approximation.
Hypergeometric functions#
Gauss’s hypergeometric function and Kummer’s confluent hypergeometric function.
Gauss’s hypergeometric function contains the elementary functions
Lambert W function#
The inverse of w e^w and its two real branches.
Mathieu functions#
Periodic solutions of Mathieu’s equation and their characteristic values.
Orthogonal polynomials#
Legendre and Chebyshev polynomials on [-1, 1], and Hermite and Laguerre polynomials on infinite domains, with numerically verified orthogonality.
Hermite and Laguerre polynomials on infinite domains
Riemann zeta function#
The zeta function, its analytic continuation, and Euler’s product over primes.