# how to do integration $\int_{-\infty}^{+\infty}\exp(-x^n)\,\mathrm{d}x$?

how to do integration $\int_{-\infty}^{+\infty}\exp(-x^n)\,\mathrm{d}x$, assuming $n>1$ ?

From wiki page Gaussian Integral: $\int_{-\infty}^{+\infty}\exp(-x^2)\,\mathrm{d}x = \sqrt{\pi}$

So, one can define a random variable $X$ has $\text{pdf}(x) = \frac{1}{\sqrt{\pi}} \text{exp}(-x^2)$ , since $\int_{-\infty}^{+\infty}\text{pdf}(x)\,\mathrm{d}x = 1$. Actually, this is normal distribution.

Now, I'd like to define $\text{pdf}(x) = \frac{1}{c} \text{exp}(-x^n)$, but how much is $c$?

Or, $\int_{-\infty}^{\infty}\exp(-x^n)\,\mathrm{d}x = ?$

There is a hint on wiki page Error Function:

Error function is $\text{erf}(x) = \frac{2}{\sqrt{\pi}} \int_{0}^{x}\exp(-t^2)\,\mathrm{d}t$, with $\text{erf}(0)=0$ and $\text{erf}(+\infty) = 1$.

So this means a pdf can be defined as $\text{pdf}(x) = \frac{1}{2}\text{erf}(x)$.

Then, Generalized Error Function is defined as $$E_n(x) = \frac{n!}{\sqrt{\pi}} \int_{0}^{x} \text{exp}(-t^n)dt$$ does this mean

$\int_{-\infty}^{+\infty}\exp(-x^n)\,\mathrm{d}x = \frac{2\sqrt{\pi}}{n!}$ ?

Even so, there's still a problem: if $n$ is not integer, how to calculate $n!$? Does it becomes Gamma function $\Gamma(n)$? like this:

$\int_{-\infty}^{+\infty}\exp(-x^n)\,\mathrm{d}x = \frac{2\sqrt{\pi}}{\Gamma(n)}$

$$n>1,\; t=x^n:$$
$$\int_{0}^{\infty} e^{-x^n}\,dx=\frac{1}{n}\int_0^{\infty} t^{\frac{1}{n}-1}e^{-t}dt=\frac{1}{n}\Gamma \left(\frac{1}{n}\right)=\Gamma \left(\frac{n+1}{n}\right)$$
As for the integral over $\mathbb{R}:$ when $n$ is even, double this, when $n$ is odd, the integral does not converge.
• Darn! you beat me to it (+1). However, note that you can "simplify" the answer to $\Gamma\left(\frac{n+1}{n}\right)$ – robjohn Aug 27 '13 at 15:29
• @athos The answer above is valid for all real $n>1$, because I have taken the integral over $(0,\infty )$. The integral you are asking for is over $(-\infty,\infty):$ if $n$ is even, your integral is simply twice that over $(0,\infty)$, if $n$ is odd, the $(-\infty,0)$ portion will cause it to diverge, for obvious reasons. If $n$ is not an integer, the integral might not even be defined over that region. This is why I restricted it to $(0,\infty)$ – L. F. Aug 27 '13 at 18:10