Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

erfi

Imaginary error function

MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

Syntax

erfi(x)

Description

erfi(x)=ierf(ix)=2π0xet2dt computes the imaginary error function.

This function is defined for all complex arguments x. For floating-point arguments, erfi returns floating-point results.

The implemented exact values are: erfi(0) = 0, erfi(∞) = ∞, erfi(-∞) = -∞, erfi(i∞) = i, and erfi(-i∞) = -i. For all other arguments, the error function returns symbolic function calls.

For the function call erfi(x) = -i*erf(i*x) = i*(erfc(i*x) - 1) with floating-point arguments of large absolute value, internal numerical underflow or overflow can happen. If a call to erfc causes underflow or overflow, this function returns:

  • The result truncated to 0.0 if x is a large positive real number

  • The result rounded to 2.0 if x is a large negative real number

  • RD_NAN if x is a large complex number and MuPAD® cannot approximate the function value

The imaginary error function erfi(x) = i*(erfc(i*x) - 1) returns corresponding values for large arguments. See Example 2.

MuPAD can simplify expressions that contain error functions and their inverses. For real values x, the system applies the following simplification rules:

  • inverf(erf(x)) = inverf(1 - erfc(x)) = inverfc(1 - erf(x)) = inverfc(erfc(x)) = x

  • inverf(-erf(x)) = inverf(erfc(x) - 1) = inverfc(1 + erf(x)) = inverfc(2 - erfc(x)) = -x

For any value x, the system applies the following simplification rules:

  • inverf(-x) = -inverf(x)

  • inverfc(2 - x) = -inverfc(x)

  • erf(inverf(x)) = erfc(inverfc(x)) = x

  • erf(inverfc(x)) = erfc(inverf(x)) = 1 - x

Environment Interactions

When called with a floating-point argument, the functions are sensitive to the environment variable DIGITS, which determines the numerical working precision.

Examples

Example 1

You can call the imaginary error function with exact and symbolic arguments:

erfi(0), erfi(x + 1), erfi(-infinity), erfi(3/2), erfi(sqrt(2))

To approximate exact results with floating-point numbers, use float:

float(erfi(3/2)), float(erfi(sqrt(2)))

Alternatively, use floating-points value as arguments:

erfi(0.2), erfi(2.0 + 3.5*I), erfi(5.5 + 1.0*I)

Example 2

For large complex arguments, the imaginary error function can return :

erfi(38000.0 + 3801.0*I)

Example 3

diff, float, limit, expand, rewrite, and series handle expressions involving the error functions:

diff(erfi(x), x, x, x)

float(ln(3 + erfi(sqrt(PI)*I)))

limit(x/(1 + x)*erfi(I*x)*I, x = infinity)

rewrite(erfi(x), erfc)

series(erfi(x), x = I*infinity, 3)

Return Values

Arithmetical expression

Algorithms

erf, erfc, and erfi are entire functions.

Was this topic helpful?