TITLE: Need help to evaluate $I_n=\int_{0}^{\infty}e^{-x}\sin(n\ln(x))dx$
QUESTION [5 upvotes]: For $n\in\mathbb{N}$, I'm trying to find a closed form for the following integrals :
$$I_n=\int_{0}^{\infty}e^{-x}\sin(n\ln(x))\text{d}x$$
My real objective is to evaluate $\sum\limits_{n=1}^{\infty}\frac{I_n}{n}$, and since interchanging the sum and the integral didn't lead anywhere,  I suppose that finding a closed form expression for $I_n$ is the way to go, but I'm lost as of how to proceed...
Maybe the residue theorem/contour integration could help, but I'm not familiar with complex analysis so I haven't tried it - feel free to use it though.
Any suggestion ?

REPLY [4 votes]: A rather nice expression for the sum can be found using the Fourier series
$$ \sum \limits_{n=1}^\infty \frac{\sin(n y)}{n} = \frac{\pi}{2} \left[1 - 2 \left\{\frac{y}{2\pi}\right\} \right] \, , \, y \in \mathbb{R} \, , $$
where $\{z\} = z - \lfloor z \rfloor$ is the fractional part of $z \in \mathbb{R}$ . With this definition it satisfies $\{-z\} = 1- \{z\}$ for $z \in \mathbb{R} \setminus \mathbb{Z}$ . 
We can write the sum as
\begin{align}
S &\equiv - \sum \limits_{n=1}^\infty \frac{I_n}{n} = \frac{\pi}{2} \int \limits_0^\infty \mathrm{e}^{-x} \left[2 \left\{\frac{\ln(x)}{2\pi}\right\} - 1\right] \, \mathrm{d} x = \frac{\pi}{2} \int \limits_{-\infty}^\infty \mathrm{e}^{-\mathrm{e}^{t}+t} \left[2 \left\{\frac{t}{2\pi}\right\} - 1\right] \, \mathrm{d} t\\
&= \frac{\pi}{2} \int \limits_0^\infty \left(\mathrm{e}^{-\mathrm{e}^{t}+t} \left[2 \left\{\frac{t}{2\pi}\right\} - 1\right] + \mathrm{e}^{-\mathrm{e}^{-t}-t} \left[2 \left(1-\left\{\frac{t}{2\pi}\right\}\right) - 1\right] \right)\, \mathrm{d} t \\
&= \frac{\pi}{2} \int \limits_0^\infty \left(\mathrm{e}^{-\mathrm{e}^{-t}-t} - \mathrm{e}^{-\mathrm{e}^{t}+t} \right) \left(1 - 2\left\{\frac{t}{2\pi}\right\} \right) \, \mathrm{d}t \\
&= \frac{\pi}{2} \left[1 - \frac{1}{\mathrm{e}} - \frac{1}{\mathrm{e}} - 2 \sum \limits_{n=0}^\infty \int \limits_{2 \pi n}^{2 \pi (n+1)} \left(\mathrm{e}^{-\mathrm{e}^{-t}-t} - \mathrm{e}^{-\mathrm{e}^{t}+t} \right) \left(\frac{t}{2\pi} - n\right) \, \mathrm{d} t \right] \\
&= \frac{\pi}{2} \left[1 - \frac{2}{\mathrm{e}} - \frac{1}{\pi} \int \limits_0^\infty \left[-\ln(x) \mathrm{e}^{-x}\right] \, \mathrm{d} x + 2 \sum \limits_{n=0}^\infty n \left(\mathrm{e}^{-\mathrm{e}^{-2\pi(n+1)}}-\mathrm{e}^{-\mathrm{e}^{-2\pi n}} - \mathrm{e}^{-\mathrm{e}^{2\pi n}} + \mathrm{e}^{-\mathrm{e}^{2\pi(n+1)}}\right) \right] \\
&\equiv \frac{\pi}{2}-\frac{\pi}{\mathrm{e}}- \frac{\gamma}{2} + \pi (S_1 - S_2) \, .
\end{align}
The second sum is essentially equal to zero:
$$ S_2 = \sum \limits_{n=1}^\infty n \left( \mathrm{e}^{-\exp[2\pi n]} - \mathrm{e}^{-\exp[2\pi(n+1)]}\right) = \sum \limits_{n=1}^\infty \mathrm{e}^{- \exp(2 \pi n)} \simeq 3 \cdot 10^{-233} \, . $$
The first sum can be simplified using the exponential series:
$$ S_1 = \sum \limits_{n=1}^\infty n \left( \mathrm{e}^{-\exp[-2\pi (n+1)]} - \mathrm{e}^{-\exp[-2\pi n]}\right) = \sum \limits_{k=1}^\infty \frac{(-1)^{k-1}}{k!} \sum \limits_{n=1}^\infty \mathrm{e}^{-2 \pi k n} = \sum \limits_{k=1}^\infty \frac{(-1)^{k-1}}{k! (\mathrm{e}^{2 \pi k} - 1)} \, .$$
Keeping only the first three terms of $S_1$ and ignoring $S_2$ , we obtain
$$ S \simeq \pi\left[\frac{1}{2} - \frac{1}{\mathrm{e}} - \frac{\gamma}{2 \pi} + \frac{1}{\mathrm{e}^{2\pi} - 1} - \frac{1}{2(\mathrm{e}^{4\pi} - 1)} + \frac{1}{6(\mathrm{e}^{6\pi} - 1)}\right] \simeq 0.13233339071\color{red}{3} \, .$$
The red three is the first deviation from the 'exact' value. I do not believe that there are closed-form expressions for $S_1$ and $S_2$ , but at least this result is not too far off.