erf

本文深入探讨了误差函数Erf的定义、性质及其在数学分析中的应用。Erf作为正态分布积分的一种规范化形式,是一种在整个复平面上都有定义的全纯函数。文章详细介绍了Erf的级数展开、渐近级数、积分表示以及它与其他特殊函数的关系。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

=============
float erf( float x )
{
    float ax = abs(x);
    float d = 1.0 + 0.278393*ax + 0.230389*ax*ax + 0.000972*ax*ax*ax + 0.078108*ax*ax*ax*ax;
    return sign(x)*(1.0 - 1.0/(d*d*d*d));

    return 1 - 2 / ( 1 + exp2( 3.35 * x ) );
    //return 1 - 2 / ( 1 + exp2( 3.35 * x ) ) + 0.07219 * x * (15.41819 * Square(x*x) - 1) * exp2( -5.609846 * abs(x) );
}

G:\File\opensource\UnrealEngine-4.0\UnrealEngine-git\Engine\Shaders\Private\RectLight.ush

===========
Erf
http://mathworld.wolfram.com/Erf.html

Calculus and Analysis > Special Functions > Erf >

Calculus and Analysis > Complex Analysis > Entire Functions >

Interactive Entries > webMathematica Examples >

More...

 

Erf

DOWNLOAD Mathematica Notebook EXPLORE THIS TOPIC IN the MathWorld Classroom 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)

ErfReImAbs
 
 
 Min Max  
 Re    
 Im    
Powered by webMathematica 

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)) &#xA; +(e^(-asqrt(p)))/2erf(a/(2sqrt(y))-sqrt(py))+(e^(asqrt(p)))/2erf(a/(2sqrt(y))+sqrt(py)) &#xA;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)

SEE ALSO: Dawson's Integral, Erfc, Erfi, Fresnel Integrals, Gaussian Function, Gaussian Integral, Inverse Erf, Normal Distribution Function, Probability Integral

RELATED WOLFRAM SITES: http://functions.wolfram.com/GammaBetaErf/Erf/, http://functions.wolfram.com/GammaBetaErf/Erf2/

REFERENCES:

Abramowitz, M. and Stegun, I. A. (Eds.). "Error Function and Fresnel Integrals." Ch. 7 in Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables, 9th printing. New York: Dover, pp. 297-309, 1972.

Acton, F. S. Numerical Methods That Work, 2nd printing. Washington, DC: Math. Assoc. Amer., p. 16, 1990.

Arfken, G. Mathematical Methods for Physicists, 3rd ed. Orlando, FL: Academic Press, pp. 568-569, 1985.

Hardy, G. H. Ramanujan: Twelve Lectures on Subjects Suggested by His Life and Work, 3rd ed. New York: Chelsea, 1999.

Havil, J. Gamma: Exploring Euler's Constant. Princeton, NJ: Princeton University Press, p. 105, 2003.

Olds, C. D. Continued Fractions. New York: Random House, 1963.

Prudnikov, A. P.; Brychkov, Yu. A.; and Marichev, O. I. Integrals and Series, Vol. 2: Special Functions. New York: Gordon and Breach, 1990.

Sloane, N. J. A. Sequences A000079/M1129, A001147/M3002, A007680/M2861, A103979, A103980 in "The On-Line Encyclopedia of Integer Sequences."

Spanier, J. and Oldham, K. B. "The Error Function erf(x) and Its Complement erfc(x)." Ch. 40 in An Atlas of Functions. Washington, DC: Hemisphere, pp. 385-393, 1987.

Wall, H. S. Analytic Theory of Continued Fractions. New York: Chelsea, 1948.

Watson, G. N. "Theorems Stated by Ramanujan (IV): Theorems on Approximate Integration and Summation of Series." J. London Math. Soc. 3, 282-289, 1928.

Whittaker, E. T. and Robinson, G. "The Error Function." §92 in The Calculus of Observations: A Treatise on Numerical Mathematics, 4th ed. New York: Dover, pp. 179-182, 1967.

Whittaker, E. T. and Watson, G. N. A Course in Modern Analysis, 4th ed. Cambridge, England: Cambridge University Press, 1990.

Referenced on Wolfram|Alpha: Erf CITE THIS AS:

Weisstein, Eric W. "Erf." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/Erf.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值