Skip to Main Content Skip to Search
Product Documentation

erfc - Complementary error function

Syntax

erfc(x)
erfc(A)

Description

erfc(x) computes the complementary error function of x.

erfc(A) computes the complementary error function of each element of A.

Tips

Input Arguments

x

Symbolic number, variable, or expression.

A

Vector or matrix of symbolic numbers, variables, or expressions.

Definitions

Complementary Error Function

The following integral defines the complementary error function:

Here erf(x) is the error function.

Examples

Compute the complementary error function for these numbers. Because these numbers are not symbolic objects, you get the floating-point results:

[erfc(1/2), erfc(1.41), erfc(sqrt(2))]
ans =
    0.4795    0.0461    0.0455
 

Compute the complementary error function for the numbers converted to symbolic objects. For most symbolic (exact) numbers, erfc returns unresolved symbolic calls:

[erfc(sym(1/2)), erfc(sym(1.41))]
ans =
[ erfc(1/2), erfc(141/100)]
 

Compute the complementary error function for x = 0, x = ∞, and x = –∞. The complementary error function has special values for these parameters:

[erfc(0), erfc(inf), erfc(-inf)]
ans =
     1     0     2

Compute the complementary error function for complex infinities. Use sym to convert complex infinities to symbolic objects:

[erfc(sym(i*inf)), erfc(sym(-i*inf))]
[ 1 - Inf*i, Inf*i + 1]
 

Compute the complementary error function for x and sin(x) + x*exp(x). For most symbolic variables and expressions, erfc returns unresolved symbolic calls:

syms x
f = sin(x) + x*exp(x);
erfc(x)
erfc(f)
ans =
erfc(x)
 
ans =
erfc(sin(x) + x*exp(x))

Now compute the derivatives of these expressions:

diff(erfc(x), x, 2)
diff(erfc(f), x)
ans =
(4*x*exp(-x^2))/pi^(1/2)
 
ans =
-(2*exp(-(sin(x) + x*exp(x))^2)*(cos(x) + exp(x) + x*exp(x)))/pi^(1/2)
 

Compute the complementary error function for elements of matrix M and vector V:

M = sym([0 inf; 1/3 -inf]);
V = sym([1; -i*inf]);
erfc(M)
erfc(V)
ans =
[         1, 0]
[ erfc(1/3), 2]
 
ans =
   erfc(1)
 Inf*i + 1

Algorithms

The toolbox can simplify expressions that contain error functions and their inverses. For real values x, the toolbox applies these simplification rules:

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

References

Gautschi, W. "Error Function and Fresnel Integrals." Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables. (M. Abramowitz and I. A. Stegun, eds.). New York: Dover, 1972.

See Also

erf | erfcinv | erfinv

How To

  


Free Symbolic Math Interactive Kit

See how symbolic computations can help you find analytical solutions to math and engineering problems.

Get free kit

Trials Available

Try the latest version of symbolic math products.

Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS