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...
I appreciate any answers.
Thanks in advance!
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.