How to solve $I_1=\int_0^\infty\frac{(x^3e^{-2x}-x^2e^{-3x}+1)\sin x}{x}dx$ from $I$ with differentiation under integral sign I was solving problems on differentiation under integral sign :
I encountered this problem :
Evaluate this integral$$I=\int_0^\infty\frac{(e^{-ax}-e^{-4bx})sin(x)}{x}dx$$
and then use it to solve the integral
$$I_1=\int_0^\infty\frac{(x^3e^{-2x}-x^2e^{-3x}+1)sin(x)}{x}dx$$
I evaluated  the integral I  , then I divided integral I1 to 3 integrals
$$I_1=\int_0^\infty x^2e^{-2x}sin(x)dx+\int_0^\infty-x e^{-3x}sin(x)dx+\int_0^\infty \frac{sin(x)}{x}dx$$
I can solve the first 2 integrals (by differentiating the integral as I clarify below).. My problem is the third integral of $I_1$. How can I deduce
$$\int_0^\infty \frac{\sin x}{x}dx
$$
from the integral I ?
Here is my solution to evaluate I , then the first 2 parts of the integral I1: ( I know the below solution is correct .. But how to complete to evaluate the last part of I1)
$$\frac{\partial I}{\partial a}=\int_0^\infty - e^{-ax} sin(x)=\frac{-1}{1+a^2}$$
$$I=\int\frac{-1}{1+a^2}da+f(b)$$
$$I=-\tan^{-1}(a)+f(b)$$
$$f(b)=\tan^{-1}(4b)$$
$$I=-\tan^{-1}(a)+\tan^{-1}(4b)$$
$$\frac{\partial^2 I}{\partial a^2}=\int_0^\infty x e^{-ax} sin(x)=\frac{d}{da}(\frac{-1}{1+a^2})=\frac{2a}{(1+a^2)^2}$$
$$\frac{\partial^3 I}{\partial a^3}=\int_0^\infty -x^2 e^{-ax} sin(x)=\frac{d}{da}(\frac{2a}{(1+a^2)^2})=\frac{-8a^3+2a^2-8a+2}{(a^2+1)^3}$$
$$\int_0^\infty x^2e^{-2x}sin(x)dx=-\frac{\partial^3 I}{\partial a^3}|_{a=2}$$
$$\int_0^\infty-x e^{-3x}sin(x)dx=-\frac{\partial^2 I}{\partial a^2}|_{a=3}$$
 A: By the complex version of Frullani's theorem, for any $a,b>0$ we have
$$ \int_{0}^{+\infty}\frac{(e^{-ax}-e^{-4bx})\sin x}{x}\,dx = \text{Im}\log\left(\frac{4b-i}{a-i}\right)=\arctan(4b)-\arctan(a). $$
This can be proved also by computing the Laplace transform of $\mathbb{1}_{(0,a)}(x)$, turning the LHS into
$$ \int_{0}^{+\infty}\frac{\mathbb{1}_{(0,4b)}(s)-\mathbb{1}_{(0,a)}(s)}{s^2+1}\,ds $$
which is an elementary integral.
A: Well, for the first integral we have:
$$\mathscr{I}_{\space\text{n}}\left(\text{a},\text{b}\right):=\int_0^\infty\frac{\exp\left(\text{a}\cdot x\right)-\exp\left(\text{b}\cdot x\right)}{x}\cdot\sin\left(\text{n}\cdot x\right)\space\text{d}x\tag1$$
Using Laplace transform, we can write:
$$\text{F}_{\space\text{n}}\left(\text{s}\right):=\mathscr{L}_x\left[\frac{\exp\left(\text{a}\cdot x\right)-\exp\left(\text{b}\cdot x\right)}{x}\cdot\sin\left(\text{n}\cdot x\right)\right]_{\left(\text{s}\right)}\tag2$$
Using the 'frequency-domain integration' property of the Laplace transform:
$$\text{F}_{\space\text{n}}\left(\text{s}\right)=\int_\text{s}^\infty\mathscr{L}_x\left[\left(\exp\left(\text{a}\cdot x\right)-\exp\left(\text{b}\cdot x\right)\right)\cdot\sin\left(\text{n}\cdot x\right)\right]_{\left(\sigma\right)}\space\text{d}\sigma=$$
$$\int_\text{s}^\infty\mathscr{L}_x\left[\exp\left(\text{a}\cdot x\right)\cdot\sin\left(\text{n}\cdot x\right)\right]_{\left(\sigma\right)}\space\text{d}\sigma-\int_\text{s}^\infty\mathscr{L}_x\left[\exp\left(\text{b}\cdot x\right)\cdot\sin\left(\text{n}\cdot x\right)\right]_{\left(\sigma\right)}\space\text{d}\sigma\tag3$$
Using the 'frequency shifting' property of the Laplace transform:
$$\text{F}_{\space\text{n}}\left(\text{s}\right)=\int_\text{s}^\infty\mathscr{L}_x\left[\sin\left(\text{n}\cdot x\right)\right]_{\left(\sigma-\text{a}\right)}\space\text{d}\sigma-\int_\text{s}^\infty\mathscr{L}_x\left[\sin\left(\text{n}\cdot x\right)\right]_{\left(\sigma-\text{b}\right)}\space\text{d}\sigma\tag4$$
Using 'table of selected Laplace transforms':
$$\text{F}_{\space\text{n}}\left(\text{s}\right)=\int_\text{s}^\infty\frac{\text{n}}{\text{n}^2+\left(\sigma-\text{a}\right)^2}\space\text{d}\sigma-\int_\text{s}^\infty\frac{\text{n}}{\text{n}^2+\left(\sigma-\text{b}\right)^2}\space\text{d}\sigma\tag5$$
Now, when $\text{s}=0$ and $\text{n}=1$, we get your integral:
$$\text{F}_{\space1}\left(0\right)=\pi+\arctan\left(\text{a}\right)-\arctan\left(\text{b}\right)\tag6$$
A: $\newcommand{\bbx}[1]{\,\bbox[15px,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}
I & \equiv
\int_{0}^{\infty}{\pars{\expo{-ax} - \expo{-4bx}}\sin\pars{x} \over x}\,\dd x =
\int_{0}^{\infty}\pars{\expo{-ax} - \expo{-4bx}}\
\overbrace{{1 \over 2}\int_{-1}^{1}\expo{\ic k x}\,\dd k}
^{\ds{{\sin\pars{x} \over x}}}\ \,\dd x
\\[5mm] & =
{1 \over 2}\int_{-1}^{1}\int_{0}^{\infty}\bracks{\expo{-\pars{a - \ic k}x} - \expo{-\pars{4b - \ic k}x}}\dd x\,\dd k = 
{1 \over 2}\int_{-1}^{1}\pars{{1 \over a - \ic k} - {1 \over 4b - \ic k}}\dd k
\\[5mm] & =
\int_{0}^{1}\bracks{{a \over k^{2} + a^{2}} - {4b \over k^{2} + \pars{4b}^{2}}}\dd k =
\mrm{sgn}\pars{a}\int_{0}^{1/\verts{a}}{\dd k \over k^{2} + 1} -
\mrm{sgn}\pars{4b}\int_{0}^{1/\pars{4\verts{b}}}{\dd k \over k^{2} + 1}
\\[5mm] & =
\arctan\pars{1 \over a} - \arctan\pars{1 \over 4b} =
\bbx{\mrm{arccot}\pars{a} - \mrm{arccot}\pars{4b}}
\end{align}
A: You already established
$$\frac{dI}{da}=\int_0^\infty - e^{-ax} \sin(x)=-\frac{1}{1+a^2}$$
which is used below in evaluating
\begin{align}
\int_0^\infty \dfrac{\sin x}{x}\ dx =&
\int_0^{\infty }\int _0^{\infty}e^{-ax }\sin x \>dx\:da\\
=&\> -\int_0^\infty\frac{dI}{da}da
= \int_0^\infty \frac 1{1+a^2}da = \dfrac{\pi}{2}
\end{align}
