Residues to solve an improper integral I'm asked to solve the following improper integral:

$$\int_0^\infty \frac{\rm {Log}^2(t)}{1+t^2}dt. $$

Do I consider the function $f(z) = \frac{\rm{Log}^2(z)}{1+z^2}$ or some variant?
Is the correct contour the so called "keyhole" that skips the $(0,+\infty)$ interval?
Any hints and tips are appreciated. I don't want this problem to be completely solved, just need the starter and some ideas that I can use in this case and similar ones.
Thanks a lot!
 A: To use a keyhole contour $C$, consider
$$\oint_C dz \frac{\log^3{z}}{1+z^2}$$
You can show that the integrals about the circular arcs about the origin, both large and small, vanish as theire respective radii go to $\infty$ and $0$.  The contour integral is therefore equal to
$$\int_0^{\infty} dx \frac{\log^3{x} - (\log{x}+i 2 \pi)^3}{1+x^2} $$
which simplifies to
$$-i 6 \pi \int_0^{\infty} dx \frac{\log^2{x}}{1+x^2} + 12 \pi^2 \int_0^{\infty} dx \frac{\log{x}}{1+x^2} + i 8 \pi^3 \int_0^{\infty}  \frac{dx}{1+x^2} $$
The contour integral is equal to $i 2 \pi$ times the sum of the residues of the poles of the integrand, namely $z=e^{i \pi/2}$ and $z=e^{i 3 \pi/2}$.  (Note that it is crucial that $\arg{z} \in [0,2 \pi)$.)  This sum is 
$$\frac{-i \pi^3/8}{2 i} +  \frac{-i 27 \pi^3/8}{-2 i} = \frac{13 \pi^3}{8} $$
Multiplying by $i 2 \pi$, we have
$$i \left [- 6 \pi \int_0^{\infty} dx \frac{\log^2{x}}{1+x^2} +  8 \pi^3 \int_0^{\infty}  \frac{dx}{1+x^2} \right ] + 12 \pi^2 \int_0^{\infty} dx \frac{\log{x}}{1+x^2}  = i \frac{13 \pi^4}{4}$$
Equating imaginary parts and noting that the second integral in the brackets is simply $\pi/2$ (you should have  permission to evaluate that without residues), we have
$$- 6 \pi \int_0^{\infty} dx \frac{\log^2{x}}{1+x^2}  = \frac{13 \pi^4}{4} - 4 \pi^4 = -\frac{3 \pi^4}{4} $$
or 
$$\int_0^{\infty} dx \frac{\log^2{x}}{1+x^2}  = \frac{\pi^3}{8}$$
A: Instead of contour integration, here is an easier way out. Note that
$$\int_1^{\infty} \dfrac{\log^2(t)}{1+t^2}dt = \int_1^0 \dfrac{\log^2(1/t)}{1+1/t^2}\dfrac{-dt}{t^2} = \int_0^1\dfrac{\log^2(t)}{1+t^2}dt$$
Hence, the integral you are interested in is nothing but
$$I = 2 \int_0^1 \dfrac{\log^2(t)}{1+t^2}dt = 2 \sum_{k=0}^{\infty}(-1)^k\int_0^1 t^{2k} \log^2(t) dt = 4 \sum_{k=0}^{\infty}\dfrac{(-1)^k}{(2k+1)^3} = \dfrac{\zeta(3,1/4)-\zeta(3,3/4)}{16} = \dfrac{\pi^3}{8}$$
where the last identity can be obtained from the properties of the PolyLogarithm function.
