TITLE: An integral identity
QUESTION [9 upvotes]: $\newcommand\la\lambda\newcommand\w{\mathfrak w}\newcommand\R{\mathbb R}$Numerical calculations and other considerations (The min of the mean of iid exponential variables) suggest that
$$\int_\R \frac{1-e^{itu}}{e^{itu}-1-it}\,\frac{dt}t=\pi i\,\frac u{1-u}$$
for $u\in(0,1)$, with the integral understood in the principal value sense. However, I have not been able to prove this, even with the help of Mathematica.
How can this be proved?

REPLY [8 votes]: $\newcommand\eps\varepsilon$ We want to show that, under $R\to\infty$ and $\eps\to 0+$, we have
$$\int_{(-R,-\eps)\cup(\eps,R)} \frac{1-e^{itu}}{e^{itu}-1-it}\,\frac{dt}t=\pi i\,\frac u{1-u}+o(1).$$
Equivalently,
$$\int_{(-R,-\eps)\cup(\eps,R)}\left(\frac{1-e^{itu}}{e^{itu}-1-it}+1\right)\,\frac{dt}t=\pi i\,\frac u{1-u}+o(1).$$
In other words,
$$\int_{(-R,-\eps)\cup(\eps,R)}\frac{dt}{e^{itu}-1-it}=\pi\,\frac u{u-1}+o(1).$$
The integrand is holomorphic in an open set containing $\{t\in\mathbb{C}:\text{$\Im(t)\geq 0$ and $t\neq 0$}\}$, hence by Cauchy's theorem it suffices to show that
$$\int_{\gamma(R)}\frac{dt}{e^{itu}-1-it}=-\pi+o(1)\qquad\text{and}\qquad
\int_{\gamma(\eps)}\frac{dt}{e^{itu}-1-it}=\frac{\pi}{u-1}+o(1),$$
where $\gamma(r)$ is the semicircle in $\{t\in\mathbb{C}:\Im(t)\geq 0\}$ going from $r$ to $-r$. For large $r$, the integrand on $\gamma(r)$ is $i/t+O(1/t^2)$. For small $r$, the integrand on $\gamma(r)$ is $-i/(t(u-1))+O_u(1)$. The result follows.