TITLE: How to integrate $ \int_0^\infty \sin x \cdot x ^{-1/3} dx$ (using Gamma function)
QUESTION [6 upvotes]: How can I calculate the following integral: 
$$\int_0^\infty x ^{-\frac{1}{3}}\sin x \, dx$$ 
WolframAlpha gives me $$ \frac{\pi}{\Gamma\Big(\frac{1}{3}\Big)}$$
How does WolframAlpha get this?
I don't understand how we can rearrange the formula in order to apply the gamma-function here. Any helpful and detailed hint/answer is appreciated.

REPLY [5 votes]: As a generalization, for $0\lt a\lt1$,
$$
\begin{align}
\int_0^\infty x^{a-1}\sin(x)\,\mathrm{d}x
&=\frac1{2i}\left(\int_0^\infty x^{a-1}e^{ix}\,\mathrm{d}x-\int_0^\infty x^{a-1}e^{-ix}\,\mathrm{d}x\right)\\
&=\frac1{2i}\left(e^{ia\pi/2}\int_0^\infty x^{a-1}e^{-x}\,\mathrm{d}x-e^{-ia\pi/2}\int_0^\infty x^{a-1}e^{-x}\,\mathrm{d}x\right)\\
&=\sin\left(\frac{a\pi}{2}\right)\Gamma(a)\tag{1}
\end{align}
$$
The changes of variables $x\mapsto ix$ and $x\mapsto-ix$ used in the second equation above, are justified because
$$
\int_{\gamma_k} z^{a-1}e^{-z}\,\mathrm{d}z=0\tag{2}
$$
where $\gamma_1=[0,R]\cup Re^{i\frac\pi2[0,1]}\cup iR[1,0]$ and $\gamma_2=[0,R]\cup Re^{-i\frac\pi2[0,1]}\cup-iR[1,0]$ contain no singularities.
Plugging $a=\frac23$ into $(1)$ and using Euler's reflection formula, gives
$$
\begin{align}
\int_0^\infty x^{-1/3}\sin(x)\,\mathrm{d}x
&=\sin\left(\frac\pi3\right)\Gamma\left(\frac23\right)\\
&=\sin\left(\frac\pi3\right)\frac{\pi\csc\left(\frac\pi3\right)}{\Gamma\left(\frac13\right)}\\
&=\frac{\pi}{\Gamma\left(\frac13\right)}\tag{3}
\end{align}
$$