Β

Beta Function Calculator

Compute B(x,y) = Γ(x)·Γ(y)/Γ(x+y) — Euler integral of the first kind with step-by-step solution

Quick Examples

What is the Beta Function?

The beta function B(x,y) — also written Β(α,β) using Greek letters — is a special mathematical function known as the Euler integral of the first kind. It is defined for all real numbers x > 0 and y > 0 by the integral:

B(x,y) = ∫₀¹ t^(x-1) · (1-t)^(y-1) dt

The beta function is intimately connected to the gamma function Γ, which generalises the factorial to real and complex numbers. The connection is expressed as:

B(x,y) = Γ(x)·Γ(y) / Γ(x+y)

This relationship allows the beta function to be computed efficiently for any positive real arguments using the Lanczos approximation for the gamma function — exactly what this calculator does. The domain is strictly x > 0 and y > 0; the function is undefined (diverges) at zero and negative integers.

Beta Function Formula

The beta function satisfies several important identities:

Integral definition: B(x,y) = ∫₀¹ t^(x-1)(1-t)^(y-1) dt
Gamma relationship: B(x,y) = Γ(x)·Γ(y) / Γ(x+y)
Symmetry property: B(x,y) = B(y,x)
Recurrence: B(x+1,y) = x/(x+y) · B(x,y)
Special case: B(x,1) = 1/x

The symmetry property B(x,y) = B(y,x) follows immediately from the gamma formula because Γ(x)Γ(y) = Γ(y)Γ(x) and Γ(x+y) = Γ(y+x). The recurrence relation links B(x+1,y) to B(x,y), enabling efficient computation for integer arguments.

Special Values Table

x y B(x,y) Notes
111B(1,1) = Γ(1)²/Γ(2) = 1
1/21/2π ≈ 3.14159Famous result via Γ(½)=√π
221/6 ≈ 0.16667Γ(2)²/Γ(4) = 1/6
231/12 ≈ 0.08333Γ(2)Γ(3)/Γ(5) = 1/12
331/30 ≈ 0.03333Γ(3)²/Γ(6) = 1/30
1n1/nGeneral: B(1,n) = 1/n

Worked Examples

Example 1 — B(2, 3)

Using the gamma relationship with Γ(n) = (n−1)! for positive integers:

Γ(2) = 1! = 1
Γ(3) = 2! = 2
Γ(2+3) = Γ(5) = 4! = 24
B(2,3) = Γ(2)·Γ(3) / Γ(5) = 1·2 / 24 = 2/24 = 1/12 ≈ 0.083333

This can also be verified via the integral: ∫₀¹ t(1-t)² dt = ∫₀¹ (t - 2t² + t³) dt = 1/2 − 2/3 + 1/4 = 1/12.

Example 2 — B(1/2, 1/2) = π

One of the most celebrated identities in mathematical analysis:

Γ(1/2) = √π (from the Gaussian integral)
Γ(1/2 + 1/2) = Γ(1) = 1
B(1/2, 1/2) = Γ(1/2)·Γ(1/2) / Γ(1) = √π · √π / 1 = π

This result connects the beta function to the circle constant π via the integral ∫₀¹ t^(-1/2)(1-t)^(-1/2) dt = π.

Example 3 — B(1, n) = 1/n

For any positive integer (or real) n:

B(1, n) = Γ(1)·Γ(n) / Γ(1+n) = 1·Γ(n) / (n·Γ(n)) = 1/n

This generalises the harmonic series: B(1,1)=1, B(1,2)=1/2, B(1,3)=1/3, and so on. For non-integer n the same formula holds exactly.

Applications of the Beta Function

  • Probability — Beta distribution: The beta distribution PDF f(x;α,β) = x^(α-1)(1-x)^(β-1) / B(α,β) models random variables confined to [0,1], such as proportions, probabilities, and rates.
  • Bayesian statistics: The beta distribution is the conjugate prior for the Bernoulli and binomial likelihood, making it the workhorse of Bayesian A/B testing and click-through-rate modelling.
  • Combinatorics: The binomial coefficient C(n,k) satisfies 1/((n+1)·B(k+1, n-k+1)) = C(n,k), linking combinatorics directly to the beta function.
  • Physics — Scattering amplitudes: The Veneziano amplitude in early string theory is expressed as a sum of beta functions B(−α(s), −α(t)), a historically important result.
  • Integration: Many definite integrals involving powers of trigonometric functions reduce to beta function values via the substitution t = sin²θ.
  • Signal processing: The beta distribution models noise and channel error probabilities in certain communication systems.

Frequently Asked Questions

What is the beta function?
The beta function B(x,y), also written Β(α,β), is a special mathematical function defined by the Euler integral of the first kind: B(x,y) = ∫₀¹ t^(x-1)(1-t)^(y-1) dt, for x>0 and y>0. It arises naturally in probability theory, statistics, combinatorics, and physics, and is intimately connected to the gamma function via B(x,y) = Γ(x)Γ(y)/Γ(x+y).
What is the formula for B(x,y)?
The beta function has two equivalent forms: the integral definition B(x,y) = ∫₀¹ t^(x-1)(1-t)^(y-1) dt, and the gamma function relationship B(x,y) = Γ(x)·Γ(y) / Γ(x+y). Both produce identical results for x>0 and y>0. In practice, the gamma relationship is used for numerical computation.
What is the relationship between beta and gamma function?
The beta function is directly related to the gamma function by: B(x,y) = Γ(x)·Γ(y) / Γ(x+y). The gamma function itself generalises the factorial: Γ(n) = (n-1)! for positive integers, and Γ(1/2) = √π. For positive integers m and n: B(m,n) = (m-1)!(n-1)! / (m+n-1)!, directly linking the beta function to combinatorics.
Why is B(1/2, 1/2) = π?
B(1/2, 1/2) = Γ(1/2)·Γ(1/2) / Γ(1) = (√π · √π) / 1 = π. This relies on the well-known identity Γ(1/2) = √π, which itself follows from the Gaussian integral ∫₋∞^∞ e^(-t²) dt = √π. This is one of the most famous special values in all of mathematics, connecting the integral of powers of polynomials on [0,1] to the circle constant π.
Is B(x,y) = B(y,x)?
Yes. The beta function is symmetric: B(x,y) = B(y,x) for all x>0 and y>0. This follows immediately from the gamma formula — since Γ(x)Γ(y) = Γ(y)Γ(x) and Γ(x+y) = Γ(y+x), both orderings give the same result. It can also be proved by substituting t → (1-t) directly in the integral definition.
What is the domain of the beta function?
The beta function B(x,y) is defined for all real numbers x>0 and y>0. For complex arguments, it is defined when the real parts of both x and y are positive. The function diverges (becomes infinite) at x=0 or y=0, and also at negative integers. This is why this calculator requires both inputs to be strictly greater than zero.
How is the beta function used in statistics?
The beta function is the normalizing constant for the beta distribution: f(x;α,β) = x^(α-1)(1-x)^(β-1) / B(α,β). This distribution is used in Bayesian inference as a conjugate prior for binomial proportions, making it fundamental in A/B testing, conversion-rate optimisation, click-through modelling, and reliability engineering. The incomplete beta function (a generalisation) gives the CDF and is used to compute p-values for the F-test and t-test.