Repository: scipy/scipy
File: scipy/special/_special_ufuncs_docs.cpp (C++)

Code before:
    Ai, Aip, Bi, Bip : 4-tuple of scalar or ndarray
        Airy functions Ai and Bi, and their derivatives Aip and Bip.

    See Also
    --------
    airye : exponentially scaled Airy functions.

    Notes
    -----
    The Airy functions :math:`\operatorname{Ai}` and :math:`\operatorname{Bi}` are two 
    independent solutions of

    .. math:: y''(x) = x y(x).

    For real :math:`z` in :math:`[-10, 10]`, the computation is carried out by calling
    the Cephes [1]_ `airy` routine, which uses power series summation
    for small :math:`z` and rational minimax approximations for large :math:`z`.

    Outside this range, the AMOS [2]_ `zairy` and `zbiry` routines are
    employed.  They are computed using power series for :math:`|z| < 1` and
    the following relations to modified Bessel functions for larger :math:`z`
    (where :math:`t \equiv 2 z^{3/2}/3`):

    .. math::

        \operatorname{Ai}(z) = \frac{1}{\pi}\sqrt{\frac{z}{3}} \, K_{1/3}(t)
        
        \operatorname{Ai}'(z) = -\frac{z}{\pi \sqrt{3}} \, K_{2/3}(t)
        
        \operatorname{Bi}(z) = \sqrt{\frac{z}{3}} \left(I_{-1/3}(t) + I_{1/3}(t)\right)
        
        \operatorname{Bi}'(z) = \frac{z}{\sqrt{3}} \left(I_{-2/3}(t) + I_{2/3}(t)\right)

    References
    ----------
    .. [1] Cephes Mathematical Functions Library,
           http://www.netlib.org/cephes/
    .. [2] Donald E. Amos, "AMOS, A Portable Package for Bessel Functions
           of a Complex Argument and Nonnegative Order",
           http://netlib.org/amos/

    Examples
    --------
    Compute the Airy functions on the interval [-15, 5].

    >>> import numpy as np
    >>> from scipy import special
    >>> x = np.linspace(-15, 5, 201)
    >>> ai, aip, bi, bip = special.airy(x)

    Plot Ai(x) and Bi(x).

Review comment (suggestion):
I looked at the rendered version of the docs and this does indeed better match equation 6 from https://mathworld.wolfram.com/AiryFunctions.html (they are now identical if you swap z for x).

This is way outside my wheelhouse though, so let's let a `special` regular confirm.

Code after:
    Ai, Aip, Bi, Bip : 4-tuple of scalar or ndarray
        Airy functions Ai and Bi, and their derivatives Aip and Bip.

    See Also
    --------
    airye : exponentially scaled Airy functions.

    Notes
    -----
    The Airy functions :math:`\operatorname{Ai}` and :math:`\operatorname{Bi}` are two 
    independent solutions of

    .. math:: y''(z) = z y(z).

    For real :math:`z` in :math:`[-10, 10]`, the computation is carried out by calling
    the Cephes [1]_ `airy` routine, which uses power series summation
    for small :math:`z` and rational minimax approximations for large :math:`z`.

    Outside this range, the AMOS [2]_ `zairy` and `zbiry` routines are
    employed.  They are computed using power series for :math:`|z| < 1` and
    the following relations to modified Bessel functions for larger :math:`z`
    (where :math:`t \equiv 2 z^{3/2}/3`):

    .. math::

        \operatorname{Ai}(z) = \frac{1}{\pi}\sqrt{\frac{z}{3}} \, K_{1/3}(t)
        
        \operatorname{Ai}'(z) = -\frac{z}{\pi \sqrt{3}} \, K_{2/3}(t)
        
        \operatorname{Bi}(z) = \sqrt{\frac{z}{3}} \left(I_{-1/3}(t) + I_{1/3}(t)\right)
        
        \operatorname{Bi}'(z) = \frac{z}{\sqrt{3}} \left(I_{-2/3}(t) + I_{2/3}(t)\right)

    References
    ----------
    .. [1] Cephes Mathematical Functions Library,
           http://www.netlib.org/cephes/
    .. [2] Donald E. Amos, "AMOS, A Portable Package for Bessel Functions
           of a Complex Argument and Nonnegative Order",
           http://netlib.org/amos/

    Examples
    --------
    Compute the Airy functions on the interval :math:`[-15, 5]`.

    >>> import numpy as np
    >>> from scipy import special
    >>> x = np.linspace(-15, 5, 201)
    >>> ai, aip, bi, bip = special.airy(x)

    Plot :math:`\operatorname{Ai}(x)` and :math:`\operatorname{Bi}(x)`.