$\left(-\frac{1}{2}\right)! = \sqrt{\pi}?$ I recently learned that $\left(-\frac{1}{2}\right)! = \sqrt{\pi}$ but I don't understand how that makes sense. Can someone please explain how this is possible?
Thanks!
 A: In order to extend the factorial function to any real number, we introduce the Gamma Function, which is a strange object defined as follows: 
$$
\Gamma(s)=\int_0^\infty t^{s-1}e^{-t} \, dt
$$
The gamma function comes with the special property that $n!=\Gamma(n+1)$ for natural numbers $n$, so to evaluate $(-1/2)!$, (which by itself is not technically defined) we define it to be $\Gamma(1/2)$ and hence we evaluate the integral 
$$
(-1/2)!:=\Gamma(1/2)=\int_0^\infty\frac{e^{-t}}{\sqrt{t}} \,dt
$$   To evaluate this integral, we make the substitution $u=\sqrt{t}$, which results in the well known Gaussian integral: 
$$
\int_0^\infty \frac{e^{-t}}{\sqrt{t}}dt=2\int_0^\infty \frac{e^{-u^2}}{u}u \, du=\int_{-\infty}^\infty e^{-u^2} \, du=\sqrt{\pi}
$$
A: I don't know where you've seen this notation. One thing you surely know is the socalled Gamma Function $\Gamma (z)$. This function is a complex function with a host of properties. One of its properties is that if evaluated on $\mathbb{N}$ it coincides with the factorial function, this is, $\Gamma (n+1) = n! $ if $n\in \mathbb{N}$. Also, one can find that $\Gamma (1/2) = \sqrt{\pi}$. So maybe by using a notation I don't know about someone could write $(-1/2)!$ instead of $ \Gamma (1/2)$. 
A: I posted this very question and an answer to it: Why is $\Gamma\left(\frac{1}{2}\right)=\sqrt{\pi}$ ?
What follows is the answer I posted there.  Several others also posted good answers.
If there's any justice in the universe, someone must have asked here how to show that
$$
\int_{-\infty}^\infty e^{-x^2/2}\,dx = \sqrt{2\pi}.
$$
Let's suppose that has been answered here.  Let (capital) $X$ be a random variable whose probability distribution is
$$
\frac{e^{-x^2/2}}{\sqrt{2\pi}}\,dx.
$$
Consider the problem of finding $\mathbb E(X^2)$.  It is
$$
\frac{1}{\sqrt{2\pi}}\int_{-\infty}^\infty x^2 e^{-x^2/2}\,dx = \text{(by symmetry)} \frac{2}{\sqrt{2\pi}} \int_0^\infty x^2 e^{-x^2/2}\,dx
$$
$$
\sqrt{\frac2\pi}\int_0^\infty xe^{-x^2/2}\Big(x\,dx\Big) = \sqrt{\frac2\pi}\int_0^\infty \sqrt{u}\  e^{-u}\,du = \sqrt{\frac2\pi}\  \Gamma\left(\frac32\right) = \frac12\sqrt{\frac2\pi} \Gamma\left(\frac12\right).
$$
So it is enough to show that this expected value is $1$.  That is true if the sum of two independent copies of it has expected value $2$.  So:
$$
\Pr\left(X^2+Y^2<w\right) = \frac{1}{2\pi}\iint\limits_\mathrm{disk}
e^{-(x^2+y^2)/2}\,dx\,dy
$$
where the disk has radius $\sqrt{w}$.  This equals
$$
\frac{1}{2\pi}\int_0^{2\pi}\int_0^{\sqrt{w}}  e^{-\rho^2/2}  \,\rho\,d\rho\,d\theta = \int_0^{\sqrt{w}}  e^{-\rho^2/2}  \,\rho\,d\rho.
$$
This last equality holds because we are integrating with respect to $\theta$ something not depending on $\theta$.  Differentiating this with respect to $w$ gives the probability density function of the random variable $X^2+Y^2$:
$$
e^{-w/2}\sqrt{w}\frac{1}{2\sqrt{w}} = \frac{e^{-w/2}}{2}\text{ for }w>0.
$$
So
$$
\mathbb E(X^2+Y^2) = \int_0^\infty w \frac{e^{-w/2}}{2}\,dw =2.
$$
A: factorial of negative numbers are $defined$ in terms of Gamma function, i.e. $(x!) := \Gamma(x+1)\forall x\in\mathbb R$, except for $x$ to be negative integer. this is because the two of them agree on positive integers, and so this is just a convention.
