An integral inequality with cosine

inequalityintegral-inequality

I tried to prove that $$\int_{a}^{b}\frac{|\cos (x)|}{x}dx\leq \frac{2}{\pi}\log\left(\frac{b}{a}\right)+O(1).$$ Of course $O(1)$ as a function of $b$, i.e. a bounded function of $b$. $a$ is considered constant with respect to $b$.
I found this inequality in a paper. There, it is written that we can be prove it by splitting the integral in integrals of length $2\pi$ and by using the basic equality $$\frac{1}{2\pi}\int_0^{2\pi}|\cos(x)|dx=\frac{2}{\pi}.$$ I tried to follow the aforementioned hint, but I got nowhere. I suppose that the term $\log(b/a)$ pops out from the integral $\int_{a}^{b}x^{-1}dx$, but I could not make this integral appear and obtain the desired inequality at the same time.

Do you have any hint? I suspect that it must be easy, but I am probably missing something now. I hope it is not a duplicate. Thanks in advance for your help!

Best Answer

We assume that $a\geq 4\pi$ and $b>a$.

One way to prove the inequality is to partition the range $[a,b]$ into the sets $I_n = [ 2 \pi n , 2\pi (n+1)] $. In particular, we have that $$\int_{a}^{b}\frac{|\cos (x)|}{x}dx = \sum_{n=n_0}^{n_1} \int_{I_n \cap [a,b]} \frac{|\cos (x)|}{x}dx$$ with $n_0 = \lfloor a/2\pi \rfloor$ and $n_1 = \lceil b/2\pi \rceil$.

Now, we have that $$\int_{a}^{b}\frac{|\cos (x)|}{x}dx \leq \sum_{n=n_0}^{n_1} \int_{I_n} \frac{|\cos (x)|}{x}dx \leq \sum_{n=n_0}^{n_1} \int_{I_n} \frac{|\cos (x)|}{2\pi n}dx = \frac{2}{\pi} \sum_{n=n_0}^{n_1}\frac{1}{2\pi n} \leq \frac{2}{\pi} \int_{\lfloor a/2\pi \rfloor -1}^{\lceil b/2\pi \rceil} \frac{dn}{2\pi n} \\= \frac{2}{\pi} \log\left(\frac{b}a\right) + O(1)\,.$$

Related Question