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.

The Airy functions Ai and Bi

The Airy functions Ai and Bi

Bessel functions#

Bessel functions of the first and second kind.

Bessel functions of the first and second kind

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

Gauss's arithmetic-geometric mean and the elliptic integral K

Jacobi elliptic functions and the pendulum

Jacobi elliptic functions and the pendulum

Error function and Fresnel integrals#

Gaussian integrals along the real axis and along the diagonal of the complex plane.

Fresnel integrals and the Cornu spiral

Fresnel integrals and the Cornu spiral

The error function and the normal distribution

The error function and the normal distribution

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

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.

The gamma function extends the factorial

The gamma function extends the factorial

Stirling’s formula and its asymptotic series

Stirling's formula and its asymptotic series

Hypergeometric functions#

Gauss’s hypergeometric function and Kummer’s confluent hypergeometric function.

Gauss’s hypergeometric function contains the elementary functions

Gauss's hypergeometric function contains the elementary functions

Kummer’s confluent hypergeometric function

Kummer's confluent hypergeometric function

Lambert W function#

The inverse of w e^w and its two real branches.

The two real branches of the Lambert W function

The two real branches of the Lambert W function

Mathieu functions#

Periodic solutions of Mathieu’s equation and their characteristic values.

Mathieu functions and their characteristic values

Mathieu functions 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.

Legendre and Chebyshev polynomials on [-1, 1]

Legendre and Chebyshev polynomials on [-1, 1]

Hermite and Laguerre polynomials on infinite domains

Hermite and Laguerre polynomials on infinite domains

Riemann zeta function#

The zeta function, its analytic continuation, and Euler’s product over primes.

The Riemann zeta function and Euler’s product

The Riemann zeta function and Euler's product

Gallery generated by Sphinx-Gallery