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?


Solution 1:

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$$