how to prove the following improper integral is diverging $\int_{\pi/2}^{\infty}\left |\frac{\cos(x)}{x+\sin(x)} \right | dx $ I have no idea how to prove the following improper integral is diverging.
The integral is
$$\int_{\pi/2}^{\infty}\left |\frac{\cos(x)}{x+\sin(x)} \right |\,dx $$
It was a part of a question to prove that the same integral without the absolute sign is converging but not absolutely converging.
There's a hint in the question saying we should prove this by turning the integral into a sum of integrals each with length $\pi$.
I tried it and it leads nowhere. Any help will be appreciated.
 A: The denominator $x + \sin x$ for $x \geq \pi/2 > 1$, is never negative. So let's look at the numerator. This of course alternates positive and negative on intervals of width $\pi$, so these are the natural intervals to look at, (e.g. the first one is from $\pi/2$ to $3\pi/2$ and cosine is negative, so the whole integrand is negative).
OK great. Now imagine $x$ is large. The denominator is between $x - 1$ and $x+1$, so it's about $x$. So on the interval $[(N/2)\pi, (N/2+1)\pi]$ you have something that is, up to some constants, roughly equal to 
$$
\frac{\cos x}{N}
$$
Then you can actually estimate that 
$$
\int_{(N/2)\pi}^{(N/2+1)\pi} \frac{cos x}{x + sin x}\; dx \approx \pm(\text{constant})\times\frac{1}{N} ,
$$
depending on whether or not cosine is positive or negative on the interval. This leads to the convergent case being similar to the alternating harmonic series and the failure of absolute convergence corresponding to the harmonic series.
A: If you set $x=t+\pi/2$, then the integral becomes
$$
\int_{0}^\infty\left|\frac{\sin t}{t+\cos t}\right|\,dt
$$
We can as well use the lower bound $\pi$, so $0\le t+\cos t\le t+1$, and we have
$$
\left|\frac{\sin t}{t+\cos t}\right|\ge
\frac{\lvert\sin t\rvert}{t+1}
$$
so you can look at the divergence of
$$
\int_\pi^\infty\frac{\lvert\sin t\rvert}{t+1}\,dt
$$
and you can consider
$$
\int_{k\pi}^{(k+1)\pi}\frac{\lvert\sin t\rvert}{t+1}\,dt
$$
Now, with the substitution $t=u+k\pi$ and using that, for $0\le u\le \pi$, $u+k\pi+1\le \pi+k\pi+1$,
$$
\int_{k\pi}^{(k+1)\pi}\frac{\lvert\sin t\rvert}{t+1}\,dt=
\int_{0}^\pi\frac{\sin u}{u+k\pi+1}\,du\ge
\int_0^\pi\frac{\sin u}{(k+1)\pi+1}\,du=\frac{2}{(k+1)\pi+1}
$$
