<s>[INST] Compute the limit $\lim\limits_{t \to + \infty} \int_0^{+ \infty} \frac{ \mathrm d x}{e^x+ \sin tx} $ I have been working on this limit for days, but I am not getting it. The question is

Compute the limit $$\lim_{t \to + \infty} \int_0^{+ \infty} \frac{ \mathrm d x}{e^x+ \sin (tx)}$$

Note that the integral is well defined and convergent for every $t >0$. Indeed the integrand function is a positive function for every $t >0$ since
$$e^x + \sin tx > e^x-1 > x>0$$
And as $x \to + \infty$ the integrand function behaves like $e^{-x}$.
WHAT I TRIED:
I consider $t=2n \pi$ a multiple of $2 \pi$, and see what happens:
$$\int_0^{+ \infty} \frac{ \mathrm d x}{e^x+ \sin (2n \pi x)} = \sum_{k=0}^\infty \int_{k /n}^{(k+1) /n} \frac{ \mathrm d x}{e^x+ \sin (2n \pi x)}$$
Making the change of variables $u = 2n \pi x$ I get
\begin{align}\sum_{k=0}^\infty \frac{1}{2n \pi} \int_{2k \pi}^{(2k+2) \pi} \frac{ \mathrm d u}{e^{u/2n \pi}+ \sin (u)} &\ge
\sum_{k=0}^\infty \frac{1}{2n \pi} \int_{2k \pi}^{(2k+2) \pi} \frac{ \mathrm d u}{e^{(2k+2) \pi/2n \pi}+ \sin (u)} \\&=
\sum_{k=0}^\infty \frac{1}{2n \pi} \int_{2k \pi}^{(2k+2) \pi} \frac{ \mathrm d u}{e^{(k+1)/n}+ \sin (u)}\end{align} where I write the lower bound with the minimum of the function at $u=(2k+2) \pi$. Now I use the fact that the integrand function does is integrated over a period of $2 \pi$, and using the result for $C>1$
$$\int_0^{2 \pi} \frac{ \mathrm d u}{C+ \sin (u)} = \frac{2 \pi}{\sqrt{C^2-1}}$$
I get the estimate
\begin{align}\sum_{k=0}^\infty \frac{1}{2n \pi} \int_{2k \pi}^{(2k+2) \pi} \frac{ \mathrm d u}{e^{(k+1)/n}+ \sin (u)} &= \sum_{k=0}^\infty \frac{1}{2n \pi} \frac{2 \pi}{\sqrt{e^{2(k+1)/n} -1 }} \\&= \frac{1}{n} \sum_{k=0}^\infty \frac{1}{\sqrt{e^{2(k+1)/n} -1 }}\end{align}
Summing all up, I got that
$$\int_0^{+ \infty} \frac{ \mathrm d x}{e^x+ \sin (2n \pi x)} \ge \frac{1}{n} \sum_{k=0}^\infty \frac{1}{\sqrt{e^{2(k+1)/n} -1 }}$$
As $n \to \infty$ the series converges to the Riemann integral
$$\int_0^{+ \infty} \frac{\mathrm d y}{\sqrt{e^{2y}-1}} = \frac{\pi}{2}$$
Hence the limit should be a number larger than $\pi/2$, or $+ \infty$.
Using WA I got for large values of $t$ that the integral is between $1$ and $2$, thus $\pi/2$ could be the actual limit.
 [/INST] For each $t > 0$, we have
\begin{align}
\int_0^\infty \frac{1}{\mathrm{e}^x + \sin t x}\mathrm{d} x
&= \int_0^\infty \sum_{k=0}^\infty (-1)^k \mathrm{e}^{-(k+1)x} (\sin t x)^k\mathrm{d} x\\
&= \sum_{k=0}^\infty (-1)^k \int_0^\infty \mathrm{e}^{-(k+1)x} (\sin t x)^k\mathrm{d} x\\
&= \sum_{k=0}^\infty (-1)^k\frac{1}{k+1}
\int_0^\infty \mathrm{e}^{-y} (\sin \tfrac{t y}{k+1})^k\mathrm{d} y.
\end{align}
(Hint: Use Fubini's theorem for the interchange of integration and summation.)
Denote $I_k = \int_0^\infty \mathrm{e}^{-y} (\sin \tfrac{t y}{k+1})^k\mathrm{d} y, \ k=0, 1, 2, \cdots$. Using integration by parts, we have
$$I_k = \frac{(k-1)kt^2}{(k+1)^2 + k^2t^2}I_{k-2}, \ k=2, 3, 4, \cdots.$$
Also, $I_0 = 1$ and $I_1 = \frac{2t}{t^2+4}$.
Thus we have, for $k = 0, 1, 2, \cdots$,
$$\lim_{t\to\infty} I_{2k+1} = 0,$$
and
$$\lim_{t\to\infty} I_{2k} = \frac{2k-1}{2k}\cdot \frac{2k-3}{2k-2}\cdots \frac{1}{2}I_0 = \frac{(2k)!}{4^k (k!)^2}.$$
By Tannery's theorem (https://en.wikipedia.org/wiki/Tannery%27s_theorem),
we have
$$\lim_{t\to \infty} \int_0^\infty \frac{1}{\mathrm{e}^x + \sin t x}\mathrm{d} x
= \sum_{k=0}^\infty \frac{1}{2k+1} \frac{(2k)!}{4^k (k!)^2}
= \frac{\pi}{2}.$$
</s>