0% found this document useful (0 votes)
21 views93 pages

Special Functions

Uploaded by

SaήjaγKs
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views93 pages

Special Functions

Uploaded by

SaήjaγKs
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 93

Factorial, Gamma and Beta Functions

Reading Problems

Outline
Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

Factorial function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Gamma function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Digamma function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Incomplete Gamma function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Beta function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Incomplete Beta function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

Assigned Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

1
Background
Louis Franois Antoine Arbogast (1759 - 1803) a French mathematician, is generally credited
with being the first to introduce the concept of the factorial as a product of a fixed number
of terms in arithmetic progression. In an effort to generalize the factorial function to non-
integer values, the Gamma function was later presented in its traditional integral form by
Swiss mathematician Leonhard Euler (1707-1783). In fact, the integral form of the Gamma
function is referred to as the second Eulerian integral. Later, because of its great importance,
it was studied by other eminent mathematicians like Adrien-Marie Legendre (1752-1833),
Carl Friedrich Gauss (1777-1855), Cristoph Gudermann (1798-1852), Joseph Liouville (1809-
1882), Karl Weierstrass (1815-1897), Charles Hermite (1822 - 1901), as well as many others.1
The first reported use of the gamma symbol for this function was by Legendre in 1839.2

The first Eulerian integral was introduced by Euler and is typically referred to by its more
common name, the Beta function. The use of the Beta symbol for this function was first
used in 1839 by Jacques P.M. Binet (1786 - 1856).

At the same time as Legendre and Gauss, Cristian Kramp (1760 - 1826) worked on the
generalized factorial function as it applied to non-integers. His work on factorials was in-
dependent to that of Stirling, although Sterling often receives credit for this effort. He did
achieve one “first” in that he was the first to use the notation n! although he seems not to
be remembered today for this widely used mathematical notation3 .

A complete historical perspective of the Gamma function is given in the work of Godefroy4
as well as other associated authors given in the references at the end of this chapter.

1
http://numbers.computation.free.fr/Constants/Miscellaneous/gammaFunction.html
2
Cajori, Vol.2, p. 271
3
Elements d’arithmtique universelle , 1808
4
M. Godefroy, La fonction Gamma; Theorie, Histoire, Bibliographie, Gauthier-Villars, Paris (1901)

2
Definitions
1. Factorial

n! = n(n − 1)(n − 2) . . . 3 · 2 · 1 for all integers, n > 0

2. Gamma
also known as: generalized factorial, Euler’s second integral

The factorial function can be extended to include all real valued arguments
excluding the negative integers as follows:

 ∞
z! = e−t tz dt z = −1, −2, −3, . . .
0

or as the Gamma function:

 ∞
Γ(z) = e−t tz−1 dt = (z − 1)! z = −1, −2, −3, . . .
0

3. Digamma
also known as: psi function, logarithmic derivative of the gamma function

d ln Γ(z) Γ (z)
ψ(z) = = z = −1, −2, −3, . . .
dz Γ(z)

4. Incomplete Gamma
The gamma function can be written in terms of two components as follows:

Γ(z) = γ(z, x) + Γ(z, x)

where the incomplete gamma function, γ(z, x), is given as

3
 x
γ(z, x) = e−t tz−1 dt x>0
0

and its compliment, Γ(z, x), as

 ∞
Γ(z, x) = e−t tz−1 dt x>0
x

5. Beta
also known as: Euler’s first integral

 1
B(y, z) = ty−1 (1 − t)z−1 dt
0

Γ(y) · Γ(z)
=
Γ(y + z)

6. Incomplete Beta
 x
Bx (y, z) = ty−1 (1 − t)z−1 dt 0≤x≤1
0

and the regularized (normalized) form of the incomplete Beta function

Bx (y, z)
Ix (y, z) =
B(y, z)

4
Theory
Factorial Function
The classical case of the integer form of the factorial function, n!, consists of the product of
n and all integers less than n, down to 1, as follows


 n(n − 1)(n − 2) . . . 3 · 2 · 1 n = 1, 2, 3, . . .
n! = (1.1)

1 n=0

where by definition, 0! = 1.

The integer form of the factorial function can be considered as a special case of two widely
used functions for computing factorials of non-integer arguments, namely the Pochham-
mer’s polynomial, given as


 Γ(z + n)

 z(z + 1)(z + 2) . . . (z + n − 1) = n>0

 Γ(z)




(z)n = (z + n − 1)! (1.2)

 =

 (z − 1)!





1 = 0! n=0

and the gamma function (Euler’s integral of the second kind).

Γ(z) = (z − 1)! (1.3)

While it is relatively easy to compute the factorial function for small integers, it is easy to see
how manually computing the factorial of larger numbers can be very tedious. Fortunately
given the recursive nature of the factorial function, it is very well suited to a computer and
can be easily programmed into a function or subroutine. The two most common methods
used to compute the integer form of the factorial are

direct computation: use iteration to produce the product of all of the counting numbers
between n and 1, as in Eq. 1.1

recursive computation: define a function in terms of itself, where values of the factorial
are stored and simply multiplied by the next integer value in the sequence

5
Another form of the factorial function is the double factorial, defined as



 n(n − 2) . . . 5 · 3 · 1 n>0 odd



n!! = n(n − 2) . . . 6 · 4 · 2 n>0 even (1.4)





1 n = −1, 0

The first few values of the double factorial are given as

0!! = 1 5!! = 15
1!! = 1 6!! = 48
2!! = 2 7!! = 105
3!! = 3 8!! = 384
4!! = 8 9!! = 945

While there are several identities linking the factorial function to the double factorial, perhaps
the most convenient is

n! = n!!(n − 1)!! (1.5)

Potential Applications

1. Permutations and Combinations: The combinatory function C(n, k) (n choose k)


allows a concise statement of the Binomial Theorem using symbolic notation and in
turn allows one to determine the number of ways to choose k items from n items,
regardless of order.
The combinatory function provides the binomial coefficients and can be defined as

n!
C(n, k) = (1.6)
k!(n − k)!

It has uses in modeling of noise, the estimation of reliability in complex systems as


well as many other engineering applications.

6
Gamma Function
The factorial function can be extended to include non-integer arguments through the use of
Euler’s second integral given as

 ∞
z! = e−t tz dt (1.7)
0

Equation 1.7 is often referred to as the generalized factorial function.

Through a simple translation of the z− variable we can obtain the familiar gamma function
as follows

 ∞
Γ(z) = e−t tz−1 dt = (z − 1)! (1.8)
0

The gamma function is one of the most widely used special functions encountered in advanced
mathematics because it appears in almost every integral or series representation of other
advanced mathematical functions.

Let’s first establish a direct relationship between the gamma function given in Eq. 1.8 and
the integer form of the factorial function given in Eq. 1.1. Given the gamma function
Γ(z + 1) = z! use integration by parts as follows:

 
u dv = uv − v du

where from Eq. 1.7 we see

u = tz ⇒ du = ztz−1 dt

dv = e−t dt ⇒ v = −e−t

which leads to

 ∞  ∞  ∞
−t −t
Γ(z + 1) = e z
t dt = −e t z
+z e−t tz−1 dt
0 0 0

7
Given the restriction of z > 0 for the integer form of the factorial function, it can be seen
that the first term in the above expression goes to zero since, when

t = 0 ⇒ tn → 0

t = ∞ ⇒ e−t → 0

Therefore

 ∞
Γ(z + 1) = z e−t tz−1 dt = z Γ(z), z>0 (1.9)
0
Γ(z)

When z = 1 ⇒ tz−1 = t0 = 1, and

 ∞

Γ(1) = 0! = e−t dt = −e−t 0
=1
0

and in turn

Γ(2) = 1 Γ(1) = 1 · 1 = 1!

Γ(3) = 2 Γ(2) = 2 · 1 = 2!

Γ(4) = 3 Γ(3) = 3 · 2 = 3!

In general we can write

Γ(n + 1) = n! n = 1, 2, 3, . . . (1.10)

8
The gamma function constitutes an essential extension of the idea of a factorial, since the
argument z is not restricted to positive integer values, but can vary continuously.

From Eq. 1.9, the gamma function can be written as

Γ(z + 1)
Γ(z) =
z

From the above expression it is easy to see that when z = 0, the gamma function approaches
∞ or in other words Γ(0) is undefined.

Given the recursive nature of the gamma function, it is readily apparent that the gamma
function approaches a singularity at each negative integer.

However, for all other values of z, Γ(z) is defined and the use of the recurrence relationship
for factorials, i.e.

Γ(z + 1) = z Γ(z)

effectively removes the restriction that x be positive, which the integral definition of the
factorial requires. Therefore,

Γ(z + 1)
Γ(z) = , z = 0, −1, −2, −3, . . . (1.11)
z

A plot of Γ(z) is shown in Figure 1.1.

Several other definitions of the Γ-function are available that can be attributed to the pio-
neering mathematicians in this area

Gauss

n! nz
Γ(z) = lim , z = 0, −1, −2, −3, . . . (1.12)
n→∞ z(z + 1)(z + 2) . . . (z + n)

Weierstrass

∞ 
 
1 z
=ze γ·z
1+ e−z/n (1.13)
Γ(z) n=1
n

9
15
10
z 5
0
5
10
15
4 2 0 2 4
z

Figure 1.1: Plot of Gamma Function

where γ is the Euler-Mascheroni constant, defined by



n
1
γ = lim − ln(n) = 0.57721 56649 0 . . . (1.14)
n→∞
k=1
k

An excellent approximation of γ is given by the very simple formula

1 √ 
10 − 1 = 0.57721 73 . . .
3
γ=
2

Other forms of the gamma function are obtained through a simple change of variables, as
follows
 ∞
y 2z−1 e−y dy
2
Γ(z) = 2 by letting t = y 2 (1.15)
0
 1  z−1
1
Γ(z) = ln dy by letting e−t = y (1.16)
0 y

10
Relations Satisfied by the Γ-Function

Recurrence Formula

Γ(z + 1) = z Γ(z) (1.17)

Duplication Formula

 
2z−1
1 √
2 Γ(z) Γ z + = π Γ(2z) (1.18)
2

Reflection Formula

π
Γ(z) Γ(1 − z) = (1.19)
sin πz

Some Special Values of the Gamma Function


Using Eq. 1.15 or Eq. 1.19 we have

 ∞ √
e−y dy =
2
Γ(1/2) = (−1/2)! = 2 π (1.20)
 0
I

where the solution to I is obtained from Schaum’s Handbook of Mathematical Functions


(Eq. 18.72).

11
Combining the results of Eq. 1.20 with the recurrence formula, we see


Γ(1/2) = π

1 π
Γ(3/2) = Γ(1/2) =
2 2
√ √
3 3 π 3 π
Γ(5/2) = Γ(3/2) = =
2 2 2 4
..
.
 
1 1 · 3 · 5 · · · (2n − 1) √
Γ n+ = π n = 1, 2, 3, . . .
2 2n

For z > 0, Γ(z) has a single minimum within the range 1 ≤ z ≤ 2 at 1.46163 21450
where Γ(z) = 0.88560 31944. Some selected 10 decimal place values of Γ(z) are found in
Table 1.1.

Table 1.1: 10 Decimal Place Values of Γ(z) for 1 ≤ z ≤ 2

z Γ(z)

1.0 1.00000 00000


1.1 0.95135 07699
1.2 0.91816 87424
1.3 0.89747 06963
1.4 0.88726 38175
1.5 0.88622 69255
1.6 0.89351 53493
1.7 0.90863 87329
1.8 0.93138 37710
1.9 0.96176 58319
2.0 1.00000 00000

For other values of z (z = 0, −1, −2. . . . ), Γ(z) can be computed by means of the
recurrence formula.

12
Approximations

Asymptotic Representation of the Factorial and Gamma Functions

Asymptotic expansions of the factorial and gamma functions have been developed for
z >> 1. The expansion for the factorial function is


z! = Γ(z + 1) = 2πz z z e−z A(z) (1.21)

where
1 1 139 571
A(z) = 1 + + − − + ··· (1.22)
12z 288z 2 51840z 3 2488320z 4

The expansion for the natural logarithm of the gamma function is

 
1 1 1 1 1
ln Γ(z) = z− ln z − z + ln(2π) + − +
2 2 12z 360z 3 1260z 5
1
− + ··· (1.23)
1680z 7

The absolute value of the error is less than the absolute value of the first term neglected.

For large values of z, i.e. as z → ∞, both expansions lead to Stirling’s Formula, given as


z! = 2π z z+1/2 e−z (1.24)

Even though the asymptotic expansions in Eqs. 1.21 and 1.23 were developed for very large
values of z, they give remarkably accurate values of z! and Γ(z) for small values of z. Table
1.2 shows the relative error between the asymptotic expansion and known accurate values
for arguments between 1 ≤ z ≤ 7, where the relative error is defined as

approximate value − accurate value


relative error =
accurate value

13
Table 1.2: Comparison of Approximate value of z! by Eq. 1.21 and Γ(z) by Eq. 1.23 with
the Accurate values of Mathematica 5.0

z! Eq.1.21 Γ(z) Eq.1.23


z error error
z! Mathematica Γ(z) Mathematica

1 0.99949 9469 −5.0 × 10−4 0.99969 2549 −3.1 × 10−4

2 0.99997 8981 −2.1 × 10−5 0.99999 8900 −1.1 × 10−6

3 0.99999 7005 −3.0 × 10−6 0.99999 9965 −3.5 × 10−8

4 0.99999 9267 −7.3 × 10−7 0.99999 9997 −2.8 × 10−9

5 0.99999 9756 −2.4 × 10−7 0.99999 9999 −4.0 × 10−10

6 0.99999 9901 −9.9 × 10−8 0.99999 9999 −7.9 × 10−11

7 0.99999 9954 −4.6 × 10−8 0.99999 9999 −2.0 × 10−11

The asymptotic expansion for Γ(z) converges very quickly to give accurate values for rela-
tively small values of z. The asymptotic expansion for z! converges less quickly and does
not yield 9 decimal place accuracy even when z = 7.

More accurate values of Γ(z) for small z can be obtained by means of the recurrence formula.
For example, if we want Γ(1+z) where 0 ≤ z ≤ 1, then by means of the recurrence formula
we can write

Γ(n + z)
Γ(1 + z) = (1.25)
(1 + z)(2 + z)(3 + z) . . . (n − 1 + z)

where n is an integer greater that 4. For n = 5 and z = 0.3, we have

Γ(5.3)
Γ(1 + 0.3) = = 0.89747 0699
(1.3)(2.3)(3.3)(4.3)

This value can be compared with the 10 decimal place value given previously in Table 1.1.
We observe that the absolute error is approximately 3 × 10−9 . Comparable accuracy can
be obtained by means of the above equation with n = 6 and 0 ≤ z ≤ 1.

14
Polynomial Approximation of Γ(z + 1) within 0 ≤ z ≤ 1

Numerous polynomial approximations which are based upon the use of Chebyshev polyno-
mials and the minimization of the maximum absolute error have been developed for varying
degrees of accuracy. One such approximation developed for 0 ≤ z ≤ 1 due to Hastings8 is

Γ(z + 1) = z!

= 1 + z(a1 + z(a2 + z(a3 + z(a4 + z(a5 +

z(a6 + z(a7 + a8 z))))))) + (z) (1.26)

where

|(z)| ≤ 3 × 10−7

and the coefficients in the polynomial are given as

Table 1.3: Coefficients of Polynomial of Eq. 1.26

a1 = −0.57719 1652 a5 = −0.75670 4078


a2 = 0.98820 5891 a6 = 0.48219 9394
a3 = −0.89705 6937 a7 = −0.19352 7818
a4 = 0.91820 6857 a8 = 0.03586 8343

15
Series Expansion of 1/Γ(z) for |z| ≤ ∞

The function 1/Γ(z) is an entire function defined for all values of z. It can be expressed as
a series expansion according to the relationship

1 

= Ck z k , |z| ≤ ∞ (1.27)
Γ(z) k=1

where the coefficients Ck for 0 ≤ k ≤ 26, accurate to 16 decimal places are tabulated in
Abramowitz and Stegun1 . For 10 decimal place accuracy one can write

1 
19
= Ck z k (1.28)
Γ(z) k=1

where the coefficients are listed below

Table 1.4: Coefficients of Expansion of 1/Γ(z) of Eq. 1.28

k Ck k Ck

1 1.00000 00000 11 0.00012 80502


2 0.57721 56649 12 −0.00002 01348
3 −0.65587 80715 13 −0.00000 12504
4 −0.04200 26350 14 0.00000 11330
5 0.16653 86113 15 −0.00000 02056
6 −0.04219 77345 16 0.00000 00061
7 −0.00962 19715 17 0.00000 00050
8 0.00721 89432 18 −0.00000 00011
9 −0.00116 51675 19 0.00000 00001
10 −0.00021 52416

16
Potential Applications

1. Gamma Distribution: The probability density function can be defined based on the
Gamma function as follows:

1
f (x, α, β) = xα−1 e−x/β
Γ(α)β α

This function is used to determine time based occurrences, such as:

• life length of an electronic component


• remaining life of a component
• waiting time between any two consecutive events
• waiting time to see the next event
• hypothesis tests
• confidence intervals

17
Digamma Function
The digamma function is the regularized (normalized) form of the logarithmic derivative of
the gamma function and is sometimes referred to as the psi function.

d ln Γ(z) Γ (z)
ψ(z) = = (1.29)
dz Γ(z)

The digamma function is shown in Figure 1.2 for a range of arguments between −4 ≤ z ≤ 4.

20

10
Ψz

10

20

4 2 0 2 4
z

Figure 1.2: Plot of the Digamma Function

The ψ-function satisfies relationships which are obtained by taking the logarithmic derivative
of the recurrence, reflection and duplication formulas of the Γ-function. Thus

1
ψ(z + 1) = + ψ(z) (1.30)
z
ψ(1 − z) − ψ(z) = π cot(π z) (1.31)

ψ(z) + ψ(z + 1/2) + 2 ln 2 = 2ψ(2z) (1.32)

These formulas may be used to obtain the following special values of the ψ-function:

ψ(1) = Γ (1) = −γ (1.33)

18
where γ is the Euler-Mascheroni constant defined in Eq. (1.14). Using Eq. (1.30)


n
1
ψ(n + 1) = −γ + n = 1, 2, 3, . . . (1.34)
k=1
k

Substitution of z = 1/2 into Eq. (1.32) gives

ψ(1/2) = −γ − 2 ln 2 = −1.96351 00260 (1.35)

and with Eq. (1.30) we obtain


n
1
ψ(n + 1/2) = −γ − 2 ln 2 + 2 , n = 1, 2, 3, . . . (1.36)
k=1
2k − 1

Integral Representation of ψ(z)

The ψ-function has simple representations in the form of definite integrals involving the
variable z as a parameter. Some of these are listed below.

 1
ψ(z) = −γ + (1 − t)−1 (1 − tz−1 ) dt, z>0 (1.37)
0
 1
ψ(z) = −γ − π cot(π z) + (1 − t)−1 (1 − t−z ) dt, z<1 (1.38)
0
  

e−t e−zt
ψ(z) = − dt, z>0 (1.39)
0 t 1 − e−t
 ∞
dt
ψ(z) = e−t − (1 + t)−z , z>0
0 t
 ∞
dt
= −γ + (1 + t)−1 − (1 + t)−z , z>0 (1.40)
0 t
 ∞  
1 1
ψ(z) = ln z + − e−zt dt, z>0
0 t 1 − e−t
 ∞ 
1 1 1 1
= ln z − − − − e−zt dt, z>0 (1.41)
2z 0 1− e−t t 2

19
Series Representation of ψ(z)

The ψ-function can be represented by means of several series

∞ 
 
1 1
ψ(z) = −γ − − z = −1, −2, −3, . . . (1.42)
k=0
z+k 1+k

1 

1
ψ(x) = −γ − +x z = −1, −2, −3, . . . (1.43)
x k=1
k(z + k)
∞ 
  
1 1
ψ(z) = ln z − − ln 1 + z = −1, −2, −3, . . . (1.44)
k=0
z+k z+k

Asymptotic Expansion of ψ(z) for Large z

The asymptotic expansion of the ψ-function developed for large z is

1 

B2n
ψ(z) = ln z − − z→∞ (1.45)
2z n=1
2nz 2n

where B2n are the Bernoulli numbers

B0 = 1 B6 = 1/42
B2 = 1/6 B8 = −1/30 (1.46)
B4 = −1/30 B10 = 5/66

The expansion can be expressed as

1 1 1 1
ψ(z) = ln z − − + − + ··· z→∞ (1.47)
2z 12z 2 120z 4 252z 6

20
The Incomplete Gamma Function γ(z, x), Γ(z, x)
We can generalize the Euler definition of the gamma function by defining the incomplete
gamma function γ(z, x) and its compliment Γ(z, x) by the following variable limit integrals

 x
γ(z, x) = e−t tz−1 dt z>0 (1.48)
0

and
 ∞
Γ(z, x) = e−t tz−1 dt z>0 (1.49)
x

so that

γ(z, x) + Γ(z, x) = Γ(z) (1.50)

Figure 1.3 shows plots of γ(z, x), Γ(z, x) and Γ(z) all regularized with respect to Γ(z).
We can clearly see that the addition of γ(z, x)/Γ(z) and Γ(z, x)/Γ(z) leads to a value of
unity or Γ(z)/Γ(z) for each value of z.

The choice of employing γ(z, x) or Γ(z, x) is simply a matter of analytical or computational


convenience.

Some special values, integrals and series are listed below for convenience

Special Values of γ(z, x) and Γ(z, x) for “z” Integer (let z = n)

 

n
xk
γ(1 + n, x) = n! 1 − e−x n = 0, 1, 2, . . . (1.51)
k=0
k!



xk
−x
Γ(1 + n, x) = n! e n = 0, 1, 2, . . . (1.52)
k=0
k!
 
(−1)n 
n−1
k!
Γ(−n, x) = Γ(0, x) − e−x (−1)k n = 1, 2, 3 . . . (1.53)
n! k=0
xk+1

21
Γz,xz, z  1, 2, 3, 4 

Γz,xz
0.8
0.6
0.4
0.2

0 2 4 6 8 10
x

z,xz, a  1, 2, 3, 4 

1
z,xz

0.8
0.6
0.4
0.2

0 2 4 6 8 10
x

zz, a  1, 2, 3, 4

1
0.8
xa

0.6
0.4
0.2

0 2 4 6 8 10
x
Figure 1.3: Plot of the Incomplete Gamma Function where
γ(z, x) Γ(z, x) Γ(z)
+ =
Γ(z) Γ(z) Γ(z)

22
Integral Representations of the Incomplete Gamma Functions

 π
z
γ(z, x) = x cosec(π z) ex cos θ cos(zθ + x sin θ) dθ
0

x = 0, z > 0, z = 1, 2, . . . (1.54)

e−x xz ∞
e−t t−z
Γ(z, x) = dt z < 1, x > 0 (1.55)
Γ(1 − z) 0 x+t
 ∞
z −xy
Γ(z, xy) = y e e−ty (t + x)z−1 dt y > 0, x > 0, z > 1 (1.56)
0

Series Representations of the Incomplete Gamma Functions



(−1)n xz+n
γ(z, x) = (1.57)
n=0
n! (z + n)



(−1)n xz+n
Γ(z, x) = Γ(z) − (1.58)
n=0
n! (z + n)



Lz (x)
Γ(z + x) = e−x xz n
x>0 (1.59)
n=0
n+1

where Lzn(x) is the associated Laguerre polynomial.

Functional Representations of the Incomplete Gamma Functions

γ(z + 1, x) = zγ(z, x) − xz e−x (1.60)

Γ(z + 1, x) = zΓ(z, x) + xz e−x (1.61)

Γ(z + n, x) Γ(z, x) 
n−1
xz+k
−x
= + e (1.62)
Γ(z + n) Γ(z) k=0
Γ(z + k + 1)

dγ(z, x) dΓ(z, x)
= − = xz−1 e−x (1.63)
dx dx

23
Asymptotic Expansion of Γ(z, x) for Large x

 
−x
(z − 1) (z − 1)(z − 2)
Γ(z, x) = x z−1
e 1+ + + ··· x→∞ (1.64)
x x2

Continued Fraction Representation of Γ(z, x)

e−x xz
Γ(z, x) = (1.65)
1−z
z+
1
1+
2−z
x+
2
1+
3−z
x+
1 + ...

for x > 0 and |z| < ∞.

Relationships with Other Special Functions

Γ(0, x) = −Ei(−x) (1.66)

Γ(0, ln 1/x) = −i(x) (1.67)


√ √
Γ(1/2, x2 ) = π(1 − erf (x)) = π erfc(x) (1.68)

γ(1/2, x2 ) = π erf (x) (1.69)

γ(z, x) = z −1 xz e−x M(1, 1 + z, x) (1.70)

γ(z, x) = z −1 xz M(z, 1 + z, −x) (1.71)

24
Beta Function B(a, b)
Another definite integral which is related to the Γ-function is the Beta function B(a, b)
which is defined as

 1
B(a, b) = ta−1 (1 − t)b−1 dt, a > 0, b > 0 (1.72)
0

The relationship between the B-function and the Γ-function can be demonstrated easily. By
means of the new variable

t
u=
(1 − t)

Therefore Eq. 1.72 becomes

 ∞
ua−1
B(a, b) = du a > 0, b > 0 (1.73)
0 (1 + u)a+b

Now it can be shown that

 ∞
Γ(z)
e−pt tz−1 dt = (1.74)
0 pz

which is obtained from the definition of the Γ-function with the change of variable s = pt.
Setting p = 1 + u and z = a + b, we get

 ∞
1 1
= e−(1+u)t ta+b−1 dt (1.75)
(1 + u)a+b Γ(a + b) 0

and substituting this result into the Beta function in Eq. 1.73 gives
 ∞  ∞
1 −t
B(a, b) = e t a+b−1
dt e−ut ua−1 du
Γ(a + b) 0 0
 ∞
Γ(a)
= e−t tb−1 dt
Γ(a + b) 0

Γ(a) · Γ(b)
= (1.76)
Γ(a + b)

25
Betay,.5
15

10

By,z 5

5

10
4 2 0 2 4
y

Figure 1.4: Plot of Beta Function

All the properties of the Beta function can be derived from the relationships linking the
Γ-function and the Beta function.

Other forms of the beta function are obtained by changes of variables. Thus

 ∞
ua−1 du u
B(a, b) = by t = (1.77)
0 (1 + u)a+b 1−u
 π/2
B(a, b) = 2 sin2a−1 θ cos2a−1 θ dθ by t = sin2 θ (1.78)
0

Potential Applications

1. Beta Distribution: The Beta distribution is the integrand of the Beta function. It can
be used to estimate the average time of completing selected tasks in time management
problems.

Incomplete Beta Function Bx (a, b)


Just as one can define an incomplete gamma function, so can one define the incomplete beta
function by the variable limit integral

26
 x
Bx (a, b) = ta−1 (1 − t)b−1 dt 0≤x≤1 (1.79)
0

with a > 0 and b > 0 if x = 1. One can also define

Bx (a, b)
Ix (a, b) = (1.80)
B(a, b)

Clearly when x = 1, Bx (a, b) becomes the complete beta function and

I1 (a, b) = 1

The incomplete beta function and Ix (a, b) satisfies the following relationships:

Symmetry

Ix (a, b) = 1 − I1−x (b, a) (1.81)

Recurrence Formulas

Ix (a, b) = xIx (a − 1, b) + (1 − x)Ix (a, b − 1) (1.82)

(a + b − ax)Ix (a, b) = a(1 − x)Ix (a + 1, b − 1) + bIx (a, b + 1) (1.83)

(a + b)Ix (a, b) = aIx (a + 1, b) + bIx (a, b + 1) (1.84)

Relation to the Hypergeometric Function

Bx (a, b) = a−1 xa F(a, 1 − b; a + 1; x) (1.85)

27
Beta.25, y, .5

40
20
0
Bx,y,z 20
40
60
80
4 2 0 2 4
y

Beta.75, y, .5

10

5
Bx,y,z

5

10

4 2 0 2 4
y

Beta1, y, .5
15

10

5
Bx,y,z

5

10
4 2 0 2 4
y
Figure 1.5: Plot of the Incomplete Beta Function

28
Assigned Problems
Problem Set for Gamma and Beta Functions

1. Use the definition of the gamma function with a suitable change of variable to prove
that
 ∞
1
i) e−ax xn dx = n+1 Γ(n + 1) with n > −1, a > 0
0 a
 ∞ √
π
ii) exp(2ax − x ) dx =
2
exp(a2 )
a 2

2. Prove that

 π/2  π/2

n n
π Γ([1 + n]/2)
sin θ dθ = cos θ dθ =
0 0 2 Γ([2 + n]/2)

3. Show that

   
1 1 π
Γ +x Γ −x =
2 2 cos πx

Plot your results over the range −10 ≤ x ≤ 10.

   
1 7
4. Evaluate Γ − and Γ − .
2 2

5. Show that the area enclosed by the axes x = 0, y = 0 and the curve x4 + y 4 = 1 is

  2
1
Γ
4

8 π
Use both the Dirichlet integral and a conventional integration procedure to substantiate
this result.

29
6. Express each of the following integrals in terms of the gamma and beta functions and
simplify when possible.

 1  1/4
1
i) −1 dx
0 x
 b
ii) (b − x)m−1 (x − a)n−1 dx, with b > a, m > 0, n > 0
a
 ∞
dt
iii) √
0 (1 + t) t

Note: Validate your results using various solution procedures where possible.

7. Compute to 5 decimal places

  2
1
Γ
A 1 n
=  
4ab 2n 2
Γ
n

for n = 0.2, 0.4, 0.8, 1.0, 2.0, 4.0, 8.0, 16.0, 32.0, 64.0, 100.0

8. Sketch x3 + y 3 = 8. Derive expressions of the integrals and evaluate them in terms


of Beta functions for the following quantities:

a) the first quadrant area bounded by the curve and two axes
b) the centroid (x, y) of this area
c) the volume generated when the area is revolved about the y−axis
d) the moment of inertia of this volume about its axis

Note: Validate your results using various solution procedures where possible.

9. Starting with

  
1 ∞
e−t dt
Γ = √
2 0 t

and the transformation y 2 = t or x2 = t, show that

30
  2  ∞ ∞
1
Γ =4 exp −(x2 + y 2 ) dx dy
2 0 0

Further prove that the above double integral over the first quadrant when evaluated
using polar coordinates (r, θ) yields

 
1 √
Γ = π
2

31
References
1. Abramowitz, M. and Stegun, I.A., (Eds.), “Gamma (Factorial) Function” and
“Incomplete Gamma Function.” §6.1 and §6.5 in Handbook of Mathematical Functions
and Formulas, Graphs and Mathematical Tables, 9th printing, Dover, New York, 1972,
pp. 255-258 and pp 260-263.
2. Andrews, G.E., Askey, R. and Roy, R., Special Functions, Cambridge University
Press, Cambridge, 1999.
3. Artin, E. The Gamma Function, Holt, Rinehart, and Winston, New York, 1964.
4. Barnew, E.W., “The Theory of the Gamma Function,” Messenger Math., (2), Vol.
29, 1900, pp.64-128..
5. Borwein, J.M. and Zucker, I.J., “Elliptic Integral Evaluation of the Gamma Func-
tion at Rational Values and Small Denominator,” IMA J. Numerical Analysis, Vol.
12, 1992, pp. 519-526.
6. Davis, P.J., “Leonhard Euler’s Integral: Historical profile of the Gamma Function,”
Amer. Math. Monthly, Vol. 66, 1959, pp. 849-869.
7. Erdelyl, A., Magnus, W., Oberhettinger, F. and Tricomi, F.G., “The Gamma
Function,” Ch. 1 in Higher Transcendental Functions, Vol. 1, Krieger, New York,
1981, pp. 1-55.
8. Hastings, C., Approximations for Digital Computers, Princeton University Press,
Princeton, NJ, 1955.
9. Hochstadt, H., Special Functions of Mathematical Physics, Holt, Rinehart and Win-
ston, New York, 1961.
10. Koepf, W.. “The Gamma Function,” Ch. 1 in Hypergeometric Summation: An
Algorithmic Approach to Summation and Special Identities, Vieweg, Braunschweig,
Germany, 1998, pp. 4-10.
11. Krantz, S.C., “The Gamma and Beta Functions,” §13.1 in Handbook of Complex
Analysis, Birkhauser, Boston, MA, 1999, pp. 155-158.
12. Legendre, A.M., Memoires de la classe des sciences mathematiques et physiques de
l’Institut de France, Paris, 1809, p. 477, 485, 490.
13. Magnus, W. and Oberhettinger, F., Formulas and Theorems for the Special Func-
tions of Mathematical Physics, Chelsea, New York, 1949.
14. Saibagki, W., Theory and Applications of the Gamma Function, Iwanami Syoten,
Tokyo, Japan, 1952.
15. Spanier, J. and Oldham, K.B., “The Gamma Function Γ(x)” and “The Incomplete
Gamma γ(ν, x) and Related Functions,” Chs. 43 and 45 in An Atlas of Functions,
Hemisphere, Washington, DC, 1987, pp. 411-421 and pp. 435-443.

32
Error and Complementary Error Functions

Reading Problems

Outline
Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

Gaussian function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Error function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Complementary Error function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

Relations and Selected Values of Error Functions . . . . . . . . . . . . . . . . . . . . . . . . 12

Numerical Computation of Error Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

Rationale Approximations of Error Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

Assigned Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

1
Background
The error function and the complementary error function are important special functions
which appear in the solutions of diffusion problems in heat, mass and momentum transfer,
probability theory, the theory of errors and various branches of mathematical physics. It
is interesting to note that there is a direct connection between the error function and the
Gaussian function and the normalized Gaussian function that we know as the “bell curve”.
The Gaussian function is given as

2 /(2σ 2 )
G(x) = Ae−x

where σ is the standard deviation and A is a constant.

The Gaussian function can be normalized so that the accumulated area under the curve is
unity, i.e. the integral from −∞ to +∞ equals 1. If we note that the definite integral


r
π
Z
−ax2
e dx =
−∞ a

then the normalized Gaussian function takes the form

1 2 /(2σ 2 )
G(x) = √ e−x
2πσ

If we let

2
x2 1
t = and dt = √ dx
2σ 2 2σ

then the normalized Gaussian integrated between −x and +x can be written as

x x
1
Z Z
2
G(x) dx = √ e−t dt
−x π −x

or recognizing that the normalized Gaussian is symmetric about the y−axis, we can write

2
x x  
2 x
Z Z
−t2
G(x) dx = √ e dt = erf x = erf √
−x π 0 2σ

and the complementary error function can be written as


2
Z
2
erfc x = 1 − erf x = √ e−t dt
π x

Historical Perspective

The normal distribution was first introduced by de Moivre in an article in 1733 (reprinted in
the second edition of his Doctrine of Chances, 1738 ) in the context of approximating certain
binomial distributions for large n. His result was extended by Laplace in his book Analytical
Theory of Probabilities (1812 ), and is now called the Theorem of de Moivre-Laplace.

Laplace used the normal distribution in the analysis of errors of experiments. The important
method of least squares was introduced by Legendre in 1805. Gauss, who claimed to have
used the method since 1794, justified it in 1809 by assuming a normal distribution of the
errors.

The name bell curve goes back to Jouffret who used the term bell surface in 1872 for a
bivariate normal with independent components. The name normal distribution was coined
independently by Charles S. Peirce, Francis Galton and Wilhelm Lexis around 1875 [Stigler].
This terminology is unfortunate, since it reflects and encourages the fallacy that “everything
is Gaussian”.

3
Definitions
1. Gaussian Function
The normalized Gaussian curve represents the probability distribution with standard
distribution σ and mean µ relative to the average of a random distribution.

1 2 /(2σ 2 )
G(x) = √ e−(x−µ)
2πσ

This is the curve we typically refer to as the “bell curve” where the mean is zero and
the standard distribution is unity.

2. Error Function
The error function
√ equals twice the integral of a normalized Gaussian function between
0 and x/σ 2.

x
2
Z
2
y = erf x = √ e−t dt for x ≥ 0, y [0, 1]
π 0

where
x
t= √

3. Complementary Error Function


The complementary error function equals one minus the error function


2
Z
2
1 − y = erfc x = 1 − erf x = √ e−t dt for x ≥ 0, y [0, 1]
π x

4. Inverse Error Function


x = inerf y

inerf y exists for y in the range −1 < y < 1 and is an odd function of y with a
Maclaurin expansion of the form

4

X
inverf y = cn y 2n−1
n=1

5. Inverse Complementary Error Function


x = inerfc (1 − y)

5
Theory
Gaussian Function
The Gaussian function or the Gaussian probability distribution is one of the most fundamen-
tal functions. The Gaussian probability distribution with mean µ and standard deviation σ
is a normalized Gaussian function of the form

1 2 /(2σ 2 )
G(x) = √ e−(x−µ) (1.1)
2πσ

where G(x), as shown in the plot below, gives the probability that a variate with a Gaussian
distribution takes on a value in the range [x, x + dx]. Statisticians commonly call this
distribution the normal distribution and, because of its shape, social scientists refer to it as
the “bell curve.” G(x) has been normalized so that the accumulated area under the curve
between −∞ ≤ x ≤ +∞ totals to unity. A cumulative distribution function, which totals
the area under the normalized distribution curve is available and can be plotted as shown
below.
GHxL DHxL

x x
-4 -2 2 4 -4 -2 2 4

Figure 2.1: Plot of Gaussian Function and Cumulative Distribution Function

When the mean is set to zero (µ = 0) and the standard deviation or variance is set to unity
(σ = 1), we get the familiar normal distribution

1 2
G(x) = √ e−x /2 dx (1.2)

which is shown in the curve below. The normal distribution function N (x) gives the prob-
ability that a variate assumes a value in the interval [0, x]

x
1
Z
2 /2
N (x) = √ e−t dt (1.3)
2π 0

6
NHxL
0.4

0.3

0.2

0.1

x
-4 -2 2 4

Figure 2.2: Plot of the Normalized Gaussian Function

Gaussian distributions have many convenient properties, so random variates with unknown
distributions are often assumed to be Gaussian, especially in physics, astronomy and various
aspects of engineering. Many common attributes such as test scores, height, etc., follow
roughly Gaussian distributions, with few members at the high and low ends and many in
the middle.

Computer Algebra Systems

Function Maple Mathematica

Probability Density Function statevalf[pdf,dist](x) PDF[dist, x ]


- frequency of occurrence at x

Cumulative Distribution Function statevalf[cdf,dist](x) CDF[dist, x ]


- integral of probability
density function up to x dist = normald[µ, σ] dist = NormalDistribution[µ, σ]
µ = 0 (mean) µ = 0 (mean)
σ = 1 (std. dev.) σ = 1 (std. dev.)

Potential Applications

1. Statistical Averaging:

7
Error Function
The error function is obtained by integrating the normalized Gaussian distribution.

x
2
Z
2
erf x = √ e−t dt (1.4)
π 0

where the coefficient in front of the integral normalizes erf (∞) = 1. A plot of erf x over
the range −3 ≤ x ≤ 3 is shown as follows.

0.5
erfHxL

-0.5

-1
-3 -2 -1 0 1 2 3
x

Figure 2.3: Plot of the Error Function

The error function is defined for all values of x and is considered an odd function in x since
erf x = −erf (−x).

The error function can be conveniently expressed in terms of other functions and series as
follows:
 
1 1 2
erf x = √ γ ,x (1.5)
π 2
   
2x 1 3 2
2x −x2 3 2
= √ M , , −x = √ e M 1, , x (1.6)
π 2 2 π 2

2 X (−1)n x2n+1
= √ (1.7)
π n=0 n!(2n + 1)

where γ(·) is the incomplete gamma function, M(·) is the confluent hypergeometric function
of the first kind and the series solution is a Maclaurin series.

8
Computer Algebra Systems

Function Maple Mathematica

Error Function erf(x ) Erf[x ]

Complementary Error Function erfc(x ) Erfc[x ]

Inverse Error Function fslove(erf(x )=s) InverseErf[s]

Inverse Complementary fslove(erfc(x )=s) InverseErfc[s]


Error Function
where s is a numerical value and we solve for x

Potential Applications

1. Diffusion: Transient conduction in a semi-infinite solid is governed by the diffusion


equation, given as

∂ 2T 1 ∂T
=
∂x2 α ∂t

where α is thermal diffusivity. The solution to the diffusion equation is a function of


either the erf x or erfc x depending on the boundary condition used. For instance,
for constant surface temperature, where T (0, t) = Ts

T (x, t) − Ts
 
x
= erfc √
Ti − Ts 2 αt

9
complementary Error Function
The complementary error function is defined as

erfc x = 1 − erf x
Z ∞
2 2
= √ e−t dt (1.8)
π x

1.5
erfHxL

0.5

-3 -2 -1 0 1 2 3
x

Figure 2.4: Plot of the complementary Error Function

and similar to the error function, the complementary error function can be written in terms
of the incomplete gamma functions as follows:

 
1 1 2
erfc x = √ Γ ,x (1.9)
π 2

As shown in Figure 2.5, the superposition of the error function and the complementary error
function when the argument is greater than zero produces a constant value of unity.

Potential Applications

1. Diffusion: In a similar manner to the transient conduction problem described for the
error function, the complementary error function is used in the solution of the diffusion
equation when the boundary conditions are constant surface heat flux, where qs = q0

2q0 (αt/π)1/2 −x2


   
q0 x x
T (x, t) − Ti = exp − erfc √
k 4αt k 2 αt

10
1 Erf x + Erfc x
0.8 Erf x

erfHxL
0.6
0.4
0.2 Erfc x

0 0.5 1 1.5 2 2.5 3


x

Figure 2.5: Superposition of the Error and complementary Error Functions

∂T
and surface convection, where −k = h[T∞ − T (0, t)]
∂x x=0

 " √ !#
T (x, t) − Ti h2 αt
   
x hx x h αt
= erfc √ − exp + erfc √ +
T∞ − Ti 2 αt k k2 2 αt k

11
Relations and Selected Values of Error Functions

erf (−x) = −erf x erfc (−x) = 2 − erfc x

erf 0 = 0 erfc 0 = 1

erf ∞ = 1 erfc ∞ = 0

erf (−∞) = −1


Z
erfc x dx = 1/ π
0

∞ √ √
Z
erfc2 x dx = (2 − 2)/ π
0

Ten decimal place values for selected values of the argument appear in Table 2.1.

Table 2.1 Ten decimal place values of erf x

x erf x x erf x

0.0 0.00000 00000 2.5 0.99959 30480


0.5 0.52049 98778 3.0 0.99997 79095
1.0 0.84270 07929 3.5 0.99999 92569
1.5 0.96610 51465 4.0 0.99999 99846
2.0 0.99532 22650 4.5 0.99999 99998

12
Approximations

Power Series for Small x (x < 2)

Since

2 x
2 x
(−1)n t2n
Z Z
−t2
X
erf x = √ e dt = √ dt (1.10)
π 0 π 0 n=0
n!

and the series is uniformly convergent, it may be integrated term by term. Therefore


2 X (−1)n x2n+1
erf x = √ (1.11)
π n=0 (2n + 1)n!

x3 x5 x7 x9
 
2 x
= √ − + − + − ··· (1.12)
π 1 · 0! 3 · 1! 5 · 2! 7 · 3! 9 · 4!

Asymptotic Expansion for Large x (x > 2)

Since

∞ ∞
2 2 1
Z Z
−t2 2
erfc x = √ e dt = √ e−t t dt
π x π x t

we can integrate by parts by letting

1 2
u = dv = e−t d dt
t
1 2
du = −t−2 dt v = − e−t
2

therefore

∞ Z ∞ −t2
∞ ∞
1 −t2 ∞
  
1 1e
Z Z
−t2
e t dt = uv − v du = − e − 2
dt
x t x x 2t x x 2 t

13
Thus

( 2
)
2 1 1 ∞
e−t
Z
−x2
erfc x = √ e − dt (1.13)
π 2x 2 x t2

Repeating the process n times yields



1·3 1 · 3 · · · (2n − 3)
 
π 1 −x2
1 1 n−1
erfc x = e − + − · · · + (−1) +
2 2 x 2x3 22 x5 2n−1 x2n−1
2
1 · 3 · · · (2n − 1) ∞
e−t
Z
n
+(−1) dt (1.14)
2n x t2n

Finally we can write


√ 2
X 1 · 3 · 5 · · · (2n − 1)
πxex erfc x = 1 + (−1)n (1.15)
n=1
(2x2 )n

This series does not converge, since the ratio of the nth term to the (n−1)th does not remain
less than unity as n increases. However, if we take n terms of the series, the remainder,

2
1 · 3 · · · (2n − 1) ∞
e−t
Z
dt
2n x t2n

is less than the nth term because

2

e−t ∞
dt
Z Z
−x2
dt < e <
x t2n 0 t2n

We can therefore stop at any term taking the sum of the terms up to this term as an
approximation of the function. The error will be less in absolute value than the last term
retained in the sum. Thus for large x, erfc x may be computed numerically from the
asymptotic expansion.


√ x2
X 1 · 3 · 5 · · · (2n − 1)
πxe erfc x = 1 + (−1)n
n=1
(2x2 )n

1 1·3 1·3·5
= 1− + − + ··· (1.16)
2x2 (2x2 )2 (2x2 )3

14
Some other representations of the error functions are given below:


2 −x2 X x2n+1
erf x = √ e (1.17)
π n=0
(3/2)n
 
2x 1 3 2
= √ M , , −x (1.18)
π 2 2
 
2x −x2 3 2
= √ e M 1, , x (1.19)
π 2
 
1 1 2
= √ γ ,x (1.20)
π 2
 
1 1 2
erfc x = √ Γ ,x (1.21)
π 2

The symbols γ and Γ represent the incomplete gamma functions, and M denotes the con-
fluent hypergeometric function or Kummer’s function.

Derivatives of the Error Function


 x 
d 2 d 2
Z
2 −t2
erf x = √ e−x = √ e dt (1.22)
dx π dx π 0

Use of “Leibnitz” rule of differentiation of integrals gives:


d2 d 2 2 2 2

2
erfc x = √ e−x = − √ (2x)e−x (1.23)
dx dx π π

d3
 
d 2 −x2
2 2

3
erfc x = − √ (2x)e = √ (4x2 − 2)e−x (1.24)
dx dx π π

In general we can write

dn+1 n
2 −x2
erf x = (−1) √ H n (x) e (n = 0, 1, 2 . . .) (1.25)
dxn+1 π

where Hn (x) are the Hermite polynomials.

15
Repeated Integrals of the Complementary Error Function
Z ∞
n
i erfc x = in−1 erfc t dt n = 0, 1, 2, . . . (1.26)
x

where

2 2
i−1 erfc x = √ e−x (1.27)
π

i0 erfc x = erfc x (1.28)


Z ∞
1
i erfc x = ierfc x = erfc t dt
x

1
= √ exp(−x2 ) − x erfc x (1.29)
π
Z ∞
2
i erfc x = i erfc t dt
x
 
1 2
2 2
= (1 + 2x ) erfc x − √ x exp(−x )
4 π
1
= [erfc x − 2x · ierfc x] (1.30)
4

The general recurrence formula is

2nin erfc x = in−2 erfc x − 2xin−1 erfc x (n = 1, 2, 3, . . .) (1.31)

Therefore the value at x = 0 is

1
in erfc 0 −   (n = −1, 0, 1, 2, 3, . . .) (1.32)
n
n
2 Γ 1+
2

It can be shown that y = in erfc x is the solution of the differential equation

d2 y dy
+ 2x − 2ny = 0 (1.33)
dx2 dx

16
The general solution of

y 00 + 2xy 0 − 2ny = 0 −∞≤x≤∞ (1.34)

is of the form

y = Ain erfc x + Bin erfc (−x) (1.35)

Derivatives of Repeated Integrals of the Complementary Error


Function

d
[in erfc x] = (−1)n−1 erfc x (n = 0, 1, 2, 3 . . .) (1.36)
dx

dn h x2
i 2
e erfc x = (−1)n 2n n!ex in erfc x (n = 0, 1, 2, 3 . . .) (1.37)
dxn

17
Some Integrals Associated with the Error Function

x2
e−t √
Z
√ dt = π erf x (1.38)
0 t
Z x √
−t y
π
e dt = erf x (1.39)
0 2y
2 x2
1
e−t π
Z
2
ex 1 − {erf x}2
 
dt = (1.40)
0 1 + t2 2


e−t x π √
Z
√ dt = √ exy erfc ( xy) x>0 (1.41)
0 y+t x
2x

e−t π √
Z
2
dt = exy erfc ( xy) x > 0, y > 0 (1.42)
0 t2 + y2 2y

e−tx π
Z
√ dt = √ exy erfc (xy) x > 0, y 6= 0 (1.43)
0 (t + y) t y
∞ √
y
Z p
e−t x
erf ( yt) dt = (x + y)−1/2 (x + y) > 0 (1.44)
0 x

1 −2√xy
Z p
e−t x erf ( y/t dt = e x > 0, y > 0 (1.45)
0 x
Z ∞
erfc (t) dt = ierfc (a) + 2a = ierfc (−a) (1.46)
−a
Z a
erf (t) dt = 0 (1.47)
−a
Z a
erfc(t) dt = 2a (1.48)
−a


1
Z
ierfc (t) dt = i2 erfc (−a) = + a − i2 erfc (a) (1.49)
−a 2
∞    
t+c a+c
Z
n n+1
i erfc dt = bi erfc (1.50)
a b b

18
Numerical Computation of Error Functions
The power series form of the error function is not recommended for numerical computations
when the argument approaches and exceeds the value x = 2 because the large alternat-
ing terms may cause cancellation, and because the general term is awkward to compute
recursively. The function can, however, be expressed as a confluent hypergeometric series.

 
2 −x2
3 2
erf x = √ x e M 1, , x (1.51)
π 2

in which all terms are positive, and no cancellation can occur. If we write


X
erf x = b an 0≤x≤2 (1.52)
n=0

with

2x 2 x2
b = √ e−x a0 = 1 an = an−1 n≥1
π (2n + 1)/2

then erf x can be computed very accurately (e.g. with an absolute error less that 10−9 ).
Numerical experiments show that this series can be used to compute erf x up to x = 5
to the required accuracy; however, the time required for the computation of erf x is much
greater due to the large number of terms which have to be summed. For x ≥ 2 an alternate
method that is considerably faster is recommended which is based upon the asymptotic
expansion of the complementary error function.


2
Z
2
erfc x = √ e−t dt
π x

2
e−x
 
1 1
= √ 2 Fo , 1, − x→∞ (1.53)
πx 2 x2

which cannot be used to obtain arbitrarily accurate values for any x. An expression that
converges for all x > 0 is obtained by converting the asymptotic expansion into a continued
fraction

19
√ 2 1
πex erfc x = x>0 (1.54)
1/2
x+
1
x+
3/2
x+
2
x+
5/2
x+
x + ...

which for convenience will be written as

2
e−x
 
1 1/2 1 3/2 2
erfc x = √ ··· x>0 (1.55)
π x+ x+ x+ x+ x+

It can be demonstrated experimentally that for x ≥ 2 the 16th approximant gives erfc x
with an absolute error less that 10−9 . Thus we can write

2
e−x
 
1 1/2 1 3/2 8
erfc x = √ ··· x≥2 (1.56)
π x+ x+ x+ x+ x

Using a fixed number of approximants has the advantage that the continued fraction can be
evaluated rapidly beginning with the last term and working upward to the first term.

20
Rational Approximations of the Error Functions (0 ≤ x < ∞)
Numerous rational approximations of the error functions have been developed for digital
computers. The approximations are often based upon the use of economized Chebyshev
polynomials and they give values of erf x from 4 decimal place accuracy up to 24 decimal
place accuracy.

Two approximations by Hastings et al.11 are given below.

2
erf x = 1 − [t(a1 + t(a2 + a3 t))] e−x + (x) 0≤x (1.57)

where

1
t=
1 + px

and the coefficients are

p = 0.47047

a1 = 0.3480242

a2 = −0.0958798

a3 = 0.7478556

This approximation has a maximum absolute error of |(x)| < 2.5 × 10−5 .

Another more accurate rational approximation has been developed for example

2
erf x = 1 − [t(a1 + t(a2 + t(a3 + t(a4 + a5 t))))] e−x + (x) (1.58)

where

1
t=
1 + px

21
and the coefficients are

p = 0.3275911

a1 = 0.254829592

a2 = −0.284496736

a3 = 1.421413741

a4 = −1.453152027

a5 = 1.061405429

This approximation has a maximum absolute error of |(x)| < 1.5 × 10−7 .

22
Assigned Problems
Problem Set for Error and Due Date: February 12, 2004
Complementary Error Function

1. Evaluate the following integrals to four decimal places using either power series, asymp-
totic series or polynomial approximations:
Z 2 Z 0.002
−x2 2
a) e dx b) e−x dx
0 0.001

∞ 10
2 2
Z Z
−x2 2
c) √ e dx d) √ e−x dx
π 1.5 π 5


1.5   r  
1 2 1
Z Z
−x2 −x2
e) e dx f) e dx
1 2 π 1 2

2. The value of erf 2 is 0.995 to three decimal places. Compare the number of terms
required in calculating this value using:

a) the convergent power series, and


b) the divergent asymptotic series.

Compare the approximate errors in each case after two terms; after ten terms.

3. For the function ierfc(x) compute to four decimal places when x = 0, 0.2, 0.4, 0.8,
and 1.6.

4. Prove that


 
1 2
i) π erf (x) = γ,x
2


 
1 2
ii) π erfc(x) = Γ ,x
2
   
1 2
1 2
where γ ,x and Γ ,x are the incomplete Gamma functions defined as:
2 2

23
Z y
γ(a, y) = e−u ua−1 du
0

and

Z ∞
Γ(a, y) = e−u ua−1 du
y


5. Show that θ(x, t) = θ0 erfc(x/2 αt) is the solution of the following diffusion
problem:

∂ 2θ 1 ∂θ
= x ≥ 0, t > 0
∂x2 α ∂t

and

θ(0, t) = θ0 , constant

θ(x, t) → 0 as x → ∞


6. Given θ(x, t) = θ0 erf x/2 αt:

∂θ ∂θ
i) Obtain expressions for and at any x and all t > 0
∂t ∂x

π x ∂θ
ii) For the function
2 θ0 ∂x
√ √
show√that it has a maximum value when x/2 αt = 1/ 2 and the maximum value
is 1/ 2e .

7. Given the transient point source solution valid within an isotropic half space

q √
T = erfc(r/2 αt), dA = r dr dθ
2πkr

24
derive the expression for the transient temperature rise at the centroid of a circular
area (πa2 ) which is subjected to a uniform and constant heat flux q. Superposition of
point source solutions allows one to write

Z aZ 2π
T0 = T dA
0 0

8. For a dimensionless time F o < 0.2 the temperature distribution within an infinite
plate −L ≤ x ≤ L is given approximately by

T (ζ, F o) − Ts 1−ζ
 
1+ζ
=1− erfc √ + erfc √
T0 − Ts 2 Fo 2 Fo

for 0 ≤ ζ ≤ 1 where ζ = x/L and F o = αt/L2 .


Obtain the expression for the mean temperature (T (F o) − Ts )/(T0 − Ts ) where

Z 1
T = T (ζ, F o) dζ
0

The initial and surface plate temperature are denoted by T0 and Ts , respectively.

9. Compare the approximate short time (F o < 0.2) solution:

3
(2n − 1) − ζ (2n − 1) + ζ
X  
n+1
θ(ζ, F o) = 1 − (−1) erfc √ + erfc √
n=1 2 Fo 2 Fo

and the approximate long time (F o > 0.2) solution

3
X 2(−1)n+1 2
θ(ζ, F o) = e−δn F o cos(δn ζ)
n=1
δn

with δn = (2n − 1)π/2.


For the centerline (ζ = 0) compute to four decimal places θ(0, F o)ST and θ(0, F o)LT
for F o = 0.02, 0.06, 0.1, 0.4, 1.0 and 2.0 and compare your values with the “exact”
values given in Table 1.

25
Table 1: Exact values of θ(0, F o) for the Infinite Plate

Fo θ(0, F o)

0.02 1.0000
0.06 0.9922
0.10 0.9493
0.40 0.4745
1.0 0.1080
2.0 0.0092

26
References
1. Abramowitz, M. and Stegun, I.A., Handbook of Mathematical Functions, Dover,
New York, 1965.

2. Fletcher, A., Miller, J.C.P., Rosehead, L. and Comrie, L.J., An Index of


Mathematical Tables, Vols. 1 and 2, 2 edition, Addison-Wesley, Reading, Mass., 1962.

3. Hochsadt, H., Special Functions of Mathematical Physics, Holt, Rinehart and Win-
ston, New York, 1961.

4. Jahnke, E., Emdw, F. and Losch, F., Tables of Higher Functions, 6th Edition,
McGraw-Hill, New York, 1960.

5. Lebedev, A.V. and Fedorova, R.M., A Guide to Mathematical Tables, Pergamon


Press, Oxford, 1960.

6. Lebedev, N.N., Special Functions and Their Applications, Prentice-Hall, Englewood


Cliffs, NJ, 1965.

7. Magnus, W., Oberhettinger, F. and Soni, R.P., Formulas and Theorems for the
Functions of Mathematical Physics, 3rd Edition, Springer-Verlag, New York, 1966.

8. Rainville, E.D., Special Functions, MacMillan, New York, 1960.

9. Sneddon, I.N., Special Functions of Mathematical Physics and Chemistry, 2nd Edi-
tion, Oliver and Boyd, Edinburgh, 1961.

10. National Bureau of Standards, Applied Mathematics Series 41, Tables of Error
Function and Its Derivatives, 2nd Edition, Washington, DC, US Government Printing
Office, 1954.

11. Hastings, C., Approximations for Digital Computers, Princeton University Press,
Princeton, NJ, 1955.

27
Chebyshev Polynomials

Reading Problems

Differential Equation and Its Solution


The Chebyshev differential equation is written as

d2 y dy
(1 − x2 ) −x + n2 y = 0 n = 0, 1, 2, 3, . . .
dx2 dx

If we let x = cos t we obtain

d2 y
+ n2 y = 0
dt2

whose general solution is

y = A cos nt + B sin nt

or as

y = A cos(n cos−1 x) + B sin(n cos−1 x) |x| < 1

or equivalently

y = ATn (x) + BUn (x) |x| < 1

where Tn (x) and Un (x) are defined as Chebyshev polynomials of the first and second kind
of degree n, respectively.

1
If we let x = cosh t we obtain

d2 y
− n2 y = 0
dt2

whose general solution is

y = A cosh nt + B sinh nt

or as

y = A cosh(n cosh−1 x) + B sinh(n cosh−1 x) |x| > 1

or equivalently
y = ATn (x) + BUn (x) |x| > 1

The function Tn (x) is a polynomial. For |x| < 1 we have


 p n
Tn (x) + iUn (x) = (cos t + i sin t)n = x + i 1 − x2
 p n
Tn (x) − iUn (x) = (cos t − i sin t)n = x − i 1 − x2

from which we obtain

1 h p n  p n i
Tn (x) = x+i 1 − x2 + x − i 1 − x2
2

For |x| > 1 we have


 p n
Tn (x) + Un (x) = ent = x ± x2 − 1
 p n
−nt 2
Tn (x) − Un (x) = e = x∓ x −1

The sum of the last two relationships give the same result for Tn (x).

2
Chebyshev Polynomials of the First Kind of Degree n
The Chebyshev polynomials Tn (x) can be obtained by means of Rodrigue’s formula

(−2)n n! p dn
Tn (x) = 1 − x2 (1 − x2 )n−1/2 n = 0, 1, 2, 3, . . .
(2n)! dxn

The first twelve Chebyshev polynomials are listed in Table 1 and then as powers of x in
terms of Tn (x) in Table 2.

3
Table 1: Chebyshev Polynomials of the First Kind

T0 (x) = 1

T1 (x) = x

T2 (x) = 2x2 − 1

T3 (x) = 4x3 − 3x

T4 (x) = 8x4 − 8x2 + 1

T5 (x) = 16x5 − 20x3 + 5x

T6 (x) = 32x6 − 48x4 + 18x2 − 1

T7 (x) = 64x7 − 112x5 + 56x3 − 7x

T8 (x) = 128x8 − 256x6 + 160x4 − 32x2 + 1

T9 (x) = 256x9 − 576x7 + 432x5 − 120x3 + 9x

T10 (x) = 512x10 − 1280x8 + 1120x6 − 400x4 + 50x2 − 1

T11 (x) = 1024x11 − 2816x9 + 2816x7 − 1232x5 + 220x3 − 11x

4
Table 2: Powers of x as functions of Tn (x)

1 = T0

x = T1
1
x2 = (T0 + T2 )
2
1
x3 = (3T1 + T3 )
4
1
x4 = (3T0 + 4T2 + T4 )
8
1
x5 = (10T1 + 5T3 + T5 )
16
1
x6 = (10T0 + 15T2 + 6T4 + T6 )
32
1
x7 = (35T1 + 21T3 + 7T5 + T7 )
64
1
x8 = (35T0 + 56T2 + 28T4 + 8T6 + T8 )
128
1
x9 = (126T1 + 84T3 + 36T5 + 9T7 + T9 )
256
1
x10 = (126T0 + 210T2 + 120T4 + 45T6 + 10T8 + T10 )
512
1
x11 = (462T1 + 330T3 + 165T5 + 55T7 + 11T9 + T11 )
1024

5
Generating Function for Tn (x)
The Chebyshev polynomials of the first kind can be developed by means of the generating
function


1 − tx X
= Tn (x)tn
1 − 2tx + t2 n=0

Recurrence Formulas for Tn (x)


When the first two Chebyshev polynomials T0 (x) and T1 (x) are known, all other polyno-
mials Tn (x), n ≥ 2 can be obtained by means of the recurrence formula

Tn+1 (x) = 2xTn (x) − Tn−1 (x)

The derivative of Tn (x) with respect to x can be obtained from

(1 − x2 )Tn0 (x) = −nxTn (x) + nTn−1 (x)

Special Values of Tn (x)


The following special values and properties of Tn (x) are often useful:

Tn (−x) = (−1)n Tn (x) T2n (0) = (−1)n

Tn (1) = 1 T2n+1 (0) = 0

Tn (−1) = (−1)n

6
Orthogonality Property of Tn (x)
We can determine the orthogonality properties for the Chebyshev polynomials of the first
kind from our knowledge of the orthogonality of the cosine functions, namely,



 0 (m 6= n)
Z π 


cos(mθ) cos(n θ) dθ = π/2 (m = n 6= 0)
0 



π (m = n = 0)

Then substituting

Tn (x) = cos(nθ)

cos θ = x

to obtain the orthogonality properties of the Chebyshev polynomials:



 0 (m 6= n)
Z 1 

Tm (x) Tn (x) dx 
√ = π/2 (m = n 6= 0)
−1 1 − x2 



π (m = n = 0)

We observe that the Chebyshev polynomials form an orthogonal set on the interval −1 ≤
x ≤ 1 with the weighting function (1 − x2 )−1/2

Orthogonal Series of Chebyshev Polynomials


An arbitrary function f (x) which is continuous and single-valued, defined over the interval
−1 ≤ x ≤ 1, can be expanded as a series of Chebyshev polynomials:

f (x) = A0 T0 (x) + A1 T1 (x) + A2 T2 (x) + . . .



X
= An Tn (x)
n=0

7
where the coefficients An are given by

1
1 f (x) dx
Z
A0 = √ n=0
π −1 1 − x2

and

1
2 f (x) Tn (x) dx
Z
An = √ n = 1, 2, 3, . . .
π −1 1 − x2

The following definite integrals are often useful in the series expansion of f (x):

1
dx x3 dx
1
Z Z
√ = π √ = 0
−1 1 − x2 −1 1 − x2
1
x dx x4 dx
1

Z Z
√ = 0 √ =
−1 1 − x2 −1 1 − x2 8
1
x2 dx π x5 dx
1
Z Z
√ = √ = 0
−1 1 − x2 2 −1 1 − x2

Chebyshev Polynomials Over a Discrete Set of Points


A continuous function over a continuous interval is often replaced by a set of discrete values
of the function at discrete points. It can be shown that the Chebyshev polynomials Tn (x)
are orthogonal over the following discrete set of N + 1 points xi , equally spaced on θ,

π 2π π
θi = 0, , , . . . (N − 1) , π
N N N

where

xi = arccos θi

We have

8


 0 (m 6= n)
N −1


1 X 1 
Tm (−1)Tn (−1)+ Tm (xi )Tn (xi )+ Tm (1)Tn (1) = N/2 (m = n 6= 0)
2 i=2
2 



N (m = n = 0)

The Tm (x) are also orthogonal over the following N points ti equally spaced,

π 3π 5π (2N − 1)π
θi = , , , ...,
2N 2N 2N 2N

and

ti = arccos θi



 0 (m 6= n)
N


X 
Tm (ti )Tn (ti ) = N/2 (m = n 6= 0)

i=1 


N (m = n = 0)

The set of points ti are clearly the midpoints in θ of the first case. The unequal spacing of
the points in xi (N ti ) compensates for the weight factor

W (x) = (1 − x2 )−1/2

in the continuous case.

9
Additional Identities of Chebyshev Polynomials
The Chebyshev polynomials are both orthogonal polynomials and the trigonometric cos nx
functions in disguise, therefore they satisfy a large number of useful relationships.

The differentiation and integration properties are very important in analytical and numerical
work. We begin with

Tn+1 (x) = cos[(n + 1) cos−1 x]

and

Tn−1 (x) = cos[(n − 1) cos−1 x]

Differentiating both expressions gives

1 d[Tn+1 (x)] − sin[(n + 1) cos−1 x


= √
(n + 1) dx − 1 − x2

and

1 d[Tn−1 (x)] − sin[(n − 1) cos−1 x


= √
(n − 1) dx − 1 − x2

Subtracting the last two expressions yields

1 d[Tn+1 (x)] 1 d[Tn−1 (x)] sin(n + 1)θ − sin(n − 1)θ


− =
(n + 1) dx (n − 1) dx sin θ

or

0 0
Tn+1 (x) Tn−1 (x) 2 cos nθ sin θ
− = = 2Tn (x) n≥2
(n + 1) (n − 1) sin θ

10
Therefore

T20 (x) = 4T1

T10 (x) = T0

T00 (x) = 0

We have the formulas for the differentiation of Chebyshev polynomials, therefore these for-
mulas can be used to develop integration for the Chebyshev polynomials:

 
1 Tn+1 (x) Tn−1 (x)
Z
Tn (x)dx = − +C n≥2
2 (n + 1) (n − 1)
1
Z
T1 (x)dx = T2 (x) + C
4
Z
T0 (x)dx = T1 (x) + C

The Shifted Chebyshev Polynomials


For analytical and numerical work it is often convenient to use the half interval 0 ≤ x ≤ 1
instead of the full interval −1 ≤ x ≤ 1. For this purpose the shifted Chebyshev polynomials
are defined:

Tn∗ (x) = Tn ∗ (2x − 1)

Thus we have for the first few polynomials

T0∗ = 1

T1∗ = 2x − 1

T2∗ = 8x2 − 8x + 1

T3∗ = 32x3 − 48x2 + 18x − 1

T4∗ = 128x4 − 256x3 + 160x2 − 32x + 1

11
and the following powers of x as functions of Tn∗ (x);

1 = T0∗
1
x = (T0∗ + T1∗ )
2
1
x2 = (3T0∗ + 4T1∗ + T2∗ )
8
1
x3 = (10T0∗ + 15T1∗ + 6T2∗ + T3∗ )
32
1
x4 = (35T0∗ + 56T1∗ + 28T2∗ + 8T3∗ + T4∗ )
128

The recurrence relationship for the shifted polynomials is:


Tn+1 (x) = (4x − 2)Tn∗ (x) − Tn−1

(x) T0∗ (x) = 1

or

1 1 1
xTn∗ (x) = ∗
Tn+1 (x) + Tn∗ (x) + ∗
Tn−1 (x)
4 2 4

where

Tn∗ (x) = cos n cos−1 (2x − 1) = Tn (2x − 1)


 

Expansion of xn in a Series of Tn (x)


A method of expanding xn in a series of Chebyshev polynomials employes the recurrence
relation written as

1
xTn (x) = [Tn+1 (x) + Tn−1 (x)] n = 1, 2, 3 . . .
2
xT0 (x) = T1 (x)

12
To illustrate the method, consider x4

4 2
x2 x
x = x (xT1 ) = [T2 + T0 ] = [T1 + T3 + 2T1 ]
2 4
1 1
= [3xT1 + xT3 ] = [3T0 + 3T2 + T4 + T2 ]
4 8
1 1 3
= T4 + T2 + T0
8 2 8

This result is consistent with the expansion of x4 given in Table 2.

Approximation of Functions by Chebyshev Polynomials


Sometimes when a function f (x) is to be approximated by a polynomial of the form


X
f (x) = an xn + EN (x) |x| ≤ 1
n=0

where |En (x)| does not exceed an allowed limit, it is possible to reduce the degree of the
polynomial by a process called economization of power series. The procedure is to convert
the polynomial to a linear combination of Chebyshev polynomials:

N
X N
X
n
an x = bn Tn (x) n = 0, 1, 2, . . .
n=0 n=0

It may be possible to drop some of the last terms without permitting the error to exceed
the prescribed limit. Since |Tn (x)| ≤ 1, the number of terms which can be omitted is
determined by the magnitude of the coefficient b.

The Chebyshev polynomials are useful in numerical work for the interval −1 ≤ x ≤ 1
because

1. |Tn (x)] ≤ 1 within −1 ≤ x ≤ 1

2. The maxima and minima are of comparable value.

13
3. The maxima and minima are spread reasonably uniformly over the interval
−1 ≤ x ≤ 1

4. All Chebyshev polynomials satisfy a three term recurrence relation.

5. They are easy to compute and to convert to and from a power series form.

These properties together produce an approximating polynomial which minimizes error in


its application. This is different from the least squares approximation where the sum of
the squares of the errors is minimized; the maximum error itself can be quite large. In
the Chebyshev approximation, the average error can be large but the maximum error is
minimized. Chebyshev approximations of a function are sometimes said to be mini-max
approximations of the function.

The following table gives the Chebyshev polynomial approximation of several power series.

14
Table 3: Power Series and its Chebyshev Approximation

1. f (x) = a0

f (x) = a0 T0

2. f (x) = a0 + a1 x

f (x) = a0 T0 + a1 T1

3. f (x) = a0 + a1 x + a2 x2
   
a2 a2
f (x) = a0 + T0 + a1 T1 + T2
2 2

4. f (x) = a0 + a1 x + a2 x2 + a3 x3
       
a2 3a3 a2 a3
f (x) = a0 + T0 + a1 + T1 + T2 + T3
2 4 2 4

5. f (x) = a0 + a1 x + a2 x2 + a3 x3 + a4 x4
       
a2 a3 3a3 a2 a4 a3
f (x) = a0 + + T0 + a1 + T1 + + T2 + T3
2 8 4 2 2 8
 
a4
+ T4
8

6. f (x) = a0 + a1 x + a2 x2 + a3 x3 + a4 x4 + a5 x5
     
a2 3a4 3a3 5a5 a2 a4
f (x) = a0 + + T0 + a1 + + T1 + + T2
2 8 4 8 2 2
     
a3 5a5 a4 a5
+ + T3 + T4 + T5
4 16 8 16

15
Table 4: Formulas for Economization of Power Series

x = T1
1
x2 = (1 + T2 )
2
1
x3 = (3x + T3 )
4
1
x4 = (8x2 − 1 + T4 )
8
1
x5 = (20x3 − 5x + T5 )
16
1
x6 = (48x4 − 18x2 + 1 + T6 )
32
1
x7 = (112x5 − 56x3 + 7x + T7 )
64
1
x8 = (256x6 − 160x4 + 32x2 − 1 + T8 )
128
1
x9 = (576x7 − 432x5 + 120x3 − 9x + T9 )
256
1
x10 = (1280x8 − 1120x6 + 400x4 − 50x2 + 1 + T10 )
512
1
x11 = (2816x9 − 2816x7 + 1232x5 − 220x3 + 11x + T11 )
1024

For easy reference the formulas for economization of power series in terms of Chebyshev are
given in Table 4.

16
Assigned Problems

Problem Set for Chebyshev Polynomials

1. Obtain the first three Chebyshev polynomials T0 (x), T1 (x) and T2 (x) by means of
the Rodrigue’s formula.

2. Show that the Chebyshev polynomial T3 (x) is a solution of Chebyshev’s equation of


order 3.

3. By means of the recurrence formula obtain Chebyshev polynomials T2 (x) and T3 (x)
given T0 (x) and T1 (x).

4. Show that Tn (1) = 1 and Tn (−1) = (−1)n

5. Show that Tn (0) = 0 if n is odd and (−1)n/2 if n is even.

6. Setting x = cos θ show that

1 h p n  p n i
Tn (x) = x + i 1 − x2 + x − i 1 − x2
2

where i = −1.

7. Find the general solution of Chebyshev’s equation for n = 0.

8. Obtain a series expansion for f (x) = x2 in terms of Chebyshev polynomials Tn (x),

3
X
2
x = An Tn (x)
n=0

9. Express x4 as a sum of Chebyshev polynomials of the first kind.

17
Dirichlet Integral

This article has been identified as a candidate for Featured Proof status.
If you do not believe that this proof is worthy of being a Featured Proof, please state
your reasons on the talk page.
To discuss this page in more detail, feel free to use the talk page.

Contents
Theorem
Proof 1
Proof 2
Proof 3
Proof 4
Proof 5
Source of Name

Theorem

sin x π
∫ dx =
0 x 2
Proof 1
By Fubini's Theorem:
∞ ∞ ∞ ∞
∫ (∫ −xy
e sin x dy) dx = ∫ (∫ e−xy sin x dx) dy
0 0 0 0

Then:


sin x ∞
∫ e −xy
sin x dy = [−e −xy
] Primitive of eax
0 x 0
sin x
=
x

and:

∞ ∞
−e−xy (y sin x + cos x)
∫ e −xy
sin x dx = [ ] Primitive of eax sin bx
0 y2 + 1 0

1
=
y2 + 1

Hence:

∞ ∞
sin x 1
∫ dx = ∫ dy
0 x 0 y2 + 1
∞ 1
= [arctan y] Primitive of
0 x2 + a2
π π
= as lim arctan y =
2 y→∞ 2

Proof 2

sin x
∫ dx is convergent as an improper integral.
0 x
Indeed, for all n ∈ N:

2πn 2n − 1 π(k+1)
sin x
dx = ∑ ∫
sin x
∫ dx
0 x k=0 πk x
2n − 1 π
sin x
= ∑ (−1) ∫
k
dx
k=0 0 x + πk

(−1)k
2n − 1 π
sin x
= ∑ ∫ x dx
k=0
πk 0 1 + πk

But

∣ π sin x ∣ π ∣ 1 ∣
∣∫ x dx − 2 ∣ ≤ ∫ sin x ∣ x − 1 ∣ dx
∣ 0 1 + πk ∣ 0 ∣ 1 + πk ∣
π
1
= ∫ x sin x dx
kπ 0

so that
π
sin x
∫ x dx →k→∞ 2
0 1 + kπ

Hence,

2πn n−1 π π
sin x 1 sin x 1 sin x
∫ dx = ∑ ∫ x dx − ∫ x dx
0 x k=0
2πk 0 1 + 2πk
π (2k + 1) 0 1 + π(2k+1)

can be expressed as a series whose general term is equivalent to

2 1
×
π 2k (2k + 1)
which is the term of an absolutely convergent series.

We have, by Modulus of Sine of x Less Than or Equal To Absolute Value of x:

∣ e−αx sin x ∣
∣ ∣ ≤ e−αx
∣ x ∣
We have, from Laplace Transform of Real Power:

1
∫ e−αx dx =
0 α
so, by Comparison Test for Improper Integral:

e−αx sin x
∫ dx converges whenever α > 0.
0 x
So, we can define a real function I : (0 . . ∞) → R by:

e−αx sin x
I (α) = ∫ dx
0 x
for each α ∈ (0 . . ∞) .

Using Improper Integral of Partial Derivative on segments included in (0 . . ∞):

∞ −αx
∂ e sin x

I (α) = ∫ dx
∂α 0 x

∂ e−αx sin x
= ∫ dx Leibniz's Integral Rule
0 ∂α x

= −∫ e−αx sin x dx Derivative of Exponential Function
0

= [− ]
e−αx (−α sin x + cos x)
2
Primitive of eαx sin bx
(−α) + 1 0

1
= −
α2 + 1

Therefore, by Derivative of Arctangent Function

I(α) = − arctan α + K
for some K ∈ R .

We also have:
∣ ∞ e−αx sin x ∣
|I (α)| = ∣∫ dx∣
∣ 0 x ∣

∣ e−αx sin x ∣
≤ ∫ ∣ ∣ dx Triangle Inequality for Definite Integrals
0 ∣ x ∣
1

α

so:

lim |I (α)| = 0
α→∞

That is:

lim I (α) = 0
α→∞

π π
Therefore I(α) = − arctan α, since arctan α →α→∞ .
2 2
Note that we have:
π
I(α) →α→0
2
We now need to show that

sin x
I(α) →α→0 ∫ dx
0 x
Observe for this purpose that


sin 2x −2αx
I(α) = ∫ e dx (change of variable
0 x x ⇝ 2x )

sin x −2αx
= 2∫ e cos x dx
0 x

sin2 x −2αx ∞ ∞ by integration by


sin xe−2αx (−α − 2 ) dx
sin x cos x sin x
= 2[ e ] − 2∫ + Parts for improper
x 0 0 x x x integral
by Continuous Real
∞ 2 ∞ 2
( ) e−2αx dx − I(α)
sin x −2αx sin x
= 2α ∫ dx + 2 ∫
Function/Examples,
e sin x
0 x 0 x → 1 in 0 .
x

where all the improper integrals appearing here are convergent by Comparison Test for Improper Integral, as used
above for defining I(α).

Therefore,

sin2 x −2αx ∞
sin x 2 −2αx
I(α) = α ∫ e dx + ∫ ( ) e dx
0 x 0 x

We also have

∞ ∞
sin x sin x
∫ dx = 2 ∫ cos x dx
0 x 0 x
sin2 x ∞ α ∞
sin x 2
( ) dx
sin x
= 2[ ] − 2∫ cos x dx + 2 ∫
x 0 0 x 0 x
∞ ∞
sin x 2
( ) dx
sin x
= −∫ dx + 2 ∫
0 x 0 x

where the improper integrals on the right hand side are convergent because the first one identifies with

sin x sin2 x
∫ dx and the second one because is integrable on (0 . . ∞) , since it has a finite limit at 0 and is
0 x x2
smaller than 12 at ∞.
x

∞ ∞
sin x 2
( ) dx, where the second integral is absolutely convergent.
sin x
Hence ∫ dx = ∫
0 x 0 x

Moreover

x

sin2 x −2αx ∞ sin2
α∫ e dx = α∫
α
e−2x dx
0 x 0 x
x2
⎛ α α2 1
1 ∞ ⎞
≤ α ∫ dx + ∫ dx + ∫ e−2x dx
⎝ 0 x α x 1 ⎠

α( − ln α + 2 )
1 1
=
2 2e
→α → 0 0

whenever α ≤ 1, and

sin x 2 −2αx ∞
sin x 2
∫ ( ) e dx →α→0 ∫ ( ) dx
0 x 0 x

since for any positive R and α,

1
∞ 2 sin x 2 ∞
sin x 2
( ) (1 − e−2αx ) dx ∫ ( ) (1 − e−2αx ) dx + ∫ ( ) (1 − e−2αx ) d
sin x

√α
=
0 x 0 x 1 x
√α


sin x 2 ∞
sin x 2
≤ (1 − e−2√α ) ∫ ( ) dx + ∫ ( ) dx
0 x 1 x
√α
→α→0 0

sin2 x
because is integrable on (0 . . ∞) .
x2
Finally, we have


sin2 x −2αx ∞
sin x 2 −2αx
I(α) = α∫ e dx + ∫ ( ) e dx
0 x 0 x

sin x 2
→α→0 ∫ ( ) dx
0 x

sin x
= ∫ dx
0 x

as well as

π
I(α) = − arctan α
2
π
→α→0
2

So that, by uniqueness of limits,



sin x π
∫ dx =
0 x 2

Proof 3
Let:
eix −1
f (x) = { x x≠0
i x=0
We have, by Euler's Formula, for x ∈ R :
sin x
Im (f (x)) = { x x≠0
1 x=0
So:
∞ ∞
eix − 1
Im (∫
sin x
dx) = ∫ dx
0 x 0 x

Let CR be the arc of the circle of radius R centred at the origin connecting R and −R anticlockwise.

Let ΓR = CR ∪ [−R . . R].

Then, by Contour Integral of Concatenation of Contours:


R ix
eix − 1 eix − 1 e −1
∮ dx = ∫ dx + ∫ dx
ΓR x CR x −R x

From Linear Combination of Contour Integrals, we write:


R ix
eix − 1 eix dx e −1
∮ dx = ∫ dx − ∫ +∫ dx
ΓR x CR x CR x −R x

Note that f is holomorphic inside our contour.

It then follows from the Cauchy-Goursat Theorem, that:


eix − 1
∮ dx = 0
ΓR x

We also have:

∣ eix ∣ ∣ 1 ∣
∣∫ dx∣ ≤ π max ∣ iθ ∣ Jordan's Lemma
∣ CR x ∣ 0 ≤ θ ≤ π ∣ Re ∣

π
=
R
→ 0 as R → ∞

Therefore:
R ix ∞ ix
dx e −1 e −1
lim ∫ = lim ∫ dx = ∫ dx
R→∞ CR x R → ∞ −R x −∞ x

Evaluating the integral on the left hand side:

dx π
iReiθ
∫ = ∫ dθ Definition of Complex Contour Integral
CR x 0 Reiθ
π
= i∫ dθ
0

= πi

So:

eix − 1
∫ dx = πi
−∞ x

Taking the imaginary part:



sin x
∫ dx = π
−∞ x

From Definite Integral of Even Function:


∞ ∞
sin x sin x
∫ dx = 2 ∫ dx
−∞ x 0 x

Hence:

sin x π
∫ dx =
0 x 2

Proof 4
From Integral to Infinity of Function over Argument:
∞ f (x) →∞
∫ =∫ F (u) du
0 x 0

for a real function f and its Laplace transform L {f} = F , provided they exist.

Let f (x) := sin x .

Then from Laplace Transform of Sine:

1
L {f (x)} =
s2 + 1
Hence:

∞ →∞
sin x du
∫ dx = ∫
0 x 0 u2 + 1
∞ 1
= [arctan u] Primitive of
0 x2 + a2
π
=
2

Proof 5
Let M ∈ R>0 .

Define a real function IM : R → R by:


M
sin x −αx
IM (α) := ∫ e dx
0 x
Then, for α > 0:

M
∣ sin x −αx ∣
|IM (α)| ≤ ∫ ∣ e ∣ dx Absolute Value of Definite Integral
0 ∣ x ∣
M
≤ ∫ e−αx dx Sine Inequality |sin x| ≤ |x|
0
M
e−αx
= [ ] Primitive of eax
−α 0
1 e−αM
= −
α α
1
(1) : ≤
α

On the other hand:

M
∂ sin x −αx
= ∫ ( e ) dx
′ (α) Definite Integral of Partial
IM
0 ∂α x Derivative
M
= ∫ − sin xe−αx dx Primitive of eax
0
M

= [− ]
e−αx (−α sin x + cos x)
Primitive of eαx sin bx
2
(−α) + 1 0

−1 e−αM αe−αM
(2) : = + cos M + sin M
α2 + 1 α2 + 1 α2 + 1

Thus:

A Fundamental
IM (A) − IM (0) = ∫ ′
IM (α) dα Theorem of
0 Calculus
A
dα A
e−αM A
αe−αM
= −∫ + cos M ∫ dα + sin M ∫ dα by (2)
0 α2 + 1 0 α2 + 1 0 α2 + 1
Thus:

∣ A
dα ∣ ∣ A
e−αM A
αe−αM ∣
∣IM (A) − IM (0) + ∫ ∣ ≤ ∣ cos M ∫ dα + sin M ∫ dα∣
∣ 0 α2 + 1 ∣ ∣ 0 α2 + 1 0 α2 + 1 ∣
Triangle
∣ M
e−αM ∣ ∣ M
αe−αM ∣
≤ ∣ cos M ∫ dα∣ + ∣ sin M ∫ dα∣ Inequality
∣ 0 α 2 +1
∣ ∣ 0 α 2 +1
∣ for Real
Numbers
M
e−αM M
αe−αM
≤ ∫ dα + ∫ dα
0 α2 + 1 0 α2 + 1
M
≤ 2∫ e−αM dα
0

2 similarly
(3) : ≤ to (1)
M

Therefore:

∣ π ∣∣
∣I (0) − π ∣ = ∣I (A) − (I (A) − I (0) + ∫ )
A A
dα dα
∣ M + ∫ −
∣ M 2∣ 2 ∣∣
M M
∣ 0 α2 + 1 0 α2 + 1

Triangle
∣ A
dα ∣ ∣ A dα π∣
|
≤ MI (A)| + ∣I M (A) − IM (0) + ∫ ∣ + ∣∫ − ∣ Inequality
∣ 0 α2 + 1 ∣ ∣ 0 α2 + 1 2∣ for Real
Numbers

1 2 ∣ A dα π∣ by (1) and
≤ + + ∣∫ − ∣
A M ∣ 0 α2 + 1 2∣ (3)

2 as
→ A → +∞
M
by Definite
Integral to
Infinity of
1
x2 + a2

As:
M
sin x
IM (0) = ∫ dx
0 x
we have shown:

∣ M sin x π∣ 2
∀M ∈ R>0 : ∣∫ dx − ∣ ≤
∣ 0 x 2∣ M

In particular:

∞ M
sin x

sin x
dx = lim ∫ dx
0 x M → +∞ 0 x
π
=
2

Source of Name
This entry was named for Johann Peter Gustav Lejeune Dirichlet.
Retrieved from "https://proofwiki.org/w/index.php?title=Dirichlet_Integral&oldid=600918"

This page was last modified on 12 November 2022, at 22:09 and is 697 bytes

Content is available under Creative Commons Attribution-ShareAlike License unless otherwise noted.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy