Solution to this integral? could anyone solve this integral ?
$$\int_0^\infty \frac{e^{-x}\sin(x)\cos(ax)}x~\mathrm dx$$
well i have tried opening up the sin*cos using trigonometric identities but that didn't help so much

Note that we can write
$$\begin{align}
e^{-x}\sin(x)\cos(ax)&=\text{Re}\left(e^{-x}e^{iax}\sin(x)\right)\\\\
&=\text{Re}\left(\frac{e^{i(a+1+i)x}-e^{i(a-1+i)x}}{2i}\right)
\end{align}$$
Hence, we have from the Generalized Frullani's Theorem
$$\begin{align}
\int_0^\infty \frac{e^{-x}\sin(x)\cos(ax)}{x}\,dx&=\text{Re}\left(\frac{1}{2i}\int_0^\infty \frac{e^{i(a+1+i)x}-e^{i(a-1+i)x}}{x}\,dx\right)\\\\
&=\frac12\arctan\left(\frac{\text{Im}((a+1-i)(a-1+i))}{\text{Re}((a+1-i)(a-1+i))}\right)\\\\
&=\frac12 \arctan(2/a^2)
\end{align}$$
