TITLE: Test for convergence $\int_0^{\infty} \frac{\sin(x)}{x+\log(x)} \ dx$
QUESTION [9 upvotes]: What is the easiest way to test the convergence of 
$$\int_0^{\infty} \frac{\sin(x)}{x+\log(x)} \ dx$$
Is it possible to only use the high school tools for that?

REPLY [3 votes]: In strict terms, the integral diverges since near $x=\mathrm{W}(1)$, where $x+\log(x)=0$, we have
$$
\frac{\sin(x)}{x+\log(x)}\sim\frac{\mathrm{W}(1)\sin(\mathrm{W}(1))}{\mathrm{W}(1)+1}\frac1{x-\mathrm{W}(1)}\tag{1}
$$
However, we can get a value using the Cauchy Principal Value. In fact, using contour integration, we have
$$
\begin{align}
&\mathrm{PV}\int_0^\infty\frac{\sin(x)}{x+\log(x)}\mathrm{d}x\\
&=\mathrm{Im}\left(\mathrm{PV}\int_0^\infty\frac{e^{ix}}{x+\log(x)}\mathrm{d}x\right)\\
&=\mathrm{Im}\left(\pi i\frac{\mathrm{W}(1)e^{i\mathrm{W}(1)}}{\mathrm{W}(1)+1}\right)+\mathrm{Im}\left(\int_0^\infty\frac{e^{-x}}{ix+\log(x)+i\frac\pi2}i\,\mathrm{d}x\right)\\
&=\pi\frac{\mathrm{W}(1)\cos(\mathrm{W}(1))}{\mathrm{W}(1)+1}+\int_0^\infty\frac{\log(x)}{\left(x+\frac\pi2\right)^2+\log(x)^2}e^{-x}\,\mathrm{d}x\\
&\doteq0.8626229904173762889\tag{2}
\end{align}
$$
We have used the following contour:
$\hspace{4.5cm}$
There are no singularities inside the contour so the integral over the contour is $0$. The integral over the dotted arc vanishes as the arc gets bigger. It is bounded by
$$
\begin{align}
\int_0^{\pi/2}\frac{e^{-R\sin(t)}}{R-\log(R)}R\,\mathrm{d}t
&\le\frac{R}{R-\log(R)}\int_0^{\pi/2}e^{-2Rt/\pi}\mathrm{d}t\\
&\le\frac{\pi/2}{R-\log(R)}\tag{3}
\end{align}
$$
The red paths represent the principal value integral and the green paths reversed represent the residue and integral in the next to last line of $(2)$.