How can I study the convergence of the improper integral $\int_{0}^{ \infty} \frac{\sin(x)}{x+1} \, \mathrm dx\,$? I need to study the convergence of the following improper integral:
$$\int_{0}^{\infty} \dfrac{\sin(x)}{x+1}\, \mathrm dx$$
I did the following:
$$ -1 \leq \sin(x)  \leq 1  \\
\implies \dfrac{-1}{x+1}  \leq \dfrac{\sin(x)}{x+1}  \leq \dfrac{1}{x+1} \\   
\implies \left|\dfrac{\sin(x)}{x+1}\right|  \leq \dfrac{1}{x+1} \\
 \implies \int_{0}^{\infty} \left|\dfrac{\sin(x)}{x+1}\right| \, \mathrm dx   \leq \int_{0}^{\infty}\dfrac{1}{x+1}\, \mathrm dx = \infty  $$
I planned to use the comparison criterion and then the absolute convergence criterion. However, the idea did not work for me.
Notice that
$$\int_0^\infty \frac{\sin x}{x+1}\,dx = \frac{-\cos x}{x+1}\Bigg|_0^\infty - \int_0^\infty \frac{\cos x}{(x+1)^2}\,dx = 1 - \int_0^\infty \frac{\cos x}{(x+1)^2}\,dx$$
and the last integral converges absolutely since
$$\int_0^\infty \frac{\left|\cos x\right|}{(x+1)^2}\,dx \le \int_0^\infty \frac{dx}{(x+1)^2} = \int_1^\infty \frac{dx}{x^2} &lt; +\infty.$$
However the original integral does not converge absolutely. Namely, we have $$x \in \bigcup_{k \in \mathbb{N}_0} \left[\frac\pi6+k\pi,\frac{5\pi}6+k\pi\right] \implies \left|\sin x\right| \ge \frac12$$
so
$$\int_0^\infty \frac{\left|\sin x\right|}{x+1}\,dx \ge \frac12\sum_{k=0}^\infty \int_{\frac\pi6+k\pi}^{\frac{5\pi}6+k\pi} \frac{dx}{x+1} = \frac12\sum_{k=0}^\infty \ln \frac{\frac{5\pi}6+k\pi+1}{\frac\pi6+k\pi+1} = +\infty.$$
Let
$$
a_n = \int_{\pi n}^{\pi(n+1)}\frac{|\sin x|}{x+1}dx.
$$
Note that
$$
\int_0^\infty \frac{\sin x}{x+1}dx = \sum_{n=0}^\infty (-1)^n a_n.
$$
So, if the series converges, the integral must also converge. For any positive integer $n$, we can see that $a_n$ is positive, and we can rewrite it the following way:
$$
\begin{align}
a_n = \int_{\pi n}^{\pi(n+1)}\frac{|\sin x|}{x+1}dx &amp;= \int_{\pi n}^{\pi(n+1)}\frac{\sin (x - \pi n)}{x+1}dx\\
&amp;= \int_0^\pi\frac{\sin x}{x+1+\pi n}dx.
\end{align}
$$
This makes it clear that the denominator of $a_{n+1}$ is larger than the denominator of $a_n$ over the entire interval integrated, so $a_n$ must be decreasing. Furthermore, it is easy to see that $\lim_{n\to\infty} a_n=0$. Therefore, by the alternating series test, the integral converges.