Skip to content

polykin.math¤

i2erfc ¤

i2erfc(x: float) -> float

Integral of the integral of the complementary error function.

\[ \mathrm{i^2erfc}(x) = \int_x^{\infty}\mathrm{ierfc}(\xi)d\xi \]
PARAMETER DESCRIPTION
x

Argument.

TYPE: float

RETURNS DESCRIPTION
float

Value of the integral.

Examples:

>>> i2erfc(0.5)
0.06996472345317695
Source code in src/polykin/math/special.py
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
def i2erfc(x: float) -> float:
    r"""Integral of the integral of the complementary error function.

    $$ \mathrm{i^2erfc}(x) = \int_x^{\infty}\mathrm{ierfc}(\xi)d\xi $$

    Parameters
    ----------
    x : float
        Argument.

    Returns
    -------
    float
        Value of the integral.

    Examples
    --------
    >>> i2erfc(0.5)
    0.06996472345317695
    """
    if x > 30.:
        return 0.
    else:
        return (erfc(x) - 2*x*ierfc(x))/4