<<

R. I. Badran The Error Mathematical Physics

The and Stirling’s Formula

The Error Function:

x 2 The curve of the y  e is called the bell-shaped graph. The error function is defined as the area under part of this curve:

x 2 2 erf (x)  et dt 1.  .  0 There are other definitions of error functions. These are closely related to the above one.

2. a) The normal or Gaussian distribution function.

x t2 1  1 1 x P(, x)  e 2 dt   erf ( )  2  2 2 2

Proof: Put t  2u and proceed, you might reach a step of

x 1 2 P(0, x)  eu du P(,x)  P(,0)  P(0,x) , where   0 1 x P(0, x)  erf ( ) Here you can prove that 2 2 . This can be done by using the definition of error function in (1). 0 u2 I I  e du Now you need to find P(,0)  where  . To find   this you have to put u=x first, then u= y and multiply the two resulting integrals. Make the change of variables to polar coordinate you get R. I. Badran The Error Function Mathematical Physics

 0 2 2 I 2  er rdr d    0 From this latter integral you get  1 I  P(,0)  2 and  2 . 1 1 x  P(, x)   erf ( ) 2 2 2 Q. E. D.

x 2 t 1 2 1 x 2.b P(0, x)  e dt  erf ( ) 2 0 2 2 (as proved earlier in 2.a).

3. a) The complementary error function

 2 2 erfc(x)  et dt 1 erf (x)   x

Proof: Put t2= u and use the definition (1) of error function and the definition of (1/2).

 2 x 2 t erfc( )  e 2 dt 3. b)  2  x

Proof: (This will be left as an exercise for the students).

4. erf (x)  2P(0, x 2)  2P(, x 2) 1

Proof: (The student may take this as another exercise).

R. I. Badran The Error Function Mathematical Physics

Some useful properties of error function:

1. erf (x)  erf (x) This that the error function is an odd function. [solve problem 3 in section 9 chapter 11] 2. erf ()  1. [This can be shown by putting the x equals  and using the definition of (1/2)]. 2 x3 x5 erf (x)  (x   ...... ) 3.  3 5.2! when x1

Stirling’s Formula:

This is an approximated formula for the factorial or that can be used to simplify formulas involving factorials.

n n n!~ n e 2n

OR p  p ( p 1) ~ p e 2p The sign ~, here, means asymptotic to.

Derivation of Stirling's formula:

 ( p 1)  p! x pexdx Starting with  and rewrite the 0 integral as R. I. Badran The Error Function Mathematical Physics

 ( p 1)  p! e pnxx dx  . 0

Change the variable x  p  y p . The limits are y   p for x0 and y for x.  pn( p y p) p y p ( p 1)  p! e pdy  p

Firstly we can write y y n( p  y p)  n[ p(1  )]  np  n(1  ) p p

For large p, the second on the right hand side of the last equation can be expanded as follows: y y y 2 n(1  )        p p 2p

[Hint: The binomial expansion used is: x 2 x3 x 4 n(1  x)  x         for 1 x 1]. 2 3 4

By substituting the expanded logarithm into the last integral, then we get: py py 2  pnp(  ) p y p p 2 p ( p 1)  p!~ e pdy  p

y 2   pnp p 2 ( p 1)  p!~ pe e dy  p The integral and its cofactor can be rewritten as:

R. I. Badran The Error Function Mathematical Physics

2 2 y  p y    p  p 2 2 ( p 1)  p!~ p p e [ e dy   e dy] .  

y2   Exercise: Show that  e 2 dy  2 

Using the last result mentioned above we get:

2  p y  p  p p  p 2 ( p 1)  p!~ 2p p e  p p e  e dy  The integral in the last term tends to zero as p - 

p  p ( p 1)  p!~ p e 2p Q.E.D (This Stirling's formula is a good approximation for large p)

Note: When higher terms in the previous expansion of y y y 2 n(1  )        are considered, a better p p 2p for the Gamma or factorial function can be obtained. i.e.

1 1 ( p 1)  p!~ p pe p 2p(1   ) 12 p 288p2

(The student can try to prove that at home).