Improper integral of $\sin(\sin(x))$ I need to decide if the following integral converges or not :
$$\int_0^\infty \sin(\sin(x))dx$$
I am pretty sure it diverges. I was told to prove it by using the fact that for $k=0,1,2,\cdots$, then $\lvert x -2k\pi\rvert \geq \lvert \sin(x) \rvert \geq \frac{\lvert x -2k\pi \rvert }{2}$ for $\lvert x -2k\pi\rvert$ small enough. I thought of using some criteria on comparison of improper integrals but the absolute values I was given makes it weird because if the integral is not absolutely convergent does not mean the integral diverges.
 A: Since $\sin(\sin x)$ is an odd function, we know that
$$\int_{-\pi}^{\pi}\sin(\sin x)\,dx = 0.$$
From this, we can determine that
$$\begin{align}
\int_{\pi}^{2\pi} \sin(\sin x)\,dx &= \int_{-\pi}^{0} \sin(\sin x)\,dx\\
&= -\int_0^{\pi} \sin(\sin x)\,dx.
\end{align}$$
Now $\sin(\sin x)$ is positive for $x$ in the interval $(0, \pi)$, and so is the integral $I := \int_0^{\pi} \sin(\sin x)\,dx$. Then for an even multiple of $\pi$, we have
$$\begin{align}
\int_0^{2n\pi} \sin(\sin x)\,dx &= \sum_{k = 0}^{n - 1}\int_{2k\pi}^{2(k+1)\pi} \sin(\sin x)\,dx\\
&= \sum_{k = 0}^{n - 1}\int_0^{2\pi} \sin(\sin x)\,dx\\
&= 0.
\end{align}$$
For an odd multiple of $\pi$, we have
$$\begin{align}
\int_0^{(2 n + 1)\pi} \sin(\sin x)\,dx &= \int_0^{2 n\pi} \sin(\sin x)\,dx + \int_{2n\pi}^{(2n + 1)\pi} \sin(\sin x)\,dx \\
&= \int_0^{\pi} \sin(\sin x)\,dx \\
&= I.
\end{align}$$
But these are two sequences for the upper limit of the integral, both of which go to infinity, and yet the integrals converge to different values. Thus, the improper integral does not converge.
A: Let $f : [0, \infty) \to \Bbb R$ be continuous and periodic with $1$ as a period. Suppose that $\displaystyle\int_0^\infty f$ converges.
Claim 1. $\int_0^1 f = 0.$
Proof. By periodicity, we have that $$\int_0^N f = N \int_0^1 f$$ for all $N \in \Bbb N$. Since the improper integral exists, the above must have a limit as $N \to \infty$. This is possible iff $\int_0^1 f = 0$. $\Box$
Claim 2. $\int_0^\infty f = 0$.
Proof. Since the above integral is assumed to exist, we may take the top limit to go to infinity however we want. In particular, we have
$$\int_0^\infty f = \lim_{\substack{N \to \infty \\ N \in \Bbb N}} \int_0^N f = 0.$$
Claim 3. $\int_0^t f = 0$ for all $t \in [0, \infty)$.
Proof. Fix $t \in [0, \infty)$. For $N \in \Bbb N$, note that
\begin{align}
\int_0^{N + t} f &= \int_0^N f + \int_N^{N + t} f \\
&= 0 + \int_0^t f.
\end{align}
Again, taking $N \to \infty$ gives the result. $\Box$
Claim 4. $f \equiv 0$, i.e., $f$ is the constant function taking the value $0$.
Proof. Here is where we use continuity for the first time. Let $$F(x) = \int_0^x f.$$
Then, $F$ is identically $0$, by the previous claim. Since $f$ is continuous, we have $F' = f$ and thus, $f \equiv 0$. $\Box$

Of course, I can change the period to $2 \pi$ as well. In that case, we get that your integral diverges.
Note that continuity was important, otherwise I can take something like the indicator function of $\Bbb N$. That has integral $0$ but the function does not even vanish at $\infty$.
Moreover, periodicity is also important. For example, there do non-negative continuous functions $f : [0, \infty) \to [0, \infty)$ such that $\displaystyle\int_0^\infty f$ converges but $f$ does not have a limit at $\infty$.
A: The subsequence
$$\lim_{k\to\infty}\int_0^{2\pi k}\sin(\sin(x))\:dx = 0$$
is strictly $0$, but the subsequence
$$\lim_{k\to\infty}\int_0^{\pi+2\pi k}\sin(\sin(x))\:dx = \int_0^\pi\sin(\sin(x))\:dx > 0$$
is strictly positive, thus the limit does not exist.
