I was on the internet, where I found the equation $[(1/2)!]^2 \cdot 4 = \pi$, so like any curious person, I used a calculator to see whether or not it was true, and when I hit the equal button, I got $\pi$.
So there were two things in my mind at the time that made no sense:
1. I thought the factorial function only worked for whole numbers, and not fractions, so how is my calculator computing these values?
2. How can such an equation even generate the number $\pi$? Is it just coincidence, or is there a good reason for it? Does it have anything to do with how my calculator is computing $(1/2)!$?
$\endgroup$ 53 Answers
$\begingroup$$n!$ defined recursively as $0! = 1; n! = n(n-1)!; n \ge 1$ is only defined on natural numbers and 0.
But it seems reasonable to ask: can we extend it to a function on real numbers so that $x! = x*(x-1)!$ and $0! = 1$ and if so how?
Lots of work and the answer is the gamma function (). Where $\Gamma(t) = \int_{0}^{\infty}x^{t-1}e^{-x}dx$ and for $n \in \mathbb N$ it can be shown that $\Gamma(n+1) = n!$.
So when your calculate is figuring out $\frac 12!$ it is actually figuring out what $\Gamma(3/2)$ is.
....
So is it a coincidence that $\Gamma(3/2)^2 = \pi/4$? Or in other words, is it a coincidence that $\int_{0}^{\infty} \sqrt{x}e^{-x} = \sqrt{\pi}/2$?
No. Apparently it isn't.
Rather remarkably $\Gamma(1 -z)\Gamma(z) = \frac{\pi}{\sin (\pi z)}$ so $z = 1/2$ will give us the result =$\Gamma(1/2)\Gamma(1/2) = \frac{\pi}{\sin \frac {\pi}2}= \pi$. So $\Gamma(1/2) = \sqrt{\pi}$ so $(1/2)! = 1/2*(-1/2)! = 1/2*\Gamma(1/2) = \sqrt{\pi}/2$.
I hope this is food for thought.
$\endgroup$ 3 $\begingroup$I think valuable to have an idea of the curve of function
$$y=\Gamma(x)=(x-1)!$$
(gamma function generalizes factorial function with a shift) for $x>0$.
One can see in particular:
$\Gamma(1)=0!=1$ (point $A$), $\Gamma(2)=1!=1$ (point $B$), $\Gamma(3)=2!=2$ (point $C$), $\Gamma(4)=3!=6$ (point $D$), and the point $E$ with coordinates $(\frac{1}{2}, \Gamma(\frac{1}{2})=\sqrt{\pi})$.
$\endgroup$ $\begingroup$This goes back to the gamma function, which is the most commonly used extension of the factorial to non-integer arguments.
$$\Gamma(n+1):=n!$$
In particular, there is a nice reflection formula for the gamma function.
$$\Gamma(1-z)\Gamma(z)=\frac\pi{\sin(\pi z)}$$
For $z=1/2$:
$$\Gamma(1/2)\Gamma(1/2)=\frac\pi{\sin(\pi/2)}=\pi$$
$$\Gamma(1/2)=\sqrt\pi$$
And then the functional equation
$$\Gamma(3/2)=(1/2)\times\Gamma(1/2)=\frac{\sqrt\pi}2$$
$$(1/2)!=\Gamma(3/2)=\frac{\sqrt\pi}2$$
Then the rest is algebra.
As for why $\pi$ shows up, I speculate it is most likely due to Euler's definition of the gamma function and the Weierstrass factorization of $\sin$, which should come out to give the above reflection formula.
$\endgroup$