Calculate Euler's Gamma function \(\Gamma(z)\) for real numbers and half-integers. Features factorial extension \((z - 1)!\), Stirling's asymptotic approximation, and singularity poles curve plot.
Note: \(z = 0, -1, -2, -3, \dots\) are singularity poles (\(\pm\infty\)).
\(\Gamma(z + 1) = z \cdot \Gamma(z)\)
For integers: \(\Gamma(n) = (n - 1)!\)
\(\Gamma(z)\Gamma(1-z) = \frac{\pi}{\sin(\pi z)}\)
3.178054
Input any real number \(z\). Choose positive values, negative non-integers, or half-integers like \(0.5\).
View high-precision numeric values, exact \(\sqrt{\pi}\) closed forms, and equivalent factorial \((z - 1)!\).
Analyze Stirling's asymptotic formula accuracy and trace the curve between its vertical asymptotes.
In probability theory and mathematical statistics, the Gamma function normalizes the Student's t, Chi-square, and Gamma probability density functions.
Calculates factorials for fractions like \((1/2)! = \Gamma(3/2) = \frac{\sqrt{\pi}}{2}\), essential in fractional calculus and differential equations.
The volume of an \(n\)-dimensional sphere of radius \(R\) is \(V_n(R) = \frac{\pi^{n/2}}{\Gamma(n/2 + 1)} R^n\), calculated directly via \(\Gamma\).
In quantum mechanics, dimensional regularization uses the analytic continuation of \(\Gamma(z)\) to isolate divergent poles in Feynman loop integrals.
Implements the 9-coefficient Lanczos approximation combined with Euler's reflection formula to achieve double-precision accuracy.
Detects half-integer values \((2k + 1)/2\) and displays exact symbolic representations in terms of \(\sqrt{\pi}\).
Visualizes negative pole branches with dashed vertical asymptotes and places a tracking marker on the active evaluation point.
How do you compute the factorial of \(1/2\), \(3.7\), or \(-2.5\)? In 1729, Leonhard Euler solved this centuries-old mathematical puzzle by inventing the Gamma function, transforming factorials from a discrete ladder of integers into a smooth, continuous highway.
If you plot the points \((1, 0! = 1)\), \((2, 1! = 1)\), \((3, 2! = 2)\), \((4, 3! = 6)\), and \((5, 4! = 24)\) on a graph, factorials look like isolated islands with gaping voids in between. The Gamma function \(\Gamma(z)\) is the unique, infinitely smooth curve that threads through every single one of those islands while preserving the fundamental stepping-stone rule: each step multiplies by the current number (\(\Gamma(z+1) = z\Gamma(z)\)).
The biggest surprise for newcomers: \(\Gamma(n) = (n-1)!\). Because of historical integration definitions, the Gamma function is shifted by 1: \(\Gamma(1) = 0! = 1\), \(\Gamma(4) = 3! = 6\), and \(\Gamma(5) = 4! = 24\). Always subtract 1 for positive integers!
Evaluating the improper integral \(\int_0^\infty t^{-1/2} e^{-t}dt\) using the substitution \(t = u^2\) transforms it directly into the famous Gaussian integral \(\int_{-\infty}^\infty e^{-u^2}du = \sqrt{\pi}\). This links factorials directly to circles!
In statistics, the normalization constant of the Student's \(t\)-distribution, Chi-square (\(\chi^2\)) distribution, and Beta distribution depends entirely on \(\Gamma(z)\). In statistical mechanics, Stirling's approximation \(\ln(N!) \approx N\ln N - N\) derives entropy.
\(\Gamma(z)\) has infinite vertical asymptotes (poles) at \(z = 0, -1, -2, -3, \dots\). Evaluating at zero or negative integers is mathematically undefined (diverges to \(\pm \infty\)).
Never compute \(\Gamma(6)\) as \(6! = 720\). It is \(\Gamma(6) = (6 - 1)! = 5! = 120\). If a problem asks for \(x!\), you must compute \(\Gamma(x + 1)\).
While negative integers are undefined, negative fractions are fully defined! For example, \(\Gamma(-1/2) = -2\sqrt{\pi} \approx -3.5449\). Use Euler's reflection formula \(\Gamma(z)\Gamma(1-z) = \frac{\pi}{\sin(\pi z)}\).
| Attribute | Factorial (\(n!\)) | Gamma Function (\(\Gamma(z)\)) |
|---|---|---|
| Domain | Non-negative integers: \(\{0, 1, 2, 3, \dots\}\) | All Real & Complex numbers except \(\{0, -1, -2, \dots\}\) |
| Recurrence Relation | \(n! = n \times (n - 1)!\) | \(\Gamma(z + 1) = z \Gamma(z)\) |
| Value at Zero | \(0! = 1\) | \(\Gamma(0)\) is undefined (simple pole at \(\infty\)) |
| Half-Integer Evaluation | Undefined | Exact closed form multiples of \(\sqrt{\pi}\) |
Step 1: Apply reflection formula at \(z = 1/2\):
\[ \Gamma(1/2)\Gamma(1 - 1/2) = \Gamma(1/2)^2 = \frac{\pi}{\sin(\pi/2)} \]Step 2: Since \(\sin(\pi/2) = 1\), \(\Gamma(1/2)^2 = \pi\).
Step 3: Taking the positive square root gives: \(\Gamma(1/2) = \sqrt{\pi} \approx 1.77245385\).
Step 1: Use recurrence \(\Gamma(z+1) = z\Gamma(z)\):
\[ \Gamma(5/2) = \frac{3}{2} \cdot \Gamma(3/2) \]Step 2: Expand \(\Gamma(3/2) = \frac{1}{2}\Gamma(1/2) = \frac{1}{2}\sqrt{\pi}\).
Step 3: Substitute: \(\Gamma(5/2) = \frac{3}{2} \cdot \frac{\sqrt{\pi}}{2} = \frac{3\sqrt{\pi}}{4} \approx 1.32934039\).