# Problem with $\int_{0}^{\infty} \frac{\log^2(x)}{1+x^2}$ (by residues) [duplicate]

I, I am trying solve the following integral $$\int_{0}^{\infty} \frac{\log^2(x)}{1+x^2}$$

Teachers teached me that I can solve the integral $$\int_{0}^{\infty} \frac{\log^2(x)}{1+x^2}=\frac{d^2}{d\lambda^2} \int_{0}^{\infty} \frac{x^{\lambda}}{1+x^2}$$

I get to the second integral that $$\int_{0}^{\infty} \frac{x^{\lambda}}{1+x^2}=\frac{2\pi i}{1-e^{2\pi i \lambda}}sin\left(\lambda \frac{\pi}{2}\right)=\frac{-\pi}{e^{\pi i \lambda}sin(\pi\lambda)}\sin\left(\lambda \frac{\pi}{2}\right)$$

so when I try derivate I can get a exist solution because when $\lambda=0$ then $sin(\lambda \pi)=0$

I have to solve the integral by residue methods, with the formula

## marked as duplicate by colormegone, 3SAT, user296602, Ron Gordon complex-analysis StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Feb 7 '16 at 21:21

• @user311551 : work first on $\int_a^b$ and see what happens when $]a;b[ \to ]0;\infty[$ (and you'll probably have to use a theorem for the invertion of two limits because of the derivation) – reuns Feb 7 '16 at 21:15