Prove that $$\int_{0}^{\infty} \frac{\cos(x)}{1+x^2} dx = \frac {\pi}{2e}$$ My approach would be $$\lim_{n \to \infty} \int_{0}^{n} \frac{\cos(x)}{1+x^2} dx$$ and evaluate the limits of the sine and cosine integral functions, but I'm pretty sure there is an easier way.
The second integral is $$\int_{0}^{\infty} \frac {\ln(x)}{x^2+b^2} dx, b > 0$$ My approach; Let $f$ be an analytic function $$f(z)=\frac {\ln(z)}{z^2+b^2}$$ then the poles of $f$ would be at $$z=ib, z=-ib$$ Now I don't know what contour to draw and what would be inside it.
For the first, use the parity to write it as an integral over the entire real line, replace $\cos x$ by $e^{ix}$, and use the residue theorem to evaluate
$$\int_{-\infty}^\infty \frac{e^{iz}}{1+z^2}\,dz.$$
For the second integral, use a keyhole contour to integrate
$$\frac{(\log z)^2}{z^2+b^2}.$$
Since the values of $\log z$ differ by $2\pi i$ when approaching the positive half-axis from below and from above, after the cancelling of $\int_0^\infty \frac{(\log x)^2}{x^2+b^2}\,dx$, what remains is the desired integral (times a constant factor) and an integral of $\frac{C}{x^2+b^2}$ over the positive half-axis that poses no difficulty.