This is regarding the answer given by @bertrand87 in this post Integral $\int_0^\infty x^{-\alpha} \sin(x)dx.$
$$\left\{\mathscr{M} \sin\right\}(s) = \int_{0}^{\infty} x^{s-1} \sin(x) dx = \Gamma(s)\sin\left(\frac{s\pi}{2}\right)$$
Now, the above identity is valid for $s>0$ as the gamma integral converges for $s>0$.
Subsituing $s=1−a$, we have that
$$\int_{0}^{\infty} x^{-a} \sin(x) dx = \Gamma(1-a)\sin\left(\frac{\pi}{2}-\frac{a\pi}{2}\right) = \Gamma(1-a)\cos\left(\frac{a\pi}{2}\right)$$ which is valid for $a<1$.
However, it is mentioned in the answer that the above identity is valid for $a\in(0,1)\cup(1,2)$. How?