Calculus · Integrals with a Parameter

The Euler Integrals: Meet the Beta and Gamma Functions

What is \( \left(\tfrac12\right)! \)? The question sounds meaningless until you meet the Gamma function, which extends the factorial to non-integer numbers. Together with its sibling, the Beta function, it turns a huge class of difficult integrals into simple arithmetic. This post introduces both and shows how to use them.

1. The Beta function

Definition · Euler integral of the first kind For \(a > 0\) and \(b > 0\), \[ \mathrm B(a, b) = \int_0^1 x^{a-1}(1 - x)^{b-1}\,dx. \]

Why \(a, b > 0\)? The integral is improper at both ends when the exponents are negative. Near \(x = 0\) the integrand behaves like \(x^{a-1}\), which is integrable exactly when \(a - 1 > -1\), i.e. \(a > 0\). Near \(x = 1\) it behaves like \((1 - x)^{b-1}\), integrable exactly when \(b > 0\). (These are the p-integral rules from the posts on improper integrals.)

When \(a\) and \(b\) are natural numbers, the integrand is just a polynomial, and the Beta function is an ordinary definite integral. For example, \( \mathrm B(2, 2) = \int_0^1 x(1 - x)\,dx = \frac16 \). The power of the Beta function is that it works for any positive exponents.

2. Properties of the Beta function

2.1 Symmetry

The substitution \(x = 1 - t\) swaps the two factors:

\[ \mathrm B(a, b) = \mathrm B(b, a). \]

2.2 The recursion formula

Recursion For \(b > 1\), \[ \mathrm B(a, b) = \frac{b - 1}{a + b - 1}\,\mathrm B(a, b - 1). \] If \(b = n > 1\) is a natural number, this is a recursion that lowers the second argument step by step: \[ \mathrm B(a, n) = \frac{n - 1}{a + n - 1}\,\mathrm B(a, n - 1). \]

Where it comes from. Integrate by parts with \( u = (1 - x)^{b-1} \), \( dv = x^{a-1}dx \):

\[ \mathrm B(a, b) = \underbrace{\Big[\tfrac{x^a}{a}(1 - x)^{b-1}\Big]_0^1}_{=0} + \frac{b - 1}{a}\int_0^1 x^a(1 - x)^{b-2}\,dx. \]

Now write \( x^a = x^{a-1} - x^{a-1}(1 - x) \), so the last integral equals \( \mathrm B(a, b - 1) - \mathrm B(a, b) \). Therefore

\[ a\,\mathrm B(a, b) = (b - 1)\big[\mathrm B(a, b - 1) - \mathrm B(a, b)\big] \;\Longrightarrow\; (a + b - 1)\,\mathrm B(a, b) = (b - 1)\,\mathrm B(a, b - 1). \]

2.3 Natural-number arguments

Applying the recursion repeatedly until the second argument reaches 1, and using \( \mathrm B(a, 1) = \int_0^1 x^{a-1}dx = \frac1a \), we get for natural numbers \(m, n\):

Formula \[ \mathrm B(m, n) = \frac{(m - 1)!\,(n - 1)!}{(m + n - 1)!}. \] In particular \( \mathrm B(1, 1) = 1 \).
Example 1 \( \displaystyle\int_0^1 x^4(1 - x)^3\,dx = \mathrm B(5, 4) = \frac{4!\,3!}{8!} = \frac{24\cdot 6}{40320} = \frac{1}{280}. \)

Without the Beta function you would have to expand \((1 - x)^3\) and integrate four terms.

2.4 Two other useful forms

Different substitutions give equivalent formulas that are often easier to recognise:

3. The Gamma function

Definition · Euler integral of the second kind For \(a > 0\), \[ \Gamma(a) = \int_0^\infty x^{a-1}e^{-x}\,dx. \]

In the previous posts we showed that this integral converges for every \(a > 0\) (the exponential wins at infinity; at \(0\) the integrand behaves like \(x^{a-1}\)), and that it converges uniformly on every interval \([\alpha, \beta] \subset (0, \infty)\), so \(\Gamma\) is continuous. In fact it is infinitely differentiable, by Leibniz's rule.

3.1 The functional equation

Key property \[ \Gamma(a + 1) = a\,\Gamma(a). \]

Proof: integrate by parts with \( u = x^a \), \( dv = e^{-x}dx \):

\[ \Gamma(a + 1) = \int_0^\infty x^ae^{-x}\,dx = \underbrace{\big[-x^ae^{-x}\big]_0^\infty}_{=0} + a\int_0^\infty x^{a-1}e^{-x}\,dx = a\,\Gamma(a). \]

3.2 Gamma extends the factorial

Since \( \Gamma(1) = \int_0^\infty e^{-x}dx = 1 \), the functional equation gives \( \Gamma(2) = 1 \), \( \Gamma(3) = 2 \), \( \Gamma(4) = 3\cdot 2 = 6 \), and in general

\[ \Gamma(n + 1) = n! \qquad (n = 0, 1, 2, \dots). \]

So \(\Gamma\) is a smooth curve passing through all the factorials, shifted by one. Note: \( \Gamma(1) = \Gamma(2) = 1 \), which matches \(0! = 1! = 1\).

Watch the shift It is \( \Gamma(n + 1) = n! \), not \( \Gamma(n) = n! \). A quick check: \( \Gamma(1) = 0! = 1 \). The same shift appears in the Beta formula above, which has \((m - 1)!\) and not \(m!\).

4. \(\Gamma\big(\tfrac12\big) = \sqrt\pi\) and half-integers

Substitute \(x = t^2\) (\(dx = 2t\,dt\)) in the definition:

\[ \Gamma\Big(\frac12\Big) = \int_0^\infty x^{-1/2}e^{-x}\,dx = \int_0^\infty \frac{1}{t}e^{-t^2}\,2t\,dt = 2\int_0^\infty e^{-t^2}\,dt = 2\cdot\frac{\sqrt\pi}{2} = \sqrt\pi, \]

using the Gaussian integral computed in the previous post. So the answer to the opening question is \( \left(\tfrac12\right)! = \Gamma\big(\tfrac32\big) = \tfrac12\Gamma\big(\tfrac12\big) = \frac{\sqrt\pi}{2} \).

Applying the functional equation \(n\) times:

\[ \Gamma\Big(n + \frac12\Big) = \Big(n - \frac12\Big)\Big(n - \frac32\Big)\cdots\frac12\,\Gamma\Big(\frac12\Big) = \frac{1\cdot 3\cdot 5\cdots(2n - 1)}{2^n}\sqrt\pi. \]
Example 2 \( \Gamma\big(\tfrac52\big) = \tfrac32\cdot\tfrac12\sqrt\pi = \tfrac34\sqrt\pi \), so \[ \int_0^\infty x^{3/2}e^{-x}\,dx = \frac{3\sqrt\pi}{4}. \]

5. The reflection formula and negative arguments

Reflection formula (Euler) For \(a\) not an integer, \[ \Gamma(a)\,\Gamma(1 - a) = \frac{\pi}{\sin \pi a}. \]

Check it at \( a = \frac12 \): \( \Gamma\big(\frac12\big)^2 = \frac{\pi}{\sin(\pi/2)} = \pi \), consistent with \( \Gamma\big(\frac12\big) = \sqrt\pi \). For \(0 < a < 1\) it follows from the Beta-Gamma relation below (see Problem 6).

Extending Gamma to negative numbers

The integral definition only works for \(a > 0\). But the functional equation, read backwards as \( \Gamma(a) = \frac{\Gamma(a + 1)}{a} \), lets us define \(\Gamma\) for negative non-integers: step up until the argument is positive. The reflection formula gives the same values directly, which is how it allows Gamma to be extended to negative arguments.

Example 3 \( \Gamma\big(-\tfrac12\big) = \dfrac{\Gamma\big(\frac12\big)}{-\frac12} = -2\sqrt\pi \).

Check with reflection (\(a = -\frac12\)): \( \Gamma\big(-\frac12\big)\Gamma\big(\frac32\big) = \frac{\pi}{\sin(-\pi/2)} = -\pi \), so \( \Gamma\big(-\frac12\big) = \frac{-\pi}{\sqrt\pi/2} = -2\sqrt\pi \). Same answer.

At \(a = 0, -1, -2, \dots\) the Gamma function is not defined: the recursion would require dividing by zero, and \(|\Gamma(a)| \to \infty\) near these points (in the reflection formula, \(\sin\pi a = 0\) there).

6. The bridge: \( \mathrm B(a, b) = \frac{\Gamma(a)\Gamma(b)}{\Gamma(a+b)} \)

Beta-Gamma relation For \(a, b > 0\), \[ \mathrm B(a, b) = \frac{\Gamma(a)\,\Gamma(b)}{\Gamma(a + b)}. \]

This is the formula that makes both functions practical: compute Beta integrals using known Gamma values. For natural numbers it reduces to the factorial formula of Section 2.3.

A proof using the tools from the previous post. For \(t > 0\), the substitution \(x = (1 + t)s\) in the definition of \(\Gamma\) gives

\[ \frac{\Gamma(a + b)}{(1 + t)^{a+b}} = \int_0^\infty s^{a+b-1}e^{-(1+t)s}\,ds. \]

Multiply by \(t^{a-1}\), integrate in \(t\), and use the infinite-interval form of \(\mathrm B\):

\[ \Gamma(a + b)\,\mathrm B(a, b) = \int_0^\infty t^{a-1}\,dt\int_0^\infty s^{a+b-1}e^{-(1+t)s}\,ds. \]

The integrand is positive, so the order of integration may be swapped. The inner integral in \(t\) is \( \int_0^\infty t^{a-1}e^{-ts}\,dt = \frac{\Gamma(a)}{s^a} \), hence

\[ \Gamma(a + b)\,\mathrm B(a, b) = \Gamma(a)\int_0^\infty s^{b-1}e^{-s}\,ds = \Gamma(a)\,\Gamma(b). \]

7. Using Beta and Gamma to evaluate integrals

The general technique: use a substitution to bring the integral to one of the standard forms, then read off the answer.

If the integral looks like……recognise it as
\( \int_0^\infty x^{p}e^{-x}\,dx \)\( \Gamma(p + 1) \)
\( \int_0^\infty x^{p}e^{-x^q}\,dx \)substitute \( t = x^q \) → Gamma
\( \int_0^1 x^{p}(1 - x)^{q}\,dx \)\( \mathrm B(p + 1, q + 1) \)
\( \int_0^{\pi/2} \sin^{p}\varphi\cos^{q}\varphi\,d\varphi \)\( \frac12\mathrm B\big(\frac{p+1}{2}, \frac{q+1}{2}\big) \)
\( \int_0^\infty \frac{t^{p}}{(1 + t)^{q}}\,dt \)\( \mathrm B(p + 1, q - p - 1) \)
Example 4 · Powers of sine \[ \int_0^{\pi/2} \sin^6x\,dx = \frac12\mathrm B\Big(\frac72, \frac12\Big) = \frac12\cdot\frac{\Gamma\big(\frac72\big)\Gamma\big(\frac12\big)}{\Gamma(4)} = \frac12\cdot\frac{\frac{15}{8}\sqrt\pi\cdot\sqrt\pi}{6} = \frac{5\pi}{32}. \] (This agrees with Wallis' formula \( \frac56\cdot\frac34\cdot\frac12\cdot\frac\pi2 \).)
Example 5 · A substitution to Beta \( \displaystyle\int_0^1 x^2\sqrt{1 - x^2}\,dx \). Put \( t = x^2 \), \( dx = \frac12t^{-1/2}dt \): \[ \frac12\int_0^1 t^{1/2}(1 - t)^{1/2}\,dt = \frac12\mathrm B\Big(\frac32, \frac32\Big) = \frac12\cdot\frac{\Gamma\big(\frac32\big)^2}{\Gamma(3)} = \frac12\cdot\frac{\pi/4}{2} = \frac{\pi}{16}. \]
Example 6 · Using the reflection formula \( \displaystyle\int_0^\infty \frac{dx}{1 + x^4} \). Put \( t = x^4 \), \( dx = \frac14t^{-3/4}dt \): \[ \frac14\int_0^\infty \frac{t^{-3/4}}{1 + t}\,dt = \frac14\mathrm B\Big(\frac14, \frac34\Big) = \frac14\,\Gamma\Big(\frac14\Big)\Gamma\Big(\frac34\Big) = \frac14\cdot\frac{\pi}{\sin(\pi/4)} = \frac{\pi}{2\sqrt2}. \] We never needed the value of \( \Gamma\big(\frac14\big) \) itself, only the product given by reflection.
Example 7 · A substitution to Gamma For \(n > 0\), with \( t = x^n \), \( dx = \frac1n t^{1/n - 1}dt \): \[ \int_0^\infty e^{-x^n}\,dx = \frac1n\int_0^\infty t^{\frac1n - 1}e^{-t}\,dt = \frac1n\Gamma\Big(\frac1n\Big) = \Gamma\Big(1 + \frac1n\Big). \] For \(n = 2\) this gives \( \Gamma\big(\frac32\big) = \frac{\sqrt\pi}{2} \), the Gaussian integral again.

8. Summary

FormulaValidity
\( \mathrm B(a, b) = \int_0^1 x^{a-1}(1 - x)^{b-1}\,dx \)\(a, b > 0\)
\( \mathrm B(a, b) = \mathrm B(b, a) \)\(a, b > 0\)
\( \mathrm B(a, b) = \frac{b-1}{a+b-1}\mathrm B(a, b - 1) \)\(a > 0,\ b > 1\)
\( \mathrm B(m, n) = \frac{(m-1)!(n-1)!}{(m+n-1)!} \)\(m, n \in \mathbb N\)
\( \Gamma(a) = \int_0^\infty x^{a-1}e^{-x}\,dx \)\(a > 0\)
\( \Gamma(a + 1) = a\Gamma(a) \), \( \Gamma(n + 1) = n! \)\(a > 0\), \(n = 0, 1, 2, \dots\)
\( \Gamma\big(\frac12\big) = \sqrt\pi \), \( \Gamma\big(n + \frac12\big) = \frac{(2n-1)!!}{2^n}\sqrt\pi \)\(n \in \mathbb N\)
\( \Gamma(a)\Gamma(1 - a) = \frac{\pi}{\sin\pi a} \)\(a \notin \mathbb Z\)
\( \mathrm B(a, b) = \frac{\Gamma(a)\Gamma(b)}{\Gamma(a + b)} \)\(a, b > 0\)

9. Practice problems

Try these before opening the solution. More solved problems are in Definite Integrals.

Problem 1: Compute \( \displaystyle\int_0^1 x^2(1 - x)^5\,dx \).

\( \mathrm B(3, 6) = \frac{2!\,5!}{8!} = \frac{240}{40320} = \frac{1}{168} \).

Problem 2: Compute \( \Gamma\big(\tfrac72\big) \) and \( \Gamma\big(-\tfrac32\big) \).

\( \Gamma\big(\frac72\big) = \frac52\cdot\frac32\cdot\frac12\sqrt\pi = \frac{15\sqrt\pi}{8} \). \( \Gamma\big(-\frac32\big) = \frac{\Gamma(-1/2)}{-3/2} = \frac{-2\sqrt\pi}{-3/2} = \frac{4\sqrt\pi}{3} \).

Problem 3: Compute \( \displaystyle\int_0^\infty x^6e^{-2x}\,dx \).

Put \(t = 2x\): \( \frac{1}{2^7}\int_0^\infty t^6e^{-t}\,dt = \frac{6!}{128} = \frac{720}{128} = \frac{45}{8} \).

Problem 4: Compute \( \displaystyle\int_0^{\pi/2} \sin^4x\cos^2x\,dx \).

\( \frac12\mathrm B\big(\frac52, \frac32\big) = \frac12\cdot\frac{\Gamma(5/2)\Gamma(3/2)}{\Gamma(4)} = \frac12\cdot\frac{\frac34\sqrt\pi\cdot\frac12\sqrt\pi}{6} = \frac{\pi}{32} \).

Problem 5: Compute \( \displaystyle\int_0^\infty x^4e^{-x^2}\,dx \).

Put \(t = x^2\), \(dx = \frac12t^{-1/2}dt\): \( \frac12\int_0^\infty t^{3/2}e^{-t}\,dt = \frac12\Gamma\big(\frac52\big) = \frac{3\sqrt\pi}{8} \).

Problem 6: Show that \( \displaystyle\int_0^\infty \frac{x^{a-1}}{1 + x}\,dx = \frac{\pi}{\sin\pi a} \) for \(0 < a < 1\).

By the infinite-interval form, the integral equals \( \mathrm B(a, 1 - a) = \frac{\Gamma(a)\Gamma(1 - a)}{\Gamma(1)} = \Gamma(a)\Gamma(1 - a) \). Evaluating this integral independently (for example with complex analysis) gives \( \frac{\pi}{\sin\pi a} \), which is exactly how the reflection formula is proved for \(0 < a < 1\).

Problem 7: Compute \( \displaystyle\int_0^1 \frac{dx}{\sqrt{1 - x^3}} \) in terms of the Gamma function.

Put \(t = x^3\), \(dx = \frac13t^{-2/3}dt\): \( \frac13\int_0^1 t^{-2/3}(1 - t)^{-1/2}\,dt = \frac13\mathrm B\big(\frac13, \frac12\big) = \frac{\Gamma(1/3)\Gamma(1/2)}{3\,\Gamma(5/6)} = \frac{\sqrt\pi\,\Gamma(1/3)}{3\,\Gamma(5/6)} \). (Not every answer simplifies to elementary constants, and that's fine.)

Final thoughts

The Beta and Gamma functions show the whole "integrals with a parameter" theory paying off: they are defined by improper integrals, their continuity comes from uniform convergence, their key formulas come from integration by parts and changing the order of integration. In return, they give you a short table of values that replaces pages of integration. The workflow to remember: substitute until you see a standard form, then let \(\Gamma\) do the arithmetic.

Next in the series: the Fourier integral, which builds a non-periodic function out of waves.