Calculus · Unit 4 · Topic 18

Gamma function: the factorial, extended.

Short answer

The Gamma function is defined for \(n > 0\) by

\[\Gamma(n) = \int_0^{\infty} e^{-x}\,x^{n-1}\,dx\]

It satisfies \(\Gamma(n + 1) = n\,\Gamma(n)\), so \(\Gamma(n + 1) = n!\) for whole numbers, and \(\Gamma\left(\tfrac{1}{2}\right) = \sqrt\pi\).

Engineering Calculus · Unit 4B Tech / BE Semester IBSc
01

Definition

Before you start: the Gamma function is an improper integral, and its properties come from integration by parts.

Gamma function

For \(n > 0\), \[\Gamma(n) = \int_0^{\infty} e^{-x}\,x^{n-1}\,dx\]

The integral converges for every \(n > 0\): near \(\infty\) the factor \(e^{-x}\) kills any power of \(x\), and near 0 the factor \(x^{n-1}\) is integrable when \(n > 0\).

02

The idea in one picture

The graph of the Gamma function for positive x, passing through the factorials at whole numbers 1234 x Γ(x) Γ(1) = 0! = 1Γ(2) = 1! = 1Γ(3) = 2! = 2Γ(4) = 3! = 6 Γ(½) = √π ≈ 1.77
\(\Gamma(x)\) joins up the factorials with a smooth curve: \(\Gamma(n + 1) = n!\) at every whole number, and it also has values in between, such as \(\Gamma(\tfrac{1}{2}) = \sqrt{\pi}\).
03

Properties

PropertyWhy
\(\Gamma(1) = 1\)\(\int_0^\infty e^{-x}\,dx = 1\)
\(\Gamma(n + 1) = n\,\Gamma(n)\)integration by parts (the recurrence formula)
\(\Gamma(n + 1) = n!\) for whole numbers \(n\)apply the recurrence repeatedly
\(\Gamma\left(\tfrac{1}{2}\right) = \sqrt\pi\)from \(\int_0^\infty e^{-x^2}\,dx = \tfrac{\sqrt\pi}{2}\)
\(\Gamma(n) = \dfrac{\Gamma(n + 1)}{n}\)defines \(\Gamma\) for negative non-integers

Proof of the recurrence

By parts, with \(u = x^n\) and \(dv = e^{-x}dx\): \[\Gamma(n + 1) = \int_0^\infty e^{-x}x^n\,dx = \big[-x^n e^{-x}\big]_0^\infty + n\int_0^\infty e^{-x}x^{n-1}\,dx = 0 + n\,\Gamma(n)\]

Two standard forms

  • \(\displaystyle\int_0^\infty e^{-ax}\,x^{n-1}\,dx = \frac{\Gamma(n)}{a^n}\) (substitute \(ax = t\)).
  • \(\displaystyle\int_0^1 x^m(\log x)^n\,dx = \frac{(-1)^n\,n!}{(m + 1)^{n+1}}\) (substitute \(x = e^{-t}\)).
04

Solved examples

Example 1: Values

Easy

Find \(\Gamma(5)\) and \(\Gamma\left(\tfrac{7}{2}\right)\).

  1. \(\Gamma(5) = 4! = 24\).
  2. \(\Gamma\left(\tfrac{7}{2}\right) = \tfrac{5}{2}\cdot\tfrac{3}{2}\cdot\tfrac{1}{2}\cdot\Gamma\left(\tfrac{1}{2}\right)\).

Answer\(\Gamma(5) = 24\), \(\;\Gamma\left(\tfrac{7}{2}\right) = \dfrac{15\sqrt\pi}{8}\)

Example 2: Recognising Gamma

Easy

Evaluate \(\displaystyle\int_0^\infty x^4 e^{-x}\,dx\).

  1. This is \(\Gamma(n)\) with \(n - 1 = 4\), so \(n = 5\).

Answer\(\Gamma(5) = 24\)

Example 3: Using the standard form

Medium

Evaluate \(\displaystyle\int_0^\infty x^3 e^{-2x}\,dx\).

  1. Use \(\displaystyle\int_0^\infty e^{-ax}x^{n-1}\,dx = \frac{\Gamma(n)}{a^n}\) with \(a = 2\), \(n = 4\).
  2. \(\dfrac{\Gamma(4)}{2^4} = \dfrac{6}{16}\).

Answer\(\dfrac{3}{8}\)

Example 4: The Gaussian integral

Medium

Show that \(\displaystyle\int_0^\infty e^{-x^2}\,dx = \frac{\sqrt\pi}{2}\).

  1. Substitute \(x^2 = t\): \(x = t^{1/2}\), \(dx = \tfrac{1}{2}t^{-1/2}\,dt\).
  2. \(\displaystyle\int_0^\infty e^{-t}\cdot\tfrac{1}{2}t^{-1/2}\,dt = \tfrac{1}{2}\Gamma\left(\tfrac{1}{2}\right)\).

Answer\(\dfrac{\sqrt\pi}{2}\). This integral is the heart of the normal distribution in statistics.

Example 5: A logarithm integral

Exam level

Evaluate \(\displaystyle\int_0^1 x^2(\log x)^3\,dx\).

  1. Substitute \(x = e^{-t}\): \(\log x = -t\), \(dx = -e^{-t}dt\), and the limits \(0 \to 1\) become \(\infty \to 0\).
  2. \(\displaystyle\int_\infty^0 e^{-2t}(-t)^3(-e^{-t})\,dt = -\int_0^\infty t^3 e^{-3t}\,dt = -\frac{\Gamma(4)}{3^4}\).

Answer\(-\dfrac{6}{81} = -\dfrac{2}{27}\)

Example 6: A negative argument

Medium

Find \(\Gamma\left(-\tfrac{1}{2}\right)\).

  1. Use \(\Gamma(n) = \dfrac{\Gamma(n + 1)}{n}\) with \(n = -\tfrac{1}{2}\): \(\dfrac{\Gamma\left(\frac{1}{2}\right)}{-\frac{1}{2}}\).

Answer\(-2\sqrt\pi\)

Vipul Sir's tip

In any \(\int_0^\infty\) with \(e^{-\text{something}}\), first make the exponent a single variable \(t\) by substitution. The integral then almost always becomes \(\Gamma(n)\) times a constant.

05

Common mistakes

1. Off-by-one with \(n\)

\(\Gamma(n)\) has \(x^{n-1}\), so \(\int_0^\infty x^4e^{-x}\,dx = \Gamma(5)\), not \(\Gamma(4)\). And \(\Gamma(n) = (n - 1)!\), not \(n!\).

2. Forgetting the \(a^n\) in \(\dfrac{\Gamma(n)}{a^n}\)

With \(e^{-ax}\) instead of \(e^{-x}\), the substitution brings out \(\dfrac{1}{a^n}\).

3. Using \(\Gamma(0)\) or negative integers

\(\Gamma(n)\) is not defined at \(0, -1, -2, \dots\).

06

Practice questions

Try each one on paper before you open the answer.

Q1\(\Gamma(6)\)

\(5! = 120\).

Q2\(\Gamma\left(\tfrac{5}{2}\right)\)

\(\tfrac{3}{2}\cdot\tfrac{1}{2}\sqrt\pi = \dfrac{3\sqrt\pi}{4}\).

Q3\(\displaystyle\int_0^\infty x^6 e^{-3x}\,dx\)

\(\dfrac{\Gamma(7)}{3^7} = \dfrac{720}{2187} = \dfrac{80}{243}\).

Q4\(\displaystyle\int_0^\infty x^{3/2}e^{-4x}\,dx\)

\(\dfrac{\Gamma(5/2)}{4^{5/2}} = \dfrac{3\sqrt\pi/4}{32} = \dfrac{3\sqrt\pi}{128}\).

Q5\(\displaystyle\int_0^\infty e^{-x^3}\,dx\)

Put \(t = x^3\): \(\dfrac{1}{3}\displaystyle\int_0^\infty e^{-t}t^{-2/3}\,dt = \dfrac{1}{3}\Gamma\left(\tfrac{1}{3}\right) = \Gamma\left(\tfrac{4}{3}\right)\).

Q6\(\displaystyle\int_0^1(\log x)^4\,dx\)

Standard form with \(m = 0\), \(n = 4\): \(\dfrac{(-1)^4\,4!}{1^5} = 24\).

Q7\(\Gamma\left(-\tfrac{3}{2}\right)\)

\(\dfrac{\Gamma(-1/2)}{-3/2} = \dfrac{-2\sqrt\pi}{-3/2} = \dfrac{4\sqrt\pi}{3}\).

Stuck on a question?

Bring it to a free demo class and work through it with Vipul Sir. Book on WhatsApp.

07

Frequently asked questions

What is the Gamma function?

\(\Gamma(n) = \displaystyle\int_0^\infty e^{-x}x^{n-1}\,dx\) for \(n > 0\). It extends the factorial: \(\Gamma(n + 1) = n!\).

Why is Γ(1/2) = √π?

Substituting \(x = t^2\) turns \(\Gamma(\tfrac{1}{2})\) into \(2\displaystyle\int_0^\infty e^{-t^2}dt\), and that Gaussian integral equals \(\tfrac{\sqrt\pi}{2}\) (proved with a double integral in polar coordinates).

Where is the Gamma function used?

Probability distributions (gamma, chi-square, normal), evaluating difficult integrals, and through the Beta–Gamma relation, many trigonometric integrals.

Where the Gamma function leads next

← All 33 Calculus topics
Vipul Sir
Written by Vipul Sir

Vipul Sir has taught mathematics for over 15 years to HSC, CBSE, ICSE, IGCSE/IB, Diploma, Engineering and BSc students at VVS Classes in Goregaon and Vile Parle, Mumbai. He teaches every class himself, concepts first and exam technique second.

First-year Engineering Calculus

Get the whole course right, with Vipul Sir beside you.

Concept-first coaching in small batches in Goregaon and Vile Parle, from the mean value theorems to Gauss's divergence theorem.

WhatsApp↗