# Question about $\frac{\sin(x)}{x}$ and $\frac{\cos(x)}{x}$

So here is my question.

As known the famous integral $$\int_0^{\infty} \frac{\sin(x)}{x}dx$$ converges an its value is $\frac{\pi}{2}$.

As I was trying to solve a different integral today, after rewriting and integrating by parts I ended up having the following integral on the paper, $$\int_0^{\infty}\frac{\cos(x)}{x}dx$$ After several times failling to solve it I "asked" Wolfram-Alpha and i got the answer that $$\int_0^{\infty}\frac{\cos(x)}{x}dx=\infty$$ which in my opinion was very surprising because as $\int_0^{\infty} \frac{\sin(x)}{x}dx$ converges I was expecting so was $\int_0^{\infty}\frac{\cos(x)}{x}dx$. I have to admit that I even didnt manage to prove that it is divergent. Is there an intutitive explanation for $\int_0^{\infty}\frac{\cos(x)}{x}dx=\infty$? Or maybe if someone could provide the prove that it is divergent that will be already "intutitve" enough...

• The problem lies at $x = 0$. – Antonio Vargas Jun 10 '14 at 20:34
• Near $0$, you have $\frac{\cos x}{x} \sim \frac{1}{x}$. – Daniel Fischer Jun 10 '14 at 20:35
• @DanielFischer ahh that makes sense! I just see I should have ploted the funtion :D – Thorben Jun 10 '14 at 20:37
• Try plugging into Wolfram Alpha $\int_0^{\infty} \frac {1-\cos x}{x^2}\,dx$. – Yoni Rozenshein Jun 10 '14 at 20:56

You can gain some intuition by looking at the graph of $\sin(x)/x$ and $\cos(x)/x$ respectively and to see how it behaves. As you can see $\cos(x)/x$ has as an asymptote the $y$-axis. • Thanks a lot! I actually feel quite stupid not ploting the function... – Thorben Jun 10 '14 at 21:02
• @Thorben You're welcome, glad I could help! ;-) – Hakim Jun 10 '14 at 21:16

We have

$$\frac{\cos x}{x}\sim_0\frac1x$$ hence the given integral is divergent.

$\cos0 = 1$, so $\cos x>1-\varepsilon$ for $-\delta<x<\delta$. Therefore $$\int_0^\infty \frac{\cos x}{x}\,dx \ge\int_0^\delta \frac{1-\varepsilon}{x} \, dx = \infty.$$

I tried to solve in this way but I couldn't come to conclusion $$\int_0^\infty\frac{\cos x}{x} \, dx=\int_0^\infty\int_{-\infty}^x\frac{\cos x}{-y^2}\,dy\,dx\\ =\int_{-\infty}^0\int_0^\infty\frac{\cos x}{-y^2}\,dy\,dx+\int_0^\infty\int_y^\infty\frac{\cos x}{-y^2}\,dy\,dx\\ =\int_{-\infty}^0\left(\left.\frac{\sin x}{-y^2}\right|_0^\infty\right)\,dy+\int_0^\infty\left(\left.\frac{\sin x}{-y^2}\right|_y^\infty\right)\,dy\\ =\int_{-\infty}^0(\lim_{x\to-\infty}\frac{\sin x}{y^2})\,dy+\int_0^\infty(\lim_{x\to\infty}\frac{\sin x}{-y^2}-\frac{\sin y}{-y^2})\,dy\\ =\int_0^\infty(\lim_{x\to-\infty}\frac{\sin x}{y^2})\,dy+\int_0^\infty(\lim_{x\to\infty}\frac{\sin x}{-y^2}-\frac{\sin y}{-y^2})\,dy$$