# An integral inequality with cosine

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!

• I suspect you do a Taylor expansion for this problem. – user23793 Nov 28 '18 at 2:09
• @user23793 And what do you do after that actually? – Sachpazis Stelios Nov 28 '18 at 2:11
• What are the conditions on $a$ and $b$? When you say "prove it by splitting the integral in integrals of length $2\pi$", the length of $[a,b]$ may be less than $2\pi$, in which case you may have to consider some cases. Also, could you clarify what you mean in the sentence I quoted? – user23793 Nov 28 '18 at 2:34
• @user23793 Usually the length of the interval is large, a lot greater than $2\pi.$ There are no other conditions on $a$ and $b$. We just have to know that both sides are treated as functions of $b$, while $a$ is considered to be constant in terms of $a$. I also edited the question about this clarification. – Sachpazis Stelios Nov 28 '18 at 2:39
• The reason I ask is that there might be a singularity at $0$ if $0\in [a,b]$. It seems that there is some missing information. – user23793 Nov 28 '18 at 2:44

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)\,.$$
• Just a comment. You don't have the $2\pi$ in the denominators after using the integral equality. However, the rest remains valid, because the $2\pi$'s will cancel in the logarithm at the end. – Sachpazis Stelios Nov 29 '18 at 1:39