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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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