# Contour integration to evaluate integral from 0 to infinity

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?

• Are you sure about the term $z\log(z+1)$? There is an elementary solution if such term is replaced by $z\log(z)$. In its current state, besides $\log$ and $\arctan$, the integral involves an $\text{Im}\,\text{Li}_2$, by partial fraction decomposition and Feynman's trick. – Jack D'Aurizio Aug 21 '18 at 22:18
• Yes I am sure about the $z \log(1+z)$ term. When multiplied by $\frac{4}{\pi} x y$, the integral is the solution to the Laplace equation for $x$ and $y$ from 0 to $\infty$ where the boundary condition along the x-axis is $\log(1+x)$ and zero along the y-axis. Can you tell me more about the elementary solution in case of $\log(z)$ and what would be the solution in its current state? – Crenguta Aug 22 '18 at 8:28
• Of course, but better to update the question in such a case, in order to prevent a discrepancy between the question body and the future answer. – Jack D'Aurizio Aug 22 '18 at 12:23

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}$.
• Thank you very much. I still do not understand how, in the second case, you get from the first integral to the second integral $\int_0^1 \dots da$. Can you show me some more steps? Also, what do you mean by the Fourier series? On a side note, can you recommend any books that explain the tricks you used in your derivation? – Crenguta Aug 23 '18 at 10:26