How can i evaluate $\int _0^{\infty }\frac{\ln \left(x\right)\sin \left(x\right)}{x^2+1}\:dx\:$ using real methods I've been trying to evaluate this integral for a while now my friend used complex analysis to evaluate this but he got a wrong result, i tried using real methods but i've been stuck. One can probably use differentiating under the integral sign in the following ways,
$$I\left(a\right)=\int _0^{\infty }\frac{\ln \left(x\right)\sin \left(ax\right)}{x^2+1}\:dx$$or$$I\left(a\right)=\int _0^{\infty \:}\frac{x^a\sin \left(x\right)}{x^2+1}\:dx$$
But that seems really complicated, i really have no idea how to proceed, please help me.
 A: Here's a solid start - let me know if you need for me to expand upon the material provided:
Yes employ the second, but with a slight extension
$$
I(a, t) = \int_0^\infty \frac{x^a \sin(xt)}{x^2 + 1}\:dx
$$
Then if the integral under inspection is $J$, then by the Dominated Convergence Theorem and Leibniz's Integral Rule, we find that
$$
J = \frac{\partial I}{\partial a}\bigg|_{(a,t) =(0, 1)}
$$
Thus, we need to resolve $I(a,t)$. To do so, we employ Fubini's Theorem and take the Laplace Transform with respect to $t$:
\begin{align}
\mathscr{L}\left[I(a,t) \right] &= \mathscr{L}\left[\int_0^\infty \frac{x^a \sin(xt)}{x^2 + 1}\:dx \right] = \int_0^\infty \frac{x^a \mathscr{L}\left[\sin(xt)\right]}{x^2 + 1}\:dx = \int_0^\infty x^a \cdot \frac{x}{s^2 + x^2} \cdot \frac{1}{x^2 + 1}\:dx \\
&= \int_0^\infty \frac{x^{a + 1}}{\left(s^2 + x^2\right)\left(x^2 + 1\right)}\:dx = \int_0^\infty x^{a + 1}\left[\frac{1}{s^2 - 1}\left(\frac{1}{x^2 + 1}- \frac{1}{s^2 + x^2} \right)\right]\:dx \\
&= \frac{1}{s^2 - 1}\left[\int_0^\infty \frac{x^{a + 1}}{x^2 + 1} \:dx - \int_0^\infty \frac{x^{a + 1}}{s^2 + x^2}\:dx \right] = \frac{1}{s^2 - 1}\left[I_1 - I_2\right]
\end{align}
You will observe that both $I_1$ and $I_2$ take the form:
$$
H(b,k,n) = \int_0^\infty \frac{x^k}{x^n + b}\:dx = \frac{1}{n} b^{1 - \frac{k + 1}{n}} \Gamma\left(1 - \frac{k + 1}{n} \right)\Gamma\left( \frac{k + 1}{n} \right)
$$
Where $\Gamma(x)$ is the Gamma Function.
Thus we observe that:
\begin{align}
 \mathscr{L}\left[I(a,t) \right] &= \frac{1}{s^2 - 1}\bigg[H\left(1, a+1, 2\right) - H\left(s^2, a+1, 2\right)\bigg] \\
&= \frac{1}{s^2 - 1}\bigg[\frac{1}{2} \cdot 1^{\frac{a + 1 + 1}{2} - 1}\Gamma\left(1 - \frac{a + 1 + 1}{2} \right)\Gamma\left( \frac{a + 1 + 1}{2} \right) - \frac{1}{2} \cdot \left(s^2\right)^{\frac{a + 1 + 1}{2} - 1}\Gamma\left(1 - \frac{a + 1 + 1}{2} \right)\Gamma\left( \frac{a + 1 + 1}{2} \right) \bigg]  \\
&= \frac{1}{2\left(s^2 - 1\right)}\Gamma\left(1 - \frac{a + 2}{2} \right)\Gamma\left( \frac{a + 2}{2} \right)\bigg[1 - s^{a} \bigg]
\end{align}
Here as $a$ is to be evaluated at $0$, we may employ Euler's Reflection Formula on the Gamma terms to yield:
\begin{align}
\mathscr{L}\left[I(a,t) \right] &=\frac{1}{2\left(s^2 - 1\right)}\pi\operatorname{cosec}\left(\pi \cdot \frac{a + 2}{2}\right)\bigg[1 - s^{a} \bigg]\\
&=\frac{\pi}{2\left(s^2 - 1\right)}\operatorname{cosec}\left(\frac{\pi}{2} \left( a + 2\right)\right)\bigg[1 - s^{a} \bigg]
\end{align}
We now take the Inverse Laplace Transform:
\begin{align}
 I(a,t) &= \mathscr{L}^{-1}\left[ \frac{\pi}{2\left(s^2 - 1\right)}\operatorname{cosec}\left(\frac{\pi}{2} \left( a + 2\right)\right)\bigg[1 - s^{a} \bigg]\right] \\
&= \frac{\pi}{2}\operatorname{cosec}\left(\frac{\pi}{2} \left( a + 2\right)\right)\left[\mathscr{L}^{-1}\left[\frac{1}{s^2 - 1} \right] - \mathscr{L}^{-1}\left[\frac{1}{s^2 - 1} s^{a}\right] \right] \\
&= \frac{\pi}{2}\operatorname{cosec}\left(\frac{\pi}{2} \left( a + 2\right)\right)\left[\sinh(t) - \mathscr{L}^{-1}\left[\frac{1}{s^2 - 1} s^{a}\right] \right]
\end{align}
For the remaining inversion we employ Convolution:
$$ 
\mathscr{L}^{-1}\left[ F(s)G(s) \right] = \int_0^t f(\tau)g(t - \tau) d\tau
$$
Here let
$$
G(s) = \frac{1}{s^2 - 1} \longrightarrow g(t) = \sinh(t)
$$
And so
$$
F(s) = s^{a} \longrightarrow f(t) = \frac{t^{-(a + 1)}}{\Gamma(-a)}
$$
And so,
\begin{align}
&\mathscr{L}^{-1}\left[\frac{1}{s^2 - 1} s^{a}\right]  = \int_0^t \frac{\tau^{-(a + 1)}}{\Gamma(-a)} \sinh(t - \tau)\:d\tau = \frac{1}{\Gamma(-a)} \int_0^t \tau^{-(a + 1)}\sinh(t - \tau)\:d\tau \\
&=  \frac{1}{\Gamma(-a)} \int_0^t \tau^{-(a + 1)}\bigg[\sinh(t)\cosh(\tau) - \cosh(t)\sinh(\tau) \bigg]\:d\tau \\
&=\frac{1}{\Gamma(-a)} \left[ \sinh(t)\int_0^t \tau^{-(a + 1)}\cosh(\tau)\:d\tau - \cosh(t)\int_0^t \tau^{-(a + 1)}\sinh(\tau)\:d\tau \right]
\end{align}
