integration from 0->oo cosx-1/x^2dx=-pi/2
show that ^. the x^2 at the bottom throws me off because your points equal to zero?? Im not sure how to start?
So it's:
$\displaystyle \int_0^{\infty} \frac{\cos(x)-1}{x^2}$
Usually when you have sines and cosines like that, consider using $\displaystyle e^{iz}=\cos(z)+i\sin(z)$ then in your case, take the real part. So how about trying:
$\displaystyle \mathop\oint\limits_{W_u} \frac{e^{iz}}{z^2}dz$
With $\displaystyle W_h$ being the upper half-washer with an indentation around the pole at the origin. Note, the pole is simple, so we can immediately calculate the integral around the indentation as it's radius goes to zero. It's $\displaystyle -\pi i r_0$ where $\displaystyle r_0$ is the residue at the origin. Add the other two legs from minus infinity to plus infinity and note that the integrand is even so take one half of that.