Contour integration with logarithm

complex-analysiscontour-integrationintegrationlogarithmsresidue-calculus

I want to calculate $\int\limits_{0}^{\infty} \dfrac{\log(x)}{1+x^2}$. To do this, I consider $\int\limits_{\Gamma} \dfrac{\log^2(z)}{1+z^2}$ where $\Gamma$ is the keyhole contour. Basically all I need to do is to calculate $\text{Res}\Big(\dfrac{\log^2(z)}{1+z^2}, i\Big)$ and $\text{Res}\Big(\dfrac{\log^2(z)}{1+z^2}, -i\Big)$. For the first case we have $\text{Res}\Big(\dfrac{\log^2(z)}{1+z^2}, i\Big) = \dfrac{\log^2(z)}{2z}\Big|_{z=i} $ and $\log(i) = i\pi/2$. I'm struggling with the second case, namely with $\text{Res}\Big(\dfrac{\log^2(z)}{1+z^2}, -i\Big)$. Again, we have $\text{Res}\Big(\dfrac{\log^2(z)}{1+z^2}, -i\Big) = \dfrac{\log^2(z)}{2z}\Big|_{z=-i} $ but what is $\log(-i)$? It seems to me that since we're working with the principal branch of logarithm we should have $\log(-i) = \log(|-i|) + i \arg(-i) = 3 \pi i/2$ since for the principal branch of logarithm one has $0 < \arg(z) < 2 \pi$. The "residue calculator" says that it should be $-i\pi/2$ and not $3i\pi/2$. Why?

Best Answer

I think the principal branch of logarithm is defined on the plane with the branch cut along the negative real axis (including zero), so the arguments lie in $(-\pi,\pi)$, directed from the positive real axis, hence $\log(-i) = -i\pi/2$

Related Question