Why does this curious equality between two integrals seem to hold? I was messing around on Wolfram Alpha, checking the numerical values of the following ratio for the first several values of $n$:
$$\frac { | \int_0^\infty{e^{i(x^n)}} | } { \int_0^\infty{e^{-x^n}}}$$
(the numerator is the complex magnitude after integration).  I tried it for all integer values of $n$ from 2 to 10 inclusive, and in all cases the ratio came out to 1 (within computational error of order $10^{-5}$ or less each time).  I also tried it for a few random non-integer powers greater than 1, with the same result.
Unfortunately, it doesn't seem to work for all functions -- when I tried combining a few of the above powers into a polynomial, it wasn't 1 anymore.
Does anyone know why this would work for any real $n \gt 1$?  And is there any chance I screwed it up and it actually does work for any function (as long as both integrals converge), not just $x^n$?  That would be so cool...
 A: You can relate the numerator to the denominator by contour integration. The idea is to relate the integral in the numerator to the integral of the same function along a ray from the origin in the $e^{i \pi/(2n)}$ direction. So you take a contour going from $0$ to $R$ along a straight line, then from $R$ to $R e^{i\pi/(2n)}$ along a circular arc, then from $R e^{i \pi/(2n)}$ back to $0$ along a straight line.
After you've shown that the integral along the arc goes to $0$ as $R \to \infty$, the residue theorem tells you that the integrals along the two straight lines sum to zero. So you get $\int_0^\infty e^{ix^n} dx = \int_0^\infty e^{-x^n} e^{i\pi/(2n)} dx$.
To go this way, you definitely need $n>1$, so that the LHS converges in improper Riemann sense. To go exactly the way I described it, you also need $n$ to be an integer, so that $e^{i x^n}$ is analytic everywhere. But if $n$ is not an integer, I think you can select a logarithm so that $e^{i x^n}$ is analytic on this wedge domain whenever $n>1$.
You can actually evaluate this in closed form as well: $\int_0^\infty e^{-x^n} dx = \int_0^\infty e^{-u} \frac{dx}{du} du$ where $u(x)=x^n,\frac{du}{dx}=n x^{n-1},\frac{dx}{du}=\frac{1}{n} x^{1-n}=\frac{1}{n} u^{1/n-1}$. So you have $\frac{1}{n} \Gamma(1/n)$, which you can also write as $\Gamma(1+1/n)$.
