OK. Think of integrating tan(z)/z around a rectangle, where real
part goes from -M*pi to M*pi, imaginary part goes from 0 to R.
At the simple poles (2*k+1)Pi/2, use the principal value.
[These residues cancel in +/- pairs.] Fixing R, when
M goes to infinity (along integers), the integrals on the two ends
go to zero (because of the denominator), so the real integral
we are interested in is the same as the integral along the horizontal
line x+i*R, where R is large and positive. But tan(x+i*R)
goes uniformly to i as R -> infinity, so this upper integral converges
to int(i/(x+i*R), x=-infinity..infinity), and that is, indeed, pi
(in the principal value sense, the limit of the integral -M to M).
Our integral from -infinity to infinity, then, is pi, so
our integral from 0 to infinity is pi/2.
--
G. A. Edgar
http://www.math.ohio-state.edu/~edgar/