I am trying to find the integral $$\int_0^{\infty} f(z) \, \mathrm{d}z \, , \hspace{4mm} f(z) = \frac{z \ln(1+z)}{[(x-z)^2+y^2] [(x+z)^2+y^2]} $$ with $x, y > 0$. I have recently come across contour integration and I was wondering how to apply this in my case.
From what I understand, I would split a contour into a line across the real axis from $0$ to $\infty$, a line across the imaginary axis from $0$ to $i \infty$, and an arc that connects the points. Then I would use the method of residues for the contour integral. Unfortunately, I cannot evaluate the integral along the imaginary axis.
Can you guide me along a way how to solve the integral?
First case: the logarithmic term is $\log(z)$.
I would simplify the problem by noticing that $$ \frac{z}{[(x-z)^2+y^2][(x+z)^2+y^2]}=\frac{1}{4x}\left[\frac{1}{(x-z)^2+y^2}-\frac{1}{(x+z)^2+y^2}\right] $$ then by computing $$ I_{\pm} = \int_{0}^{+\infty}\frac{\log z}{(x\pm z)^2+y^2}\,dz\stackrel{z\mapsto xu}{=}x\int_{0}^{+\infty}\frac{\log u+\log x}{x^2(1\pm u)^2+y^2}\,du. $$ The term $\int_{0}^{+\infty}\frac{\log x}{x^2(1\pm u)^2+y^2}\,du$ is elementary and the term $\int_{0}^{+\infty}\frac{\log u}{x^2(1\pm u)^2+y^2}\,du$ can be reduced to an elementary one (involving $\log$ and $\arctan$) by Feynman's trick. The final outcome is $$ \int_{0}^{+\infty}\frac{z\log(z)}{[(x-z)^2+y^2][(x+z)^2+y^2]}\,dz = \color{blue}{\frac{\log(x^2+y^2)}{4xy}\,\arctan\left(\frac{x}{y}\right)}.\tag{1}$$
Second case: the logarithmic term is $\log(z+1)$.
We can still apply Feynman's trick by writing $\log(z+1)$ as $\log(z)+\int_{0}^{1}\frac{da}{a+z}$. Since $$ \int_{0}^{+\infty}\frac{z}{(z+a)[(z-x)^2+y^2][(x+z)^2+y^2]}\,dz $$ can be computed by partial fraction decomposition, the problem boils down to finding $$ \int_{0}^{1}\frac{\log(a)}{(a+x-iy)(a+x+iy)}\,da $$ which, again by partial fraction decomposition, equals $$ \frac{1}{2iy}\left[\text{Li}_2\left(-\frac{1}{x-iy}\right)-\text{Li}_2\left(-\frac{1}{x+iy}\right)\right]=\frac{1}{y}\,\text{Im}\,\text{Li}_2\left(-\frac{1}{x-iy}\right).\tag{2}$$ If $x\pm iy\in S^1$, the RHS can be written in terms of the Fourier series $\sum_{n\geq 1}\frac{\sin(n\theta)}{n^2}$.