Computing $\int_0^{\infty}\frac{\cos(x)-1}{x^{1+\alpha}}\,\mathrm d x$ Let $\alpha\in(0,1)\cup(1,2)$. I want to show that the integral
$$\int_0^{\infty}\frac{\cos(x)-1}{x^{1+\alpha}}\,\mathrm dx$$


*

*exists (in Lebesgue’s sense: the integral of the absolute value of the integrand is finite); and

*is equal to $$-\frac{\cos(\frac{\pi\alpha}{2})\,\Gamma(2-\alpha)}{\alpha(1-\alpha)},$$ where $\Gamma(t)\equiv\int_0^{\infty}x^{t-1}\exp(-t)\,\mathrm d t$ is Euler’s gamma function, defined for $t>0$.


I am thinking about a clever transformation and then applying Fubini’s theorem, but I’m stuck at this point. Any comments would be appreciated.
 A: Let $I(\alpha)$, $0<\alpha<2$, be the integral given by
$$\begin{align}
I(\alpha)&=\int_0^\infty \frac{\cos ( x  )-1}{x^{1+\alpha}}\,dx \tag 1
\end{align}$$
Integrating by parts $(1)$ with $u=\cos(x)-1$ and $v=-\frac{1}{\alpha x^{\alpha}}$ reveals
$$\begin{align}
I(\alpha)&=-\frac{1}{\alpha}\int_0^\infty \frac{\sin(x)}{x^\alpha}\,dx \tag 2\\\\
\end{align}$$
For $1<\alpha <2$, integrating by parts $(2)$ with $u=\sin(x)$ and $v=\frac{1}{1-\alpha}x^{1-\alpha}$ yields
$$\begin{align}
I(\alpha)&=-\frac{1}{\alpha(\alpha-1)}\int_0^\infty \frac{\cos(x)}{x^{\alpha-1}}\,dx \tag 3\\\\
\end{align}$$


CASE $1$: $0<\alpha<1$ 

Note that for $0<\alpha<1$, we can write $(2)$ as
$$I(\alpha)=-\frac{1}{\alpha}\text{Im}\left(\int_0^\infty \frac{e^{ix}}{x^\alpha}\,dx\right) \tag 4$$
Enforcing the substitution $x\to ix$ in the integral on the right-hand sides of $(4)$ yields
$$\int_0^\infty \frac{e^{ix}}{x^\alpha}\,dy=e^{i\pi (1-\alpha)/2}\int_0^{-i\infty} \frac{e^{-x}}{x^\alpha}\,dx \tag 5$$
Using Cauchy's Integral Theorem, we can deform the contours back to the real line and write $(5)$ as 
$$\begin{align}
\int_0^\infty \frac{e^{ix}}{x^\alpha}\,dx&=e^{i\pi (1-\alpha)/2}\int_0^\infty x^{-\alpha}e^{-x}\,dx\\\\&=e^{i\pi (1-\alpha)/2}\Gamma(1-\alpha) \tag 6
\end{align}$$
Substituting $(6)$ into $(4)$, we obtain 
$$\begin{align}
\int_0^\infty \frac{\cos ( x  )-1}{x^{1+\alpha}}\,dx&=-\frac{1}{\alpha}\sin((1-\alpha)\pi/2)\Gamma(1-\alpha)\\\\
&=-\frac{1}{\alpha}\cos(\pi \alpha/2)\Gamma(1-\alpha) \tag 7\\\\
&=\bbox[5px,border:2px solid #C0A000]{-\frac{1}{\alpha(1-\alpha)}\cos(\pi \alpha/2)\Gamma(1-\alpha) } \tag 8
\end{align}$$
where in going from $(7)$ to $(8)$ we used the functional relationship $\Gamma(1+z)=z\Gamma(z)$.


CASE $2$: $1<\alpha<2$ 

Note that for $1<\alpha<2$, we can write $(3)$ as
$$I(\alpha)=-\frac{1}{\alpha(\alpha -1)}\text{Re}\left(\int_0^\infty \frac{e^{ix}}{x^{\alpha-1}}\,dx\right) \tag 9$$
Enforcing the substitution $x\to ix$ in the integral on the right-hand side of $(9)$ yields
$$\int_0^\infty \frac{e^{ix}}{x^{\alpha-1}}\,dx=-e^{-i\pi \alpha/2}\int_0^{-i\infty} \frac{e^{-x}}{x^{\alpha-1}}\,dx \tag {10}$$
Using Cauchy's Integral Theorem, we can deform the contour back to the real line and write $(10)$ as 
$$\begin{align}
\int_0^\infty \frac{e^{ix}}{x^{\alpha-1}}\,dx&=-e^{i\pi \alpha/2}\int_0^\infty x^{1-\alpha}e^{-x}\,dx\\\\&=-e^{i\pi \alpha/2}\Gamma(2-\alpha) \tag{11}
\end{align}$$
Substituting $(11)$ into $(9)$, we obtain 
$$\begin{align}
\bbox[5px,border:2px solid #C0A000]{\int_{-\infty}^\infty \frac{\cos ( x )-1}{x^{1+\alpha}}\,dx=-\frac{1}{\alpha(1-\alpha)}\cos(\alpha\pi/2)\Gamma(2-\alpha) }\tag {12}
\end{align}$$


PUTTING IT ALL TOGETHER:
Using $(8)$ and $(12)$ along with the well-known result $I(1)=\pi/2$, we find that for all $0<\alpha<2$ we have
$$\bbox[5px,border:2px solid #C0A000]{\int_0^\infty \frac{\cos ( x  )-1}{x^{1+\alpha}}\,dx=-\frac{1}{\alpha(\alpha-1)}\cos(\alpha\pi/2)\Gamma(2-\alpha)}$$

as was to be shown!
A: Based on the deleted answer by @Jack D'Aurizio, I can construct a proof based on Fubini’s theorem.
For each $(x,t)\in(0,\infty)\times(0,\infty)$, define $$f(x,t)\equiv\frac{(1-\cos x)t^{\alpha}\exp(-tx)}{\Gamma(1+\alpha)}.$$ Clearly, $f$ is continuous on its domain and non-negative. Moreover, the Lebesgue measure is $\sigma$-finite on the positive ray $(0,\infty)$. Therefore, Fubini’s theorem applies (as a special case for non-negative functions, usually referred to as Tonelli’s theorem).
For a fixed $x>0$, integrating with respect to $t$ yields:
\begin{align*}
\int_{t\in(0,\infty)}f(x,t)\,\mathrm dt=&\,\frac{1-\cos x}{\Gamma(1+\alpha)}\int_{t\in(0,\infty)}t^{\alpha}\exp(-t x)\,\mathrm d x\overset{s\equiv tx}{=}\frac{1-\cos x}{\Gamma(1+\alpha)}\int_{s\in(0,\infty)}\frac{s^{\alpha}\exp(-s)}{x^{1+\alpha}}\,\mathrm d s\\
=&\,\frac{1-\cos x}{x^{1+\alpha}}
\end{align*}
after substituting and using the definition of the gamma function. This is $-1$ times the integrand in my question. Therefore, the negative of the integral in my question is given as
\begin{align*}
\int_{x\in(0,\infty)}\int_{t\in(0,\infty)}f(x,t)\,\mathrm dt\,\mathrm dx=\int_{t\in(0,\infty)}\int_{x\in(0,\infty)}f(x,t)\,\mathrm dx\,\mathrm dt
\end{align*}
by Tonelli’s theorem.
Now, once can check by differentiation that for each $t>0$, one has
$$\int(1-\cos x)\exp(-t x)\,\mathrm d x=-\frac{\exp(-t x)[1+t^2(1-\cos x)+t\sin x]}{t(1+t^2)}+C$$
for $C\in\mathbb R$. Upon taking limits and simplifying, it follows that
\begin{align*}
\int_{t\in(0,\infty)}\int_{x\in(0,\infty)}f(x,t)\,\mathrm dx\,\mathrm dt=&\,\int_{t\in(0,\infty)}\frac{t^{\alpha-1}}{\Gamma(1+\alpha)(1+t^2)}\,\mathrm dt\overset{s\equiv(1+t^2)^{-1}}{=}\int_{s\in(0,1)}\frac{s^{-\alpha/2}(1-s)^{\alpha/2-1}}{2\Gamma(1+\alpha)}\,\mathrm ds\\
=&\,\frac{B(1-\alpha/2,\alpha/2)}{2\Gamma(1+\alpha)}=\frac{\Gamma(1-\alpha/2)\Gamma(\alpha/2)}{2\Gamma(1)\Gamma(1+\alpha)},
\end{align*}
where $B$ is the beta function.
From here, the interested reader can finish the proof using Euler’s reflection formula (which, to be honest, I’m not familiar and not comfortable operating with) and using the basic properties of trigonometric functions.

On a second thought, I like the result
$$\int_{0}^{\infty}\frac{1-\cos x}{x^{1+\alpha}}\,\mathrm dx=\frac{\Gamma(1-\alpha/2)\Gamma(\alpha/2)}{2\Gamma(1+\alpha)}\tag{$\spadesuit$}$$ I just derived better than $$\int_{0}^{\infty}\frac{1-\cos x}{x^{1+\alpha}}\,\mathrm dx=\frac{\cos(\pi\alpha/2)\Gamma(2-\alpha)}{\alpha(1-\alpha)},\tag{$\clubsuit$}$$ so no further derivation is necessary. One reason is that ($\spadesuit$) is valid even if $\alpha=1$ (in which case the result is $\pi/2$), where the case $\alpha=1$ can only be obtained as a limit under ($\clubsuit$).
