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
 A: $\newcommand{\bbx}[1]{\,\bbox[8px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
\begin{align}
&\int_{0}^{\infty}{\expo{-x}\sin\pars{x}\cos\pars{ax} \over x}\,\dd x
\\[5mm] = &\
{1 \over 2}
\int_{0}^{\infty}{\expo{-x}\sin\pars{\bracks{1 + a}x} \over x}\,\dd x +
{1 \over 2}
\int_{0}^{\infty}{\expo{-x}\sin\pars{\bracks{1 - a}x} \over x}\,\dd x
\\[5mm] = &\
{1 \over 2}\pars{1 + a}
\int_{0}^{\infty}\expo{-x}\,
{\sin\pars{\bracks{1 + a}x} \over \pars{1 + a}x}\,\dd x\ +\
\pars{a \leftrightarrow -a}
\\[5mm] = &\
{1 \over 2}\pars{1 + a}
\int_{0}^{\infty}\expo{-x}\,
{1 \over 2}\int_{-1}^{1}\expo{\ic\pars{1 + a}xk}\,\dd k\,\dd x\ +\
\pars{a \leftrightarrow -a}
\\[5mm] = &\
{1 \over 4}\pars{1 + a}
\int_{-1}^{1}\int_{0}^{\infty}\exp\pars{\bracks{- 1 + \ic\pars{1 + a}k}x}
\,\dd x\,\dd k\ +\
\pars{a \leftrightarrow -a}
\\[5mm] = &\
{1 \over 4}\pars{1 + a}
\int_{-1}^{1}{-1 \over -1 + \ic\pars{1 + a}k}\,\dd k\ +\
\pars{a \leftrightarrow -a}
\\[5mm] = &\
{1 \over 4}\pars{1 + a}2
\int_{0}^{1}{\dd k \over \pars{1 + a}^{2}k^{2} + 1}\ +\
\pars{a \leftrightarrow -a} =
{1 \over 2}
\int_{0}^{1 + a}{\dd k \over k^{2} + 1}\ +\
\pars{a \leftrightarrow -a}
\\[5mm] = &\
\bbx{\arctan\pars{1 + a} + \arctan\pars{1 - a} \over 2}
\end{align}
A: Well, we can look at the Laplace transform:
$$\mathscr{I}_{\space\text{a}}\left(\text{s}\right):=\mathscr{L}_x\left[\frac{\sin\left(x\right)\cdot\cos\left(\text{a}\cdot x\right)}{x}\right]_{\left(\text{s}\right)}:=\int_0^\infty\frac{\sin\left(x\right)\cdot\cos\left(\text{a}\cdot x\right)}{x}\cdot e^{-\text{s}\cdot x}\space\text{d}t\tag1$$
We can use the 'frequency-domain integration' property of the Laplace transform:
$$\mathscr{I}_{\space\text{a}}\left(\text{s}\right)=\int_\text{s}^\infty\mathscr{L}_x\left[\sin\left(x\right)\cdot\cos\left(\text{a}\cdot x\right)\right]_{\left(\sigma\right)}\space\text{d}\sigma\tag2$$
Now, you can use:
$$\sin\left(x\right)\cdot\cos\left(\text{a}\cdot x\right)=\frac{\sin\left(x\cdot\left(1-\text{a}\right)\right)+\sin\left(x\cdot\left(1+\text{a}\right)\right)}{2}\tag3$$
So, we get:
$$\mathscr{L}_x\left[\sin\left(x\right)\cdot\cos\left(\text{a}\cdot x\right)\right]_{\left(\sigma\right)}=\frac{1}{2}\cdot\left(\mathscr{L}_x\left[\sin\left(x\cdot\left(1-\text{a}\right)\right)\right]_{\left(\sigma\right)}+\mathscr{L}_x\left[\sin\left(x\cdot\left(1+\text{a}\right)\right)\right]_{\left(\sigma\right)}\right)\tag4$$
Now, use:


*

*$$\mathscr{L}_x\left[\sin\left(x\cdot\left(1-\text{a}\right)\right)\right]_{\left(\sigma\right)}=\frac{1-\text{a}}{\left(\text{a}-1\right)^2+\sigma^2}\tag5$$

*$$\mathscr{L}_x\left[\sin\left(x\cdot\left(1+\text{a}\right)\right)\right]_{\left(\sigma\right)}=\frac{1+\text{a}}{\left(1+\text{a}\right)^2+\sigma^2}\tag6$$


So, finaly we need to find (to solve your problem):
$$\mathscr{I}_{\space\text{a}}\left(1\right)=\int_1^\infty\frac{1-\text{a}}{\left(\text{a}-1\right)^2+\sigma^2}\cdot\frac{1+\text{a}}{\left(1+\text{a}\right)^2+\sigma^2}\space\text{d}\sigma=$$
$$\left(1-\text{a}^2\right)\int_1^\infty\frac{1}{\left(\left(\text{a}-1\right)^2+\sigma^2\right)\cdot\left(\left(1+\text{a}\right)^2+\sigma^2\right)}\space\text{d}\sigma\tag7$$
A: 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}$$
A: By the sine addition formulas, it is enough to compute
$$ f(m)=\int_{0}^{+\infty}\frac{\sin(mx)}{x}e^{-x}\,dx \tag{1}$$
where $f(0)=0$ and by the dominated convergence theorem
$$ f'(m) = \int_{0}^{+\infty}\cos(mx)e^{-x}\,dx\stackrel{IBP}{=}\frac{1}{1+m^2}\tag{2}$$
implying:
$$ f(m)=\int_{0}^{+\infty}\frac{\sin(mx)}{x}e^{-x}\,dx = \arctan(m)\tag{3} $$
and
$$\begin{eqnarray*} \int_{0}^{+\infty}\frac{\sin(x)\cos(ax)}{x}e^{-x}\,dx &=& \frac{\arctan(1-a)+\arctan(1+a)}{2}\\&=&\color{red}{\frac{1}{2}\,\arctan\frac{2}{a^2}}.\tag{4} \end{eqnarray*}$$
