TITLE: Why is $\displaystyle\int^{\infty}_{0}{(1-\cos x)\over{x^{2}}}dx = \frac\pi{2}$?
QUESTION [7 upvotes]: I have been having trouble understanding Fourier series and analysis in one of my classes. This is one problem from the text and we have to show that this is true. I have done other problems related to this one, but they do not help me. I tried to solve this manually and it has come to naught. As there is already the answer, I would like an explanation so that I may understand this material better. Thanks for all the help.
$$\int^{\infty}_{0}{(1-\cos x)\over{x^{2}}}dx = \frac\pi{2}$$
This is the integral for reference.

REPLY [2 votes]: Another way to obtain the answer is through the Dirichlet integral. Notice that:
$$\int_{0}^{\infty}\frac{1-\cos(x)}{x^{2}}dx=\int_{0}^{\infty}\frac{\sin(x)}{x}dx$$
after an application of integration by parts where I integrated $\frac{1}{x^{2}}$ and differentiated $1-\cos(x)$. Then look at Dirichlet integral.