# Closed form for $\int x^ne^{-x^m} \ dx\ ?$

While entertaining myself by answering a question, the following problem arose.

For what natural numbers $n,m$ does the following undefined integral have a closed form

$$\int x^ne^{-x^m} \ dx\ ?$$

Closed form means that the antiderivative consists only of powers of $x^{...}$ and $x$ in $e^{-x^{...}}$.

I created the following matrix showing for different pairs of $n$ and $m$ the nature of the antiderivative.

$$\begin{matrix} & m&1&2&3&4&5&6&7\\ n\\ 1&&\checkmark&\checkmark&\Gamma&\text{erf}&\Gamma&\Gamma&\Gamma\\ 2&&\checkmark&\text{erf}&\checkmark&\Gamma&\Gamma&\text{erf}&\Gamma&\\ 3&&\checkmark&\checkmark&\Gamma&\checkmark&\Gamma&\Gamma&\Gamma&\\ 4&&\checkmark&\text{erf}&\Gamma&\Gamma&\checkmark&\Gamma&\Gamma\\ 5&&\checkmark&\checkmark&\checkmark&\text{erf}&\Gamma&\checkmark&\Gamma\\ 6&&\checkmark&\text{erf}&\Gamma&\Gamma&\Gamma&\Gamma&\checkmark\\ 7&&\checkmark&\checkmark&\Gamma&\checkmark&\Gamma&\Gamma&\Gamma\\ \end{matrix}$$  The $\checkmark$ sign stands for a closed form, "erf" signals that the antiderivative contains the erf function , and $\Gamma$ signals that the antiderivative contains the upper incomplete $\Gamma$ function.

I have no clue. Does anybody?

• Just as a starting point, how do you define closed form? – Simply Beautiful Art Feb 5 '17 at 23:53
• Sorry, I'll edit accordingly. – zoli Feb 5 '17 at 23:54
• If I may ask, did you consider negative values of $n,m$? – Simply Beautiful Art Feb 5 '17 at 23:56
• No, no, I did not dare to... Only naturals. – zoli Feb 5 '17 at 23:58
• I imagine you started with the substitution $x^m=u$? – Simply Beautiful Art Feb 5 '17 at 23:59

Let's start with a simple substitution $x=u^{1/m}$. This gives us
$$I=\frac1m\int u^{(n+1)/m-1}e^{-u}\ du=\frac1m\gamma\left(\frac{n+1}m,x^m\right)+c$$
This trivially has closed forms for $\frac{n+1}m\in\mathbb N$ due to integration by parts. Indeed, checking your table, it corresponds with every checkmark perfectly.
And just for the record, when $k\in\mathbb N$,
$$\int x^ke^{-x}\ dx=-e^{-x}\sum_{n=0}^k(k-n)!x^n+c$$
• The erf comes from the relation $\gamma(1/2,x)=\sqrt{\pi}\text{erf}(x)$. – kingW3 Feb 6 '17 at 0:27