TITLE: How do we prove this $\int_{0}^{\infty}e^{-x}\sin^n x\left({1\over x}+{1\over x^2}+{1\over x^3}+\cdots+{1\over x^n}\right) =\arctan(n)?$
QUESTION [5 upvotes]: Given the integral $(1)$

$$\int_{0}^{\infty}e^{-x}\sin^n x\left({1\over x}+{1\over x^2}+{1\over x^3}+\cdots+{1\over x^n}\right)dx
=\arctan(n)\tag1$$

An attempt:
Rewrite $(1)$ as
$$\sum_{j=1}^{n}\int_{0}^{\infty}e^{-x}\sin^n x\cdot{\mathrm dx\over x^j}\tag2$$
Maybe if we know the closed form for $(3)$, it could be useful
$$\sum_{j=1}^{n}{1\over x^j}?\tag3$$
Employing $e^{-x}$ series $(2)$ becomes
$$\sum_{j=1}^{n}\int_{0}^{\infty}\sin^n x\left(x^{-j}-x^{1-j}+{x^{2-j}\over 2!}-{x^{3-j}\over 3!}+\cdots \right)\mathrm dx\tag4$$
I guess we may use integration by parts to integrate term by term, it may results in a lengthy process.
How else may integral $(1)$ be prove?

REPLY [10 votes]: The inverse Laplace transform of $e^{-x}\left(\frac{1}{x}+\ldots+\frac{1}{x^n}\right)$ is given by
$$ \mathbb{1}_{s\geq 1}(s)\sum_{k=0}^{n-1}\frac{(s-1)^k}{k!} $$
and the Laplace transform of $\sin^n(x)$ is given by
$$ \frac{n!}{s(4+s^2)(16+s^2)\cdots(n^2+s^2)} $$
if $n$ is even and by 
$$ \frac{n!}{(1+s^2)(9+s^2)\cdots (n^2+s^2)} $$
if $n$ is odd. The given integral boils down to the integral of a rational function over $(1,+\infty)$, but for $n=4$
$$ \int_{1}^{+\infty}\frac{4!}{s(4+s^2)(16+s^2)}\sum_{k=0}^{3}\frac{(s-1)^k}{k!}\,ds \neq \arctan(4)$$
since the LHS depends on $\log\frac{625}{17}$. Anyway, through the previous representation we may simply compute the given integral through partial fraction decomposition. The given identity holds for $n\in\{1,2,3\}$, but this problem rightfully belongs to the Mathematical coincidence Wikipedia page.