<s>[INST] Mellin transform of $\sin x$ aka $\int^{\infty}_0 x^{s-1}\sin x dx $ I am trying to find the Mellin transform of $\sin x $, put in other words to solve:
$$\int^{\infty}_0  x^{s-1}\sin x \mathrm{d} x $$
And I know that the answer is:
$$\Gamma(s) \sin \left(\frac{\pi s}{2}\right)$$
From several tables on the internet but I couldn't find any justification.
How can this identity be proven?
 [/INST] Alternatively, the Mellin transform for $\sin x$ can be found by employing the following useful property for the Laplace transform:
$$\int_0^\infty f(x) g(x) \, dx = \int_0^\infty \mathcal{L} \{f(x)\} (t) \cdot \mathcal{L}^{-1} \{g(x)\} (t) \, dt.$$
Noting that
$$\mathcal{L} \{\sin x\}(t) = \frac{1}{1 + t^2},$$
and
$$\mathcal{L}^{-1} \left \{\frac{1}{x^{1-s}} \right \} (t)= \frac{1}{\Gamma (1 - s)} \mathcal{L}^{-1} \left \{\frac{\Gamma (1 - s)}{x^{1-s}} \right \} (t) = \frac{t^{-s}}{\Gamma (1 - s)},$$
then
\begin{align}
\mathcal{M} \{\sin x\} &= \int_0^\infty \sin x \cdot \frac{1}{x^{1 - s}} \, dx\\
&= \int_0^\infty \mathcal{L} \{\sin x\} (t) \cdot \mathcal{L}^{-1} \left \{\frac{1}{x^{1 - s}} \right \} (t) \, dt\\
&= \frac{1}{\Gamma (1 - s)} \int_0^\infty \frac{t^{-s}}{1 + t^2} \, dt.
\end{align}
Setting $u = t^2$, one has
\begin{align}
\mathcal{M} \{\sin x\} &= \frac{1}{2 \Gamma (1 - s)} \int_0^\infty \frac{u^{-\frac{s}{2} - \frac{1}{2}}}{1 + u} \, du\\
&= \frac{1}{2 \Gamma (1 - s)} \operatorname{B} \left (\frac{1}{2} - \frac{s}{2}, \frac{1}{2} + \frac{s}{2} \right ) \tag1\\
&= \frac{1}{2 \Gamma (1 - s)} \Gamma \left (\frac{1}{2} - \frac{s}{2} \right ) \Gamma \left (\frac{1}{2} + \frac{s}{2} \right ) \tag2\\
&= \frac{1}{2 \Gamma (1 - s)} \Gamma \left [1 - \left (\frac{1}{2} + \frac{s}{2} \right ) \right ] \Gamma \left (\frac{1}{2} + \frac{s}{2} \right )\\
&= \frac{1}{2 \Gamma (1 - s)} \frac{\pi}{\sin \left (\frac{\pi}{2} + \frac{\pi s}{2} \right )} \tag3\\
&= \frac{1}{2 \Gamma (1 - s)} \frac{\pi}{\cos \left (\frac{\pi s}{2} \right )}\\
&= \frac{\Gamma (s) \sin (\pi s)}{2 \pi} \cdot \frac{\pi}{\cos \left (\frac{\pi s}{2} \right )} \tag4\\
&=\frac{\Gamma (s) \sin \left (\frac{\pi s}{2} \right ) \cos \left (\frac{\pi s}{2} \right )}{\cos \left (\frac{\pi s}{2} \right )}\\
&= \Gamma (s) \sin \left (\frac{\pi s}{2} \right )
\end{align}
This is valid for $-1 < s < 1$.
Explanation
(1) Using $\operatorname{B} (x,y) = \displaystyle{\int_0^\infty \frac{t^{x - 1}}{(1 + t)^{x + y}} \, dt}$.
(2) Using $\operatorname{B}(x,y) = \dfrac{\Gamma (x) \Gamma (y)}{\Gamma (x + y)}$.
(3) Using the reflection formula for the gamma function: $\Gamma (1 - z) \Gamma (z) = \dfrac{\pi}{\sin (\pi z)}$.
(4) Again using the reflection formula for the gamma function.
</s>