Wrong constant outside of gamma function when integrating $e^{x^n}$?

69 Views Asked by At

$$\int e^{x^n}\text{ d}x$$ We use the substitution $$t = -(x^n),\qquad \frac{dt}{dx}=-n x^{n-1}\Longleftrightarrow x=(-t)^{\frac1n},\qquad dx = -\frac1n x^{1-n}dt$$ We perform the substitution and get $$\int e^{\left((-t)^{\frac1n}\right)^n}\cdot -\frac1n \left((-t)^{\frac1n}\right)^{1-n} dt=-\frac1n\int e^{-t}\cdot (-t)^{\frac1n -1}dt = -\frac1n\int e^{-t}\cdot (-1)^{\frac1n -1}\cdot t^{\frac1n -1}dt$$ We pull out constants to get $${\color{red}-}\frac{(-1)^{\frac1n {\color{red}{-1}}}}{n}\int e^{-t}\cdot t^{\frac1n -1}dt=\frac{(-1)^{\frac1n}}{n}\Gamma\left(\frac1n, -(x^n)\right)+C$$

Wolfram alpha says otherwise:
https://www.wolframalpha.com/input?i=integrate+e%5E%28x%5En%29
https://www.wolframalpha.com/input?i=simplify+-%28x+%28-x%5En%29%5E%28-1%2Fn%29%29%2Fn
This is the constant they give that is outside of the gamma function
enter image description here

What am I doing wrong?

1

There are 1 best solutions below

3
On BEST ANSWER

The first issue is that you're misusing (or just using a different definition?) of the incomplete Gamma function.

Here's a link showing that WolframAlpha uses $$\int e^{-t} t^{\frac 1 n - 1} dt = - \Gamma \left( \frac 1 n, t \right).$$

In general, WolframAlpha and Mathematica use the definition $\int_r^\infty e^{-t} t^{r-1} dt = \Gamma(s, r)$ which is the same as Wikipedia's definition. Therefore your last step is off by a factor of -1, so you should have instead obtained $$-\frac{(-1)^{\frac1n}}{n}\Gamma\left(\frac1n, -(x^n)\right)+C$$


After fixing the issue above, the results still don't perfectly match. Your method gave a constant of $-\frac{(-1)^{\frac1n}}{n}$ and WolframAlpha got $\frac{(-1)^{1-1/n}}{n}$. The difference is coming from the step where you "simplified" like this:

$$(-t)^{1/n-1} = (-1)^{1/n-1} t^{1/n-1}$$

In general, the identity $(ab)^c = a^c b^c$ doesn't hold for complex numbers. Or rather - it still holds, but you need to be careful about your branch cuts. With Wolfram's default branch cuts, the identity you tried to use is valid if $x < 0$ (and thus $t > 0$) but not valid if $x > 0$ (and $t < 0$). The alternate version

$$(-t)^{1/n-1} = (-1)^{-1/n-1} t^{1/n-1}$$

holds for $x > 0$ (and $t < 0$).

In summary, there's a reason why WolframAlpha originally computed the constant as $-\frac{x (-x^n)^{-1/n}}{n}$ and then put an "Alternate form assuming n and x are positive" warning on the simpler version $\frac{(-1)^{1-1/n}}{n}$. When we're dealing with complex numbers, raising to powers becomes a multi-valued function, so a lot of "standard identities" become false or require careful thinking about branch cuts.