Why is $\displaystyle\int^{\infty}_{0}{(1-\cos x)\over{x^{2}}}dx = \frac\pi{2}$? 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.
 A: Since $1-\cos x=2\sin^2(x/2)$ we have
$$
I:=\int^{\infty}_{0}\frac{(1-\cos x)}{x^2}dx 
=\int_{0}^{\infty}\frac{4\sin^2(x/2)}{x^2}dx 
$$
After substitution $t=x/2$ we get
$$
I=\int_{0}^{\infty}\frac{2\sin^2 t}{t^2}dt 
$$
Since the function $\frac{2\sin^2 t}{t^2}$ is even, we can say
$$
I=\frac{1}{2}\int_{-\infty}^{\infty}\frac{2\sin^2 t}{t^2}dt 
=\int_{-\infty}^{\infty}\frac{\sin^2 t}{t^2}dt 
$$
Now see this answer
A: 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.
A: We have the following property for Laplace transforms:
$$\mathcal{L} \left\{ \frac{f(t)}{t} \right\}(s)=\int_s^\infty F(p)dp. $$ Replacing $f(t)$ with $\frac{f(t)}{t}$ gives a slight generalization:
$$\mathcal{L} \left\{ \frac{f(t)}{t^2} \right\}(s)=\int_s^\infty \mathcal{L} \left\{ \frac{f(t)}{t} \right\}(p)dp=\int_s^\infty \int_p^\infty F(q)dqdp. $$
Finally, using $f(t)=1-\cos t$ in the above and taking $s=0$ gives
$$\int_0^\infty \frac{1-\cos t}{t^2} e^{-0t}dt=\int_0^\infty \int_p^\infty \left( \frac{1}{q}-\frac{q}{q^2+1} \right)dq dp=\int_0^\infty \log q-\frac{1}{2}\log (q^2+1) \big]_{q=p}^{q=\infty} dp
=\int_0^\infty \left( \frac{1}{2} \log(p^2+1)-\log p \right) dp $$ and the last integral can evaulated to $\frac{\pi}{2}$ via integration by parts.
