# 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.

• Gamma functions is sort of an extension of the concept of factorials to fractions. – user67773 May 20 '13 at 3:12
• I wrote an answer to this on a similar question. (P.S. If anyone thinks they can explain that better, please write it up as an answer!) EDIT: Did not realize that this question was from 2013. Whoops. – Akiva Weinberger Feb 23 '15 at 7:36
• It is most likely of interest that you would want to check this link](arxiv.org/pdf/math/0403510v1.pdf) out, as it provides the exact values for $\Gamma(a/b)$ whenever $b$ divides into $120$ as well as the methods required to generalize this into closed form. – Simply Beautiful Art Nov 29 '16 at 0:14

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.

• The gamma function is also really nice amongst the family of generalizations of the factorial because it is logarithmically convex. I believe you can show that it is the unique such generalization that is logarithmically convex. – Cameron Williams May 20 '13 at 5:31
• @CameronWilliams this is in fact a theorem due to Bohr and Mollerup: en.wikipedia.org/wiki/Bohr%E2%80%93Mollerup_theorem – Jacopo Notarstefano May 20 '13 at 7:54
• @kigen It is a fairly simple question that doesn't really warrant a new question. $\Gamma(n)=(n-1)!$. Why wasn't it defined as $\Gamma(n)=n!$ – JP McCarthy Nov 13 '13 at 10:54
• @JpMcCarthy You'd get a better and more detailed response if you posted this as a new question. The best answer I can give you right now is that, like I've mentioned in my answer, $\Gamma$ was not defined to generalize factorials. If you're still not satisfied, you can define $\Delta(x) = \Gamma(x+1)$, and then $\Delta$ will satisfy $\Delta(n) = n!$. But I don't see that there's any value to $\Delta$ over $\Gamma$, especially since the analytic continuation of $\Gamma$ is aesthetically nicer (cuts off at real part $0$ nicely). – Gyu Eun Lee Nov 13 '13 at 11:23

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}$.)

• It would be nice to know why the infinite product is equal to the factorial for natural numbers, and why $\Gamma(n) = (n-1)\Gamma(n-1)$ for all values. The formula you gave works for real fractions with denominator $2$, not any even number. If you can't say anything about how to evaluate infinite products, about where that product comes from, the poles of the Gamma function, the relationship with $\sin$ or the product expression for $\pi$, it's not clear why you bothered to try and answer. – jwg May 20 '13 at 8:24

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$.

• Nice! I've never seen this before! (By the way, I should mention that this question was asked in 2013.) – Akiva Weinberger Feb 23 '15 at 7:44
• I also attempted a more basic explanation here, by the way. – Akiva Weinberger Feb 23 '15 at 7:45

A first idea that comes to mind to define the factorial of a fractional number is interpolation: knowing the values at two successive integers, the values between these should be intermediate (looking at the "curve", you see that it is growing - very fast - but smoothly).

For instance, you could estimate that $3.1! = 3! + 0.1\times(4!-3!)=7.8$.

This does not look very accurate. By considering at the values of $\ln n!$, you see a trend much closer to a straight line.

So for better "accuracy", you can imagine that the curve is a exponential and do the interpolation on the logarithms: $\ln 3.1!=\ln 3!+0.1(\ln 4!-\ln 3!)\implies 3.1!=6.8921\cdots$

You can also increase the number of points use for interpolation, with the Lagrangian formula that computes a polynomial of a higher degree.

Anyway, this is quite empirical and does not lead to a satisfactory definition with interesting properties. Mathematicians have solved this differently: they found identities (such as the evaluation of integral $\int_0^\infty x^ne^{-x}dx=n!$) that can be shown to equal $n!$ when $n$ is an integer, and keep making sense when $n$ is not.

So they started using this as a definition of the factorial

$$n!=\int_0^\infty x^ne^{-x}dx.$$

With this formula, you get $3.1!=6.812622863\cdots$

Extension to negative values is yet a different story. If you consider the recursive definition of the factorial, $(n+1)!=(n+1)n!$, which allows to compute larger and larger values, you can reverse it as $(n-1)!=\dfrac{n!}n$. Going backwards, you get to the negatives. Then, you will have a surprise for negative integers...

I derived a form of the gamma function (see here) using some calculus and neat little tricks.

Anyways, define the factorial with two conditions:

1. $n!=n(n-1)!$

2. $1!=1$

From this, you can get the factorial for any integer value, but it does nothing to show you fractional values, at least not yet.

Define a function $f(x):=\ln(x!)$ and manipulate as follows:

$$f(x)=\ln(x!)=\ln(x(x-1)!)=\ln((x-1)!)+\ln(x)=f(x-1)+\ln(x)$$

$$f(x)=f(x-1)+\ln(x)\tag1$$

Differentiate both sides (since the equation holds true for all $x$)

$$f'(x)=f'(x-1)+\frac1x\tag2$$

If you put $x-1$ into $(2)$, we get $f'(x-1)=f'(x-2)+\frac1{x-1}$, and repeat this process over and over...

$$f'(x)=f'(x-2)+\frac1{x-1}+\frac1x$$

$$f'(x)=f'(x-3)+\frac1{x-2}+\frac1{x-1}+\frac1x\\\vdots\\f'(x)=f'(0)+\frac11+\frac12+\dots+\frac1{x-1}+\frac1x\tag3$$

Note that $(3)$ only holds true for integer $x$, just like the factorial, but it is much easier to generalize.

Recall the geometric sum:

$$\frac{1-r^n}{1-r}=1+r+r^2+\dots+r^{n-1}$$

Integrate both sides with respect to $r$ from $0$ to $1$,

\begin{align} \int_0^1\frac{1-r^n}{1-r}dr & =\int_0^11+r+r^2+\dots+r^{n-1}dr\\ & =\left.\frac11r+\frac12r^2+\frac13r^3+\dots+\frac1nr^n\right|_0^1\\ & =\frac11+\frac12+\dots+\frac1{x-1}+\frac1x\tag4\\ \end{align}

This is exactly what we need to extend $(3)$ to arbitrary $x$:

$$f'(x)=f'(0)+\int_0^1\frac{1-r^x}{1-r}dr\tag{3.1}$$

We then integrate this and apply the FTOC:

$$f(x)-\require{cancel}\cancelto0{f(0)}=\int_0^x\left(f'(0)+\int_0^1\frac{1-r^\phi}{1-r}dr\right)d\phi$$

$$f(x)=f'(0)x+\int_0^x\int_0^1\frac{1-r^\phi}{1-r}dr\ d\phi$$

Recall what $f(x)$ was:

$$\ln(x!)=f'(0)x+\int_0^x\int_0^1\frac{1-r^\phi}{1-r}dr\ d\phi$$

Use the second condition of the factorial and $x=1$

$$\ln(1!)=f'(0)+\int_0^1\int_0^1\frac{1-r^\phi}{1-r}dr\ d\phi$$

$$f'(0)=-\int_0^1\int_0^1\frac{1-r^\phi}{1-r}dr\ d\phi\tag5$$

So then,

$$x!=\exp\left[-x\int_0^1\int_0^1\frac{1-r^\phi}{1-r}dr\ d\phi+\int_0^x\int_0^1\frac{1-r^\phi}{1-r}dr\ d\phi\right]$$

which is equivalent to the gamma function.