Erf -- From Wolfram MathWorld

Erf

erf(z) is the "error function" encountered in integrating the normal distribution (which is a normalized form of the Gaussian function). It is an entire function defined by

 erf(z)=2/(sqrt(pi))int_0^ze^(-t^2)dt. (1)

Note that some authors (e.g., Whittaker and Watson 1990, p. 341) define erf(z) without the leading factor of 2/sqrt(pi).

Erf is implemented in the Wolfram Language as Erf[z]. A two-argument form giving erf(z_1)-erf(z_0) is also implemented as Erf[z0, z1].

Erf satisfies the identities

erf(z)=1-erfc(z) (2)
=(2z)/(sqrt(pi))_1F_1(1/2;3/2;-z^2) (3)
=(2ze^(-z^2))/(sqrt(pi))_1F_1(1;3/2;z^2), (4)

where erfc(z) is erfc, the complementary error function, and _1F_1(a;b;z) is a confluent hypergeometric function of the first kind. For z>0,

 erf(z)=pi^(-1/2)gamma(1/2,z^2), (5)

where gamma(a,x) is the incomplete gamma function.

Erf can also be defined as a Maclaurin series

erf(z)=2/(sqrt(pi))sum_(n=0)^(infty)((-1)^nz^(2n+1))/(n!(2n+1)) (6)
=2/(sqrt(pi))(z-1/3z^3+1/(10)z^5-1/(42)z^7+1/(216)z^9+...) (7)

(OEIS A007680). Similarly,

 erf^2(z)=4/pi(z^2-2/3z^4+(14)/(45)z^6-4/(35)z^8+(166)/(4725)z^(10)+...) (8)

(OEIS A103979 and A103980).

For x<<1, erf(x) may be computed from

erf(x)=1/(sqrt(pi))e^(-x^2)sum_(n=0)^(infty)((2x)^(2n+1))/((2n+1)!!) (9)
=2/(sqrt(pi))e^(-x^2)[x+(2x^3)/(1·3)+(4x^5)/(1·3·5)+...] (10)

(OEIS A000079 and A001147; Acton 1990).

For x>>1,

erf(x)=2/(sqrt(pi))(int_0^inftye^(-t^2)dt-int_x^inftye^(-t^2)dt) (11)
=1-2/(sqrt(pi))int_x^inftye^(-t^2)dt. (12)

Using integration by parts gives

int_x^inftye^(-t^2)dt=-1/2int_x^infty1/td(e^(-t^2)) (13)
=-1/2[(e^(-t^2))/t]_x^infty-1/2int_x^infty(e^(-t^2)dt)/(t^2) (14)
=(e^(-x^2))/(2x)+1/4int_x^infty1/(t^3)d(e^(-t^2)) (15)
=(e^(-x^2))/(2x)-(e^(-x^2))/(4x^3)-..., (16)

so

 erf(x)=1-(e^(-x^2))/(sqrt(pi)x)(1-1/(2x^2)-...) (17)

and continuing the procedure gives the asymptotic series

erf(x)∼1-(e^(-x^2))/(sqrt(pi))sum_(n=0)^(infty)((-1)^n(2n-1)!!)/(2^n)x^(-(2n+1)) (18)
∼1-(e^(-x^2))/(sqrt(pi))(x^(-1)-1/2x^(-3)+3/4x^(-5)-(15)/8x^(-7) (19)
 +(105)/(16)x^(-9)+...) (20)

(OEIS A001147 and A000079).

Erf has the values

erf(0)=0 (21)
erf(infty)=1. (22)

It is an odd function

 erf(-z)=-erf(z), (23)

and satisfies

 erf(z)+erfc(z)=1. (24)

Erf may be expressed in terms of a confluent hypergeometric function of the first kind M as

erf(z)=(2z)/(sqrt(pi))M(1/2,3/2,-z^2) (25)
=(2z)/(sqrt(pi))e^(-z^2)M(1,3/2,z^2). (26)

Its derivative is

 (d^n)/(dz^n)erf(z)=(-1)^(n-1)2/(sqrt(pi))H_(n-1)(z)e^(-z^2), (27)

where H_n is a Hermite polynomial. The first derivative is

 d/(dz)erf(z)=2/(sqrt(pi))e^(-z^2), (28)

and the integral is

 interf(z)dz=zerf(z)+(e^(-z^2))/(sqrt(pi)). (29)
ErfReIm ErfContours

Erf can also be extended to the complex plane, as illustrated above.

A simple integral involving erf that Wolfram Language cannot do is given by

 int_0^pe^(-x^2)erf(p-x)dx=1/2sqrt(pi)[erf(1/2sqrt(2)p)]^2 (30)

(M. R. D'Orsogna, pers. comm., May 9, 2004). More complicated integrals include

 int_0^infty(e^(-(p+x)y))/(pi(p+x))sin(asqrt(x))dx=-sinh(asqrt(p))   +(e^(-asqrt(p)))/2erf(a/(2sqrt(y))-sqrt(py))+(e^(asqrt(p)))/2erf(a/(2sqrt(y))+sqrt(py))  int_0^infty(sqrt(x)e^(-(p+x)y))/(pi(p+x))cos(asqrt(x))dx=(e^(-[py+a^2/(4y)]))/(sqrt(piy))+sqrt(p)[-cosh(asqrt(p))-(e^(-asqrt(p)))/2erf(a/(2sqrt(y))-sqrt(py))+(e^(asqrt(p)))/2erf(a/(2sqrt(y))+sqrt(py))]  (31)

(M. R. D'Orsogna, pers. comm., Dec. 15, 2005).

Erf has the continued fraction

int_0^xe^(-t^2)dt=1/2sqrt(pi)erf(x) (32)
=1/2sqrt(pi)-(1/2e^(-x^2))/(x+1/(2x+2/(x+3/(2x+4/(x+...))))) (33)

(Wall 1948, p. 357), first stated by Laplace in 1805 and Legendre in 1826 (Olds 1963, p. 139), proved by Jacobi, and rediscovered by Ramanujan (Watson 1928; Hardy 1999, pp. 8-9).

Definite integrals involving erf(x) include Definite integrals involving erf(x) include

int_0^inftye^(-px^2)erf(ax)erf(bx)dx=1/(sqrt(pip))tan^(-1)((ab)/(sqrt(p(a^2+b^2+p)))) (34)
int_0^inftyxe^(-px^2)erf(ax)erf(bx)erf(cx)dx=1/(pip)[a/(sqrt(a^2+p))tan^(-1)((bc)/(sqrt((a^2+b^2+c^2+p)(a^2+p))))+b/(sqrt(b^2+p))tan^(-1)((ac)/(sqrt((a^2+b^2+c^2+p)(b^2+p))))+c/(sqrt(c^2+p))tan^(-1)((ab)/(sqrt((a^2+b^2+c^2+p)(c^2+p))))] (35)
int_0^inftye^(-x)erf(sqrt(x))dx=1/2sqrt(2) (36)
int_0^inftye^(-x)erf^2(sqrt(x))dx=(2sqrt(2)cot^(-1)(sqrt(2)))/pi (37)
int_0^inftye^(-x)erf^3(sqrt(x))dx=(3sqrt(2)cot^(-1)(2sqrt(2)))/pi. (38)

The first two of these appear in Prudnikov et al. (1990, p. 123, eqns. 2.8.19.8 and 2.8.19.11), with R[p]>0, |arg(a)|,|argb|,|argc|<pi/4.

A complex generalization of erf(x) is defined as

w(z)=e^(-z^2)erfc(-iz) (39)
=e^(-z^2)(1+(2i)/(sqrt(pi))int_0^ze^(t^2)dt). (40)

Integral representations valid only in the upper half-plane I[z]>0 are given by

w(z)=i/piint_(-infty)^infty(e^(-t^2))/(z-t)dt (41)
=(2iz)/piint_0^infty(e^(-t^2))/(z^2-t^2)dt. (42)

Từ khóa » Tính Erf