TITLE: Find a general solution for $\int_{0}^{\infty} \sin\left(x^n\right)\:dx$
QUESTION [11 upvotes]: So, I was recently working on the Sine Fresnal integral and was curious whether we could generalise for any Real Number, i.e. 
$$I = \int_{0}^{\infty} \sin\left(x^n\right)\:dx$$
I have formed a solution that I'm uncomfortable with and was hoping for qualified eyes to have a look over. 
So, the approach I took was to employ Complex Numbers (I forget the name(s) of the theorem that allows this). 
But 
$$\sin\left(x^n\right) = \Im\left[-e^{-ix^n}\right]$$
And so, n
$$ I = \int_{0}^{\infty} \sin\left(x^n\right)\:dx = \Im\left[\int_{0}^{\infty} -e^{-ix^n}\:dx \right]= -\Im\left[\int_{0}^{\infty} e^{-\left(i^{\frac{1}{n}}x\right)^{n}}\:dx \right]$$
Applying a change of variable $u = i^{\frac{1}{n}}x$ we arrive at:
\begin{align}
I &= -\Im\left[i^{-\frac{1}{n}}\int_{0}^{\infty} e^{-u^{n}}\:du \right] \\
  &= -\Im\left[i^{-\frac{1}{n}}\frac{\Gamma\left(\frac{1}{n}\right)}{n} \right]\\
  &= \sin\left(\frac{\pi}{2n}\right)\frac{\Gamma\left(\frac{1}{n}\right)}{n}
\end{align}
My area of concern is in the substitution. As $i^{-\frac{1}{n}} \in \mathbb{C}$, I believe the limits of the integral should have been from $0$ to $i^{-\frac{1}{n}}\infty$. Is that correct or not?
I'm also struggling with bounds on $n$ for convergence. Is this expression valid for all $n\in\mathbb{R}$
Any guidance would be greatly appreciated

REPLY [2 votes]: Start out with a couple of integration by parts:
$$
\begin{align}
\int_0^\infty\sin(x)\,e^{-xy}\,\mathrm{d}x
&=-\frac1y\int_0^\infty\sin(x)\,\mathrm{d}e^{-xy}\tag1\\
&=\frac1y\int_0^\infty\cos(x)\,e^{-xy}\,\mathrm{d}x\tag2\\
&=-\frac1{y^2}\int_0^\infty\cos(x)\,\mathrm{d}e^{-xy}\tag3\\
&=\frac1{y^2}-\frac1{y^2}\int_0^\infty\sin(x)\,e^{-xy}\,\mathrm{d}x\tag4\\
&=\frac1{y^2+1}\tag5
\end{align}
$$
Explanation:
$(1)$: prepare to integrate by parts
$(2)$: integrate by parts
$(3)$: prepare to integrate by parts
$(4)$: integrate by parts
$(5)$: add $\frac{y^2}{y^2+1}$ times $(4)$ to $\frac1{y^2+1}$ times the LHS of $(1)$
Now write 
$$
\begin{align}
\int_0^\infty\sin\left(x^n\right)\,\mathrm{d}x
&=\frac1n\int_0^\infty\sin(x)\,x^{\frac1n-1}\,\mathrm{d}x\tag6\\[3pt]
&=\frac1{n\,\Gamma\!\left(1-\frac1n\right)}\int_0^\infty\sin(x)\int_0^\infty y^{-\frac1n}e^{-xy}\,\mathrm{d}y\,\mathrm{d}x\tag7\\
&=\frac1{n\,\Gamma\!\left(1-\frac1n\right)}\int_0^\infty y^{-\frac1n}\int_0^\infty\sin(x)\,e^{-xy}\,\mathrm{d}x\,\mathrm{d}y\tag8\\
&=\frac1{n\,\color{#C00}{\Gamma\!\left(1-\frac1n\right)}}\color{#090}{\int_0^\infty\frac{y^{-\frac1n}}{y^2+1}\,\mathrm{d}y}\tag9\\
&=\color{#C00}{\frac{\Gamma\!\left(\frac1n\right)\sin(\frac\pi{n})}{\color{#000}{n}\pi}}\color{#090}{\frac\pi2\sec\left(\frac\pi{2n}\right)}\tag{10}\\[9pt]
&=\Gamma\!\left(1+\frac1n\right)\sin\left(\frac\pi{2n}\right)\tag{11}
\end{align}
$$
Explanation:
$\phantom{1}(6)$: substitute $x\mapsto x^{1/n}$
$\phantom{1}(7)$: $\int_0^\infty y^{-\frac1n}e^{-xy}\,\mathrm{d}y=x^{\frac1n-1}\Gamma\!\left(1-\frac1n\right)$
$\phantom{1}(8)$: Fubini
$\phantom{1}(9)$: apply $(5)$
$(10)$: $(4)$ from this answer for the green, and $(2)$ from the same answer for the red
$(11)$: simplify