### 7.3.13 Gamma function

The Gamma function is defined by

Γ(x)= | ∫ |
+∞
0
| e−ttx−1d t, if x>0.

If x is a positive integer, Γ is computed by applying the recurrence Γ(x+1)=x Γ(x) with Γ(1)=1. Hence Γ(n+1)=n! which is used to generalize the factorial (see Section 12.1.1).

The Gamma command computes the Gamma function.

- Gamma takes a, a number.
- Gamma(a) returns the value Γ(a).

#### Examples

Gamma(5)

24 |  |  |  |  |  |  |  |  |  |

Gamma(0.7)

1.29805533265 |  |  |  |  |  |  |  |  |  |

Gamma(-0.3)

−4.32685110883 |  |  |  |  |  |  |  |  |  |

Indeed, Γ(0.7)=−0.3·Γ(−0.3).

Gamma(-1.3)

3.32834700679 |  |  |  |  |  |  |  |  |  |

Indeed, Γ(0.7)=−0.3·Γ(−0.3)=−0.3·(−1.3)·Γ(−1.3).

If a=n/d∈ℚ∖ℤ where d>0, then the exact value Γ(a) is computed from Γ(m/d), where 0<2m<d and either m−n or m+n is divisible by d. (If d=2, then the value Γ(a) does not involve another Gamma value.) In particular, this leads to simplification of certain products of Gamma values.

Gamma(1/2)

| √ |
π

Gamma(-15/8)

64 Γ | ⎛ ⎜ ⎜ ⎝ |
1
8
| ⎞ ⎟ ⎟ ⎠
105

normal(Gamma(-13/4)/Gamma(3/4))

256
585

normal(Gamma(1/4)*Gamma(3/4))

π | √ |
2