# Prove $\int_{\pi}^{\infty}\frac{\cos(x)}{x}dx$ is convergent

I am supposed to prove that the integral in the question is convergent, but I seem to be stuck on finding an upper bound. It's obvious that the integrand is not positive for all $x \in [\pi, \infty[$ so the next step is to examine the absolute value of the integrand. However, this is where the problem arises. I calculate as follows:

$$\int_{\pi}^{\infty}\ \left|{\frac{\cos(x)}{x}}\right| = \int_{\pi}^{\infty}{\frac{\left| \cos(x) \right|}{x}} \space \text{on the interval}$$ Since $0 \leq |\cos(x) |\leq 1$ we can write the following inequality:

$$\int_{\pi}^{\infty}{\frac{|\cos(x) |}{x}} \leq \int_{\pi}^{\infty}{\frac{1}{x}}$$ However, the integral $\int_{\pi}^{\infty}{\frac{1}{x}}$ diverges and thus this way is wrong or we need to obtain an upper bound which converges, but how exactly do we do that? My question is essentially if I am on the right track or if I need to resort to some different method.

• Your approach is a good idea, but not in this case: indeed $\int_{\pi}^{\infty} \frac{|\cos x|}{x} \mathrm{d}x$ diverges. Jan 29, 2018 at 17:32

You can first integrate by parts for $X > \pi$

$$\int_{\pi}^{X}\frac{\cos\left(x\right)}{x}\text{d}x=\left[\frac{\sin\left(x\right)}{x}\right]^{X}_{\pi}+\int_{\pi}^{X}\frac{\sin\left(x\right)}{x^2}\text{d}x$$

Then you can apply your inequality $$\left|\frac{\sin\left(X\right)}{X}\right| \leq \frac{1}{X} \underset{X \rightarrow +\infty}{\rightarrow}0$$ and then $$\left|\frac{\sin\left(x\right)}{x^2}\right| \leq \frac{1}{x^2}$$ which is integrable on $\left[\pi, +\infty\right[$. Letting $X \rightarrow +\infty$ gives you the convergence of the first integral because the three terms you find that one is constant, one tends to a constant and the last tends to $0$.

• Ah, I see now exactly. But is there some way to tell whether to rewrite the integral; assume I didn't know the integral was converging, using these two different methods would result in two different answers? Jan 29, 2018 at 17:38
• I dont get your question, what two answers ? Jan 29, 2018 at 17:39
• I mean, if I were to use the absolute signs and find it to diverge, but also rewrite the integral as you did and find it to converge. Jan 29, 2018 at 17:40
• You can remark I did not integrate by part on $\left[\pi,+\infty\right[$ but only on $\left[\pi,X\right]$ for some $X> \pi$. I did that just to avoid what you said, you cannot integrate by part directly on $\left[\pi,+\infty\right[$ because it could lead to divergent integral ! You could try with the absolute signs it would lead you to something that diverges, or worst, does not exist. Jan 29, 2018 at 17:42
• Oh, yeah, I see now...Actually the fact that the integral on the right (of my inequality) diverges tells us nothing about the integral in question! My bad. Jan 29, 2018 at 17:43

Hint: \begin{align} \int_\pi^\infty\frac{\cos(x)}{x}\,\mathrm{d}x &=\sum_{k=1}^\infty\int_{(2k-1)\pi}^{(2k+1)\pi}\frac{\cos(x)}{x}\,\mathrm{d}x\\ &=\sum_{k=1}^\infty\int_{-\pi}^\pi\frac{\cos(x)}{x+2k\pi}\,\mathrm{d}x\\ &=\sum_{k=1}^\infty\int_0^\pi\left[\frac{\cos(x)}{x+2k\pi}-\frac{\cos(x)}{x+(2k-1)\pi}\right]\mathrm{d}x\\ &=-\pi\sum_{k=1}^\infty\int_0^\pi\frac{\cos(x)}{(x+2k\pi)(x+(2k-1)\pi)}\,\mathrm{d}x\\ \end{align} and $$\left|\,\frac{\cos(x)}{(x+2k\pi)(x+(2k-1)\pi)}\,\right|\le\frac1{2k(2k-1)\pi^2}$$

$\sum_\limits{n=2}^{\infty} \int_{(n-\frac 12)\pi}^{(n+\frac 12)\pi} \frac {\cos x}{x} dx$ produces an alternating series.

if $a_n$ is an alternating series

$\sum_\limits{n=1}^{\infty} a_n$ converges if:

$\lim_\limits{n\to \infty}a_n = 0$ and for some $N, n>N \implies|a_{n+1}| < |a_n|$

$$\int_{\pi}^{+\infty}\frac{\cos x}{x}\,dx$$ is convergent by Dirichlet's test since $\left|\int_I\cos(x)\,dx\right|\leq 2$ and $\frac{1}{x}$ decreases to zero on $x\geq \pi$.
Accurate upper bounds can be deduced from the Laplace transform and Holder's inequality. Indeed $$\int_{\pi}^{+\infty}\frac{\cos(x)}{x}\,dx = \int_{0}^{+\infty}\frac{-\cos x}{x+\pi}\,dx = -\int_{0}^{+\infty}\frac{s e^{-\pi s}}{1+s^2}\,ds<0$$ but $$\int_{0}^{+\infty}\frac{s e^{-\pi s}}{1+s^2}\,ds = \int_{0}^{+\infty}\left(\frac{s^{1/4}}{1+s^2}\right)^1\cdot\left(s^{1/4} e^{-\pi s/3}\right)^3\,ds$$ is bounded by $$\left[\int_{0}^{+\infty}\frac{s\,ds}{(1+s^2)^4}\right]^{1/4}\cdot\left[\int_{0}^{+\infty}s e^{-4\pi s/3}\,ds\right]^{3/4}=\sqrt{\frac{3^5}{2^{13}\,\pi^6}}\leq\frac{3}{40}.$$