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.
 A: Claim: We have $\lim\limits_{t \to + \infty} \int_0^{+ \infty}(e^x+ \sin tx)^{-1}\,dx=\pi/2$.
Proof. We start by writing
\begin{align}\int_0^{+ \infty} \frac{dx}{e^x+ \sin (tx)}&=\int_0^1\frac{du}{1-u\sin(t\log u)}\tag1\\&=\int_0^1\sum_{n=0}^\infty u^n\left(\frac{u^{it}-u^{-it}}{2i}\right)^n\,du\tag2\\&=\int_0^1\sum_{n=0}^\infty\frac1{(2i)^n}\sum_{k=0}^n\binom nku^{n+(2k-n)it}(-1)^{n-k}\,du\tag3\\&=\sum_{n=0}^\infty\left(\frac i2\right)^n\sum_{k=0}^n\binom nk\frac{(-1)^k}{n+1+(2k-n)it}\tag4.\end{align} Uniform convergence means we can interchange limit and sum. On interchanging the order of summation, we can see that the only nonzero term that contributes to the integral as $t\to+\infty$ occurs when $n=2k$ so that the coefficient of $t$ is zero. Thus \begin{align}\lim_{t\to+\infty}\int_0^{+ \infty} \frac{dx}{e^x+ \sin (tx)}&=\sum_{k=0}^\infty\left(-\frac14\right)^k\binom{2k}k\frac{(-1)^k}{2k+1}=\frac\pi2\tag5.\end{align}

$(1):$ substitute $x=-\log u$
$(2):$ geometric series with radius of convergence $|u\sin(t\log u)|<1$ for $u\in(0,1)$
$(3):$ binomial theorem
$(4):$ interchange of integral and sum by Fubini
$(5):$ taylor series of $\arcsin1$
A: A slight modification of OP's attempt will lead to a solution. Indeed, write $I(t)$ for the integral and note that
$$ I(t) = \int_{0}^{\infty} \frac{\mathrm{d}x}{e^x + \sin(tx)}
\stackrel{(y=tx)}= \frac{1}{t} \int_{0}^{\infty} \frac{\mathrm{d}y}{e^{y/t} + \sin y}. $$
Also, define $J(t)$ by
$$ J(t)
= \frac{1}{t} \sum_{k=1}^{\infty} \int_{0}^{2\pi} \frac{\mathrm{d}y}{e^{2\pi k/t} + \sin y}
= \sum_{k=1}^{\infty} \frac{2\pi/t}{\sqrt{e^{4\pi k/t} - 1}}, $$
where the second step follows from the integration formula
$$ \int_{0}^{2\pi} \frac{\mathrm{d}y}{c + \sin y} = \frac{2\pi}{\sqrt{c^2 - 1}}, \qquad c > 1. \tag{1} $$
Then similarly as in OP's attempt, we obtain
$$ J(t) \leq I(t) \leq J(t) + \frac{1}{t} \int_{0}^{2\pi} \frac{\mathrm{d}y}{e^{y/t} + \sin y}. \tag{2} $$
Now we observe:

*

*Since the map $ u \mapsto \frac{1}{\sqrt{e^{2u} - 1}} $ is monotone decreasing, we have
$$ \int_{2\pi/t}^{\infty} \frac{\mathrm{d}u}{\sqrt{e^{2u} - 1}} \leq J(t) \leq \int_{0}^{\infty} \frac{\mathrm{d}u}{\sqrt{e^{2u} - 1}}. $$
So by the squeezing theorem, we get
$$ \lim_{t \to \infty} J(t) = \int_{0}^{\infty} \frac{\mathrm{d}u}{\sqrt{e^{2u} - 1}} = \frac{\pi}{2}. $$


*Observe that
$$ \int_{\pi}^{2\pi} \frac{\mathrm{d}y}{c + \sin y}
\stackrel{\text{(1)}}\leq \frac{2\pi}{\sqrt{c^2 - 1}}. $$
From this, we have
\begin{align*}
\frac{1}{t} \int_{0}^{2\pi} \frac{\mathrm{d}y}{e^{y/t} + \sin y}
&\leq \frac{1}{t} \left( \int_{0}^{\pi} \mathrm{d}y + \int_{\pi}^{2\pi} \frac{\mathrm{d}y}{e^{\pi/t} + \sin y} \right) \\
&\leq \frac{1}{t} \left( \pi + \frac{2\pi}{\sqrt{e^{2\pi/t} - 1}} \right).
\end{align*}
It is not hard to check that this bound converges to $0$ as $t \to \infty$.
Combining altogether and applying the squeezing theorem to $\text{(2)}$, we get
$$ \lim_{t\to\infty} I(t) = \frac{\pi}{2}. $$

Further Discussion:

*

*This proof can actually show that $I(t) = \frac{\pi}{2} + \mathcal{O}(t^{-1/2})$ as $t \to \infty$. Can we do better? It is reasonable to suspect that the asymptotic formula takes the form
$$I(t) = \frac{\pi}{2} + \frac{c}{\sqrt{t}} + \cdots \tag{3} $$
Is this true? If so, then what will be the value of $c$? I do not have enough time and energy to pursue in this direction right now (I need to crawl into the bed right now), but it seems an interesting question.


Addendum. Regarding the extra question, the following heuristic approach gives a guess on the value of the constant $c$ in the asymptotic expansion $\text{(3)}$:
Note that, for $x > 0$ and $\theta \in \mathbb{R}$,
\begin{align*}
\frac{1}{e^x + \sin\theta}
&= \frac{1}{\sqrt{e^{2x}-1}} \biggl( 1 + 2 \sum_{k=1}^{\infty} \frac{(-1)^k}{(e^x + \sqrt{e^{2x}-1})^{2k-1}} \sin((2k-1)\theta) \\
&\hspace{7em}  + 2 \sum_{k=1}^{\infty} \frac{(-1)^k}{(e^x + \sqrt{e^{2x}-1})^{2k}} \cos (2k\theta) \biggr).
\end{align*}
Using this and substituting $\epsilon = 1/t$, we have
\begin{align*}
I(t)
&= \int_{0}^{\infty} \frac{\mathrm{d}x}{\sqrt{e^{2x}-1}} \\
&\quad + 2 \sum_{k=1}^{\infty} (-1)^k \int_{0}^{\infty} \frac{\sin((2k-1)x/\epsilon)}{\sqrt{e^{2x}-1}(e^x + \sqrt{e^{2x}-1})^{2k-1}} \, \mathrm{d}x \\
&\quad +2 \sum_{k=1}^{\infty} (-1)^k \int_{0}^{\infty} \frac{\cos(2kx/\epsilon)}{\sqrt{e^{2x}-1}(e^x + \sqrt{e^{2x}-1})^{2k}} \, \mathrm{d}x \\
&= \frac{\pi}{2} + 2 \sqrt{\epsilon} \sum_{k=1}^{\infty} (-1)^k \int_{0}^{\infty} \sqrt{\frac{\epsilon}{e^{2\epsilon u} - 1}} \frac{\sin((2k-1)u)}{(e^{\epsilon u} + \sqrt{e^{2\epsilon u}-1})^{2k-1}} \, \mathrm{d}u \\
&\hspace{3em} + 2 \sqrt{\epsilon} \sum_{k=1}^{\infty} (-1)^k \int_{0}^{\infty} \sqrt{\frac{\epsilon}{e^{2\epsilon u} - 1}} \frac{\cos(2ku)}{(e^{\epsilon u} + \sqrt{e^{2\epsilon u}-1})^{2k-1}} \, \mathrm{d}u,
\end{align*}
where we utilized the substitution $x = \epsilon u$ in the last step. So it is reasonable to expect that $c$ in $\text{(3)}$ is given by:
\begin{align*}
c
&= 2 \sum_{k=1}^{\infty} (-1)^k \int_{0}^{\infty} \lim_{\epsilon \to 0^+} \sqrt{\frac{\epsilon}{e^{2\epsilon u} - 1}} \frac{\sin((2k-1)u)}{(e^{\epsilon u} + \sqrt{e^{2\epsilon u}-1})^{2k-1}} \, \mathrm{d}u \\
&\quad + 2 \sum_{k=1}^{\infty} (-1)^k \int_{0}^{\infty} \lim_{\epsilon \to 0^+}  \sqrt{\frac{\epsilon}{e^{2\epsilon u} - 1}} \frac{\cos(2ku)}{(e^{\epsilon u} + \sqrt{e^{2\epsilon u}-1})^{2k-1}} \, \mathrm{d}u \\
&= 2 \sum_{k=1}^{\infty} (-1)^k \biggl( \int_{0}^{\infty} \frac{\sin((2k-1)u)}{\sqrt{2u}} \, \mathrm{d}u + \int_{0}^{\infty} \frac{\cos(2ku)}{\sqrt{2u}} \, \mathrm{d}u \biggr) \\
&= \sum_{k=1}^{\infty} (-1)^k \biggl( \sqrt{\frac{\pi}{2k-1}} + \sqrt{\frac{\pi}{2k}} \biggr),
\end{align*}
where we utilized the identity
$$ \int_{0}^{\infty} \frac{\sin(a u)}{\sqrt{u}} \, \mathrm{d}u = \int_{0}^{\infty} \frac{\cos(a u)}{\sqrt{u}} \, \mathrm{d}u = \sqrt{\frac{\pi}{2a}}, \qquad a > 0. $$
Of course, interchanging the order of limit operators requires a great deal of care, especially in the situation like this where the absolute convergence fails. So this is not a proof yet, but rather a hand-waving heuristics. (Even the possibility that this guess is not true at all is still open to question!)
A: 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}.$$
A: $$
I(t)=\int^{\infty}_{0}\frac{1}{e^x+\sin(tx)}dx=\int^{\infty}_{0}e^{-x}\frac{1}{1+e^{-x}\sin(t x)}dx=
$$
$$
=\int^{\infty}_{0}e^{-x}\sum^{\infty}_{l=0}(-1)^le^{-lx}\sin(tx)dx
=\sum^{\infty}_{l=0}(-1)^l\int^{\infty}_{0}e^{-x(l+1)}\sin^l(tx)dx=
$$
$$
=t^{-1}\sum^{\infty}_{l=0}(-1)^l L\left(\sin^l(x),x,\frac{l+1}{t}\right)=
$$
$$
=t^{-1}\sum^{\infty}_{l=0} L\left(\sin^{2l}(x),x,\frac{2l+1}{t}\right)-t^{-1}\sum^{\infty}_{l=0} L\left(\sin^{2l+1}(x),x,\frac{2l+2}{t}\right).\tag 1
$$
where $L(f,x,w)=\int^{\infty}_{0}f(x)e^{-wx}dx$ is the Laplace transform and
$$
L(\sin^l(x),x,s)=\left\{
\begin{array}{cc}
l!/s\prod^{l/2}_{j=1}((2j)^2+s^2)\textrm{, if }l=even\\
l!/\prod^{(l-1)/2}_{j=0}((2j+1)^2+s^2)\textrm{, if }l=odd
\end{array}\right\}\tag 2
$$
Factoring $(2)$ and using the Pochhammer symbol ($(a)_s=\frac{\Gamma(a+s)}{\Gamma(a)}$), we get
$$
L(\sin^{2l}(x),x,s)=\frac{2^{-l}l!}{s\left(1-\frac{is}{2}\right)_{1/2}\left(1+\frac{is}{2}\right)_{1/2}}\tag 3
$$
and
$$
L(\sin^{2l+1}(x),x,s)=\frac{2^{-l}l!\tanh(\pi s/2)}{s\left(1-\frac{is}{2}\right)_{1/2}\left(1+\frac{is}{2}\right)_{1/2}},\tag 4
$$
Taking now the limit $t\rightarrow+\infty$ in $(1)$ using $(3),(4)$, we arive to
$$
\lim_{t\rightarrow\infty}I(t)=\sum^{\infty}_{l=0}\frac{4^{-l}(2l)!}{(2l+1)l!^2}+0=\frac{\pi}{2}.
$$
