Why do many calculators evaluate $(-0.5)!$ to $\sqrt\pi$?

905 Views Asked by At

According to Wikipedia, factorial only is defined for non-negative integers. How come Spotlight, the Windows calculator and the Google search engine come up with $\sqrt\pi$ if you try to solve $(-0.5)!$ ?

2

There are 2 best solutions below

3
On BEST ANSWER

The ordinary factorial function can be extended, in an essentially unique way, to a function defined everywhere except at negative integers. This extension preserves the important $f(x+1) = (x+1)f(x)$ relation that characterizes the factorial. (See Extension of factorial to non-integer values for details.)

This extended function is defined at $-\frac12$, and its value there is $\sqrt\pi$.

2
On

Hint: $\Gamma(n)=(n-1)!= \int_0^\infty x^{n-1}e^{-x}\, \mathrm{d}x$ so $(-0.5)!=(0.5-1)!=\Gamma(0.5)=\int_0^\infty x^{-0.5}e^{-x}\, \mathrm{d}x=\int_0^\infty \frac{1}{\sqrt x}e^{-x}\, \mathrm{d}x$ now you should just prove the above value equals to $\sqrt \pi$. By the way, it's better to use the term "evaluate" or "calculate" instead of "solve", because we can't actually "solve" a number!