How to find the factorial of a fraction?

From what I know, the factorial function is defined as follows:

$$n! = n(n-1)(n-2) \cdots(3)(2)(1)$$

And $0! = 1$. However, this page seems to be saying that you can take the factorial of a fraction, like, for instance, $\frac{1}{2}!$, which they claim is equal to $\frac{1}{2}\sqrt\pi$ due to something called the gamma function. Moreover, they start getting the factorial of negative numbers, like $-\frac{1}{2}! = \sqrt{\pi}$

How is this possible? What is the definition of the factorial of a fraction? What about negative numbers?

I tried researching it on Wikipedia and such, but there doesn't seem to be a clear-cut answer.


Solution 1:

The gamma function is defined by the following integral, which converges for real $s>0$: $$\Gamma(s)=\int_0^\infty t^{s-1}e^{-t}dt.$$

The function can also be extended into the complex plane, if you're familiar with that subject. I'll assume not and just let $s$ be real.

This function is like the factorial in the when $s$ is a positive integer, say $s=n$, it satisfies $\Gamma(n)=(n-1)!$. It generalizes the factorial in the sense that it is the factorial for positive integer arguments, and is also well-defined for positive rational (and even real) numbers. This is what it means to take a "rational factorial," but I would hesitate to call it that. Many functions have those two properties, and $\Gamma$ is chosen out of all of them because it is the most useful in other applications. Rather than the notation used in that article you refer to, it would be more accurate for you to say that "the gamma function takes these values for these arguments." Gamma is not a function that intends to generalize factorials; rather, generalizing factorials came along as something of an accident following the definition. Its true purpose is deeper.

As for why $\Gamma(1/2)=\sqrt{\pi}$, this comes out of an interesting property of the $\Gamma$ function: some of them are here http://en.wikipedia.org/wiki/Gamma_function#Properties. The property you are interested in is the reflection formula: $$\Gamma(1-z)\Gamma(z)=\frac{\pi}{\sin(\pi z)}.$$ Set $z=1/2$ in the formula to get the desired identity.

If you want to learn more about the gamma function, the hard way is to learn a lot more math, in particular real and complex analysis. An easier way is to read this excellent set of notes: http://www.sosmath.com/calculus/improper/gamma/gamma.html.

Solution 2:

The gamma function, shown with a Greek capital gamma $\Gamma$, is a function that extends the factorial function to all real numbers, except to the negative integers and zero, for which it is not defined. $\Gamma(x)$ is related to the factorial in that it is equal to $(x-1)!$. The function is defined as

$$\Gamma(z) = \frac{1}{z} \prod_{n=1}^\infty \frac{\left(1+\frac{1}{n}\right)^z}{1+\frac{z}{n}}$$

Simply use this to compute factorials for any number. A handy way of calculating for real fractions with even denominators is:

$$\Gamma(\tfrac12 + n) = {(2n)! \over 4^n n!} \sqrt{\pi}$$

Where n is an integer. But keep in mind that the gamma function is actually the factorial of 1 less than the number than it evaluates, so if you want $\frac{3}{2}!$ use n = 2 instead of 1.

Or, you could just put the fraction into Google Calculator, which uses the gamma function to evaluate factorials of any number.

For some more examples of the gamma function's values, see here.

(If you don't understand this, don't worry, because I don't either, and the Wikipedia article on the function seems to lack a clear-cut definition of it or how it relates to $\sqrt{\pi}$.)

Solution 3:

While the answer unquestionably being Euler's $\Gamma$, I still wondered what could be a further intuitive explnation of why it is so.

I think, it is somehow more understandable for the closely related Beta function and in view of the sine-involving formula mentioned in the answer by neuguy above.

Look at $\sin(\pi z)$. Its zeros are precisely all integers. That's why it is periodic - it has to return to zero at each integer, and exactly in the same way as at any other integer.

In fact there is a formula (I think by Euler)$$\cdots(1-\frac z{-3})(1-\frac z{-2})(1-\frac z{-1})z(1-\frac z1)(1-\frac z2)(1-\frac z3)\cdots=\frac1\pi\sin(\pi z)$$reflecting precisely that.

Now suppose we want to find out what will happen if we will exclude $0$, $1$, ..., $n$ from the set of zeros. The resulting function will remain zero at all other integers, while in the interval $-1<z<n+1$ it will "bump up" to the extent we have freed it from being zero. And it turns out that the precise measure of this "bump" is given by the binomial coefficients.

Namely, let$$F_n(z):=\cdots(1-\frac z{-3})(1-\frac z{-2})(1-\frac z{-1})(1-\frac z{n+1})(1-\frac z{n+2})(1-\frac z{n+3})\cdots=\frac{\frac1\pi\sin(\pi z)}{z(1-\frac z1)(1-\frac z2)\cdots(1-\frac zn)},$$then it turns out that $F_n(z)=\binom nz$.

For example:

\begin{array}{rcl} z & F_4(z) & \textrm{(numerically)}\\ \vdots&\vdots&\vdots\\ -2 & 0 & 0. \\ -1.75 & -\frac{4096 \sqrt{2}}{168245 \pi } & -0.0109593 \\ -1.5 & -\frac{256}{3465 \pi } & -0.0235173 \\ -1.25 & -\frac{4096 \sqrt{2}}{69615 \pi } & -0.0264864 \\ -1 & 0 & 0. \\ -0.75 & \frac{4096 \sqrt{2}}{21945 \pi } & 0.0840213 \\ -0.5 & \frac{256}{315 \pi } & 0.25869 \\ -0.25 & \frac{4096 \sqrt{2}}{3315 \pi } & 0.556214 \\ 0 & 1 & 1. \\ 0.25 & \frac{4096 \sqrt{2}}{1155 \pi } & 1.59641 \\ 0.5 & \frac{256}{35 \pi } & 2.32821 \\ 0.75 & \frac{4096 \sqrt{2}}{585 \pi } & 3.15188 \\ 1 & 4 & 4. \\ 1.25 & \frac{4096 \sqrt{2}}{385 \pi } & 4.78922 \\ 1.5 & \frac{256}{15 \pi } & 5.43249 \\ 1.75 & \frac{4096 \sqrt{2}}{315 \pi } & 5.85349 \\ 2 & 6 & 6. \\ 2.25 & \frac{4096 \sqrt{2}}{315 \pi } & 5.85349 \\ 2.5 & \frac{256}{15 \pi } & 5.43249 \\ 2.75 & \frac{4096 \sqrt{2}}{385 \pi } & 4.78922 \\ 3 & 4 & 4. \\ 3.25 & \frac{4096 \sqrt{2}}{585 \pi } & 3.15188 \\ 3.5 & \frac{256}{35 \pi } & 2.32821 \\ 3.75 & \frac{4096 \sqrt{2}}{1155 \pi } & 1.59641 \\ 4 & 1 & 1. \\ 4.25 & \frac{4096 \sqrt{2}}{3315 \pi } & 0.556214 \\ 4.5 & \frac{256}{315 \pi } & 0.25869 \\ 4.75 & \frac{4096 \sqrt{2}}{21945 \pi } & 0.0840213 \\ 5 & 0 & 0. \\ 5.25 & -\frac{4096 \sqrt{2}}{69615 \pi } & -0.0264864 \\ 5.5 & -\frac{256}{3465 \pi } & -0.0235173 \\ 5.75 & -\frac{4096 \sqrt{2}}{168245 \pi } & -0.0109593 \\ 6 & 0 & 0. \\ 6.25 & \frac{4096 \sqrt{2}}{348075 \pi } & 0.00529727 \\ 6.5 & \frac{256}{15015 \pi } & 0.00542706 \\ 6.75 & \frac{4096 \sqrt{2}}{648945 \pi } & 0.0028413 \\ 7 & 0 & 0. \\ \vdots & \vdots & \vdots \end{array}

The way all this relates to factorials and $\Gamma$ should be clear - one has$$\binom nz=\frac{n!}{z!(n-z)!},\ \Gamma(x)=\frac{x!}x$$and$$\mathrm B(x,y)=\frac{\Gamma(x)\Gamma(y)}{\Gamma(x+y)}.$$In other words, $1/\Gamma(z)$ has zeros precisely at nonpositive integers, so $1/\Gamma(k-z)$ has zeros precisely at $k$, $k+1$, $k+2$, ..., so if we want to combine these for a function with zeros at all integers except $0$, $1$, ..., $n$ we should take $\frac1{\Gamma(1+z)\Gamma(n+1-z)}$ which turns out to be $\frac1{n!}\binom nz$.