Evaluate $\int_0^\infty \frac{e^{-x}}{x}\ln\big(\frac{1}{x}\big) \sin(x)dx$ [closed]
I'm having trouble with this integral
Evaluate $$\int_0^\infty \frac{e^{-x}}{x}\ln\left(\frac{1}{x}\right) \sin(x)dx$$
$$I=\int_0^\infty \frac{e^{-x}}{x}\ln\left(\frac{1}{x}\right) \sin(x)dx=\Im\left[\int_0^\infty \frac{e^{-x+ix}}{x}\ln\left(\frac{1}{x}\right) dx\right]$$ How would one proceed from here ? $u$ substitute $u=\ln(x)$? How do you solve this integral? Thank you for your time.
We want to evaluate
$$I = -\int_0^\infty \frac{e^{-x}}{x}\ln (x)\sin(x)\, dx $$
We start with the result
$$ \int_0^\infty e^{-ax}\sin(x)\, dx = \frac{1}{a^2+1} = \frac{1}{2i}\Big(\frac{1}{a-i}-\frac{1}{a+i}\Big) $$
Differentiating both sides $ b-1$ times w.r.t. $a$ and setting $a=1$, we get
$$\int_0^\infty x^{b-1}e^{-x}\sin(x) \, dx = \frac{\Gamma(b)\sin\frac{\pi b}{4}}{2^{b/2}} $$
Now, differentiating w.r.t. $b$, $$\int_0^\infty x^{b-1}\ln(x)e^{-x}\sin(x)\, dx = \frac{\Gamma(b)\psi(b)\sin\frac{\pi b}{4}}{2^{b/2}}+\frac{\pi}{4}\cdot\frac{\Gamma(b)\cos\frac{\pi b}{4}}{2^{b/2}}- \frac{\ln 2}{2}\cdot \frac{\Gamma(b)\sin\frac{\pi b}{4}}{2^{b/2}}$$ Now, taking the limit $b\to 0$, for which I used Wolfram|Alpha, we get the result $$ I = \frac{\pi}{8}(2\gamma+\ln 2)$$ Where $\gamma$ denotes the Euler-Mascheroni constant.
We'll use the following two crucial facts to calculate the integral. The first is that:
$$\boxed{\tan^{-1}x\ln(1+x^2)=-2\sum_{ n \ge 1}\frac{(-1)^nH_{2n}}{2n+1}x^{2n+1}}$$
which is shown in here. The second is that
$$\displaystyle \boxed{\Gamma'(2k-1) = (2k-2)! \bigg(-2\gamma +2\sum_{n=1}^{2k-2}\frac{1}{n} \bigg)} $$
Which follows from logarithmic differentiation of $$\Gamma(2z-1)=e^{-\gamma (2z-2)}\cdot\prod_{n\geq 1}\left(1+\frac{2z-2}{n}\right)^{-1}e^{\frac{{2z-2}}n}$$
i.e. taking log of both sides and differenting w.r.t. $z.$
Let $\displaystyle I = \int_0^{\infty} \frac{1}{x} \log\left(\frac{1}{x}\right)\sin x \, \mathrm dx. $ Using the taylor series for sine, we have:
$$\begin{aligned} I & = -\int_0^{\infty} \frac{1}{x} e^{-x} \log x \sin{x}\, \mathrm dx \\& = -\int_0^{\infty} e^{-x} \log x \sum_{k \ge 1} \frac{(-1)^{k-1} x^{2k-2}}{(2k-1)!}\, \mathrm dx \\& = -\sum_{k \ge 1} \frac{(-1)^{k-1}}{(2k-1)!}\int_0^{\infty} x^{2k-2}e^{-x} \log x \, \mathrm dx \\& = -\frac{1}{2}\sum_{k \ge 1} \frac{(-1)^{k-1}}{(2k-1)!} \frac{\partial}{\partial k } \int_0^{\infty} x^{2k-2}e^{-x} \, \mathrm dx \\&= -\frac{1}{2}\sum_{k \ge 1} \frac{(-1)^{k-1}}{(2k-1)!} \frac{\partial \Gamma (2k-1)}{\partial k } \\&= -\frac{1}{2}\sum_{k \ge 1} \frac{(-1)^{k-1}}{(2k-1)!} \cdot (2k-2)! \bigg(-2\gamma +2\sum_{n=1}^{2k-2}\frac{1}{n} \bigg) \\&= -\frac{1}{2}\sum_{k \ge 1} \frac{(-1)^{k-1}}{(2k-1)} \cdot \bigg(-2\gamma +2\sum_{n=1}^{2k-2}\frac{1}{n}\bigg) \\& = \gamma \sum_{k \ge 1} \frac{(-1)^{k-1}}{(2k-1)} -\sum_{k \ge 1} \frac{(-1)^{k-1}}{(2k-1)}\sum_{n=1}^{2k-2}\frac{1}{n} \\&= \frac{\gamma \pi }{4}- \sum_{k \ge 1} \frac{(-1)^{k-1} H_{2k-2}}{2k-1} \\& = \gamma \frac{\pi}{4}- \sum_{k \ge 1} \frac{(-1)^k H_{2k}}{2k+1} \\& = \gamma \frac{\pi}{4}-\left( -\frac{1}{2} \cdot \tan^{-1}x \cdot \ln(1+x^2)\right)\bigg|_{x=1} \\& = \gamma \frac{\pi}{4}+ \frac{1}{2} \cdot \frac{\pi}{4} \cdot \log{2} \\& = \frac{\pi}{8} \left(2\gamma + \log 2\right). \end{aligned}$$
Using the identities
\begin{align*}
\frac{1}{x} &= \int_0^\infty \mathrm{e}^{-x t}\, \mathrm{d} t, \\
\ln x &= \int_0^\infty \frac{\mathrm{e}^{-s} - \mathrm{e}^{-xs}}{s}\,\mathrm{d} s,
\end{align*}
we have
\begin{align*}
I &= \int_0^\infty \mathrm{e}^{-x}\sin x
\left(\int_0^\infty \mathrm{e}^{-x t}\, \mathrm{d} t\right)
\left(\int_0^\infty \frac{\mathrm{e}^{-xs} - \mathrm{e}^{-s}}{s}\,\mathrm{d} s\right)\mathrm{d}x\\[8pt]
&= \int_0^\infty \frac{1}{s}
\left[\int_0^\infty \left(\int_0^\infty \mathrm{e}^{-x(1 + s + t)}\sin x \, \mathrm{d} x - \int_0^\infty \mathrm{e}^{-x(1 + t) - s}\sin x\, \mathrm{d} x\right)\mathrm{d} t\right]\mathrm{d} s\\[8pt]
&= \int_0^\infty \frac{1}{s}
\left[\int_0^\infty \left(\frac{1}{(1 + s + t)^2 + 1} - \mathrm{e}^{-s}\, \frac{1}{(1 + t)^2 + 1}\right)\mathrm{d} t\right]\mathrm{d} s \tag{1}\\[8pt]
&= \int_0^\infty \frac{1}{s}
\left[\frac{\pi}{2} - \arctan(1 + s) - \mathrm{e}^{-s}\,\frac{\pi}{4}\right]\mathrm{d} s\\[8pt]
&= \lim_{c\to 0^{+}}
\int_c^\infty \frac{1}{s}
\left[\frac{\pi}{2} - \arctan(1 + s) - \mathrm{e}^{-s}\,\frac{\pi}{4}\right]\mathrm{d} s\\[8pt]
&= \lim_{c\to 0^{+}}
\left[ \Big(\frac{\pi}{4}\mathrm{e}^{-c} - \frac{\pi}{2} + \arctan(1 + c)\Big)\ln c - \frac{\pi}{4}\int_c^\infty \mathrm{e}^{-s}\ln s \, \mathrm{d} s + \int_c^\infty \frac{\ln s}{s^2 + 2s + 2}\,\mathrm{d} s\right] \tag{2}\\[12pt]
&= \frac{\pi}{4}\gamma + \frac{\pi}{8}\ln 2. \tag{3}
\end{align*}
Explanations:
(1): $\int \mathrm{e}^{-bx}\sin x \, \mathrm{d} x = -\frac{b\sin x + \cos x}{b^2 + 1}\mathrm{e}^{-bx} + C$;
(2): the IBP (Integration By Parts);
(3): $\lim_{c\to 0^{+}} (\frac{\pi}{4}\mathrm{e}^{-c} - \frac{\pi}{2} + \arctan(1 + c))\ln c = 0$ (use L'Hopital rule),
and $\int_0^\infty \mathrm{e}^{-s}\ln s \, \mathrm{d} s = - \gamma$
where $\gamma$ is the Euler-Mascheroni constant,
and $\int_0^\infty \frac{\ln s}{s^2 + 2s + 2}\,\mathrm{d} s = \frac{\pi}{8}\ln 2$ (the proof is given at the end).
A very nice proof of $\int_0^\infty \frac{\ln s}{s^2 + 2s + 2}\,\mathrm{d} s = \frac{\pi}{8}\ln 2$ by @Kelenner:
Let $J = \int_0^\infty \frac{\ln s}{s^2 + 2s + 2}\,\mathrm{d} s$.
With the substitution $s = \frac{2}{u}$, we have $$J = \int_0^\infty \frac{\ln 2 - \ln u}{u^2 + 2u + 2}\,\mathrm{d} u = \int_0^\infty \frac{\ln 2 }{u^2 + 2u + 2}\,\mathrm{d} u - J$$ which results in $J = \frac{1}{2} \int_0^\infty \frac{\ln 2 }{u^2 + 2u + 2}\,\mathrm{d} u = \frac{\ln 2}{2}\arctan(1 + u)\vert_0^\infty = \frac{\pi}{8}\ln 2$. We are done.