Complex Analysis – Evaluating $\int_0^{ \infty } \frac{\log(x^{2}+1)}{x^{4}+1}dx$ Using Contour Integration

complex-analysiscontour-integrationresidue-calculus

I started off with this contour(I apologize for the software i used but I am new to this all).

i used this contour https://dochub.com/m/shared-document/madhavasthana/1XEpyxzwN5JN1vZVQZGd38/null-1-png?dt=wSzeX2E6NohcehhbdSE6

there is a branch cut from $i \to i{\infty}$, and another one from $-i \to -i{\infty}$.

the contour encloses only two poles, namely $z=e^{\pi i/4}$ and $z=e^{3\pi i/4}$.

by residue theorem,
$$\oint_C \frac{\log(z^{2}+1)}{z^{4}+1}dz = 2 \pi i\sum_{z_i=e^{i\pi/4},e^{3i\pi/4}}\operatorname{Res}\left[\frac{\log(z^{2}+1)}{z^{4}+1},z_i\right]$$

upon applying L'Hospital rule to evaluate the residues,

$$\oint_C = 2\pi i(\lim_{z \to e^\frac{i\pi}{4}}(z-e^\frac {i\pi}{4})\frac{\log(z^{2}+1)}{z^{4}+1}+\lim_{z \to e^\frac{3\pi i}{4}}(z-e^\frac {3\pi i}{4})\frac{\log(z^{2}+1)}{z^{4}+1})=2\pi i\left(\frac{\log(1+i)}{4e^{\frac{3i\pi}{4}}} + \frac{\log(1-i)}{4e^{\frac{i\pi}{4}}}\right)=\frac{\pi}{2}[e^\frac{-i\pi}{4}(\frac{ln2}{2}+ i\frac{\pi}{4})+e^\frac{i\pi}{4}(\frac{ln2}{2}-i\frac{\pi}{4})]=\frac{\pi}{2}[\frac{{e^\frac{i\pi}{4}}+e^\frac{-i\pi}{4}}{2}ln2+(\frac{1}{\sqrt2}+\frac{i}{\sqrt2})(\frac{\pi}{4}-\frac{i\pi}{4})]=\frac{\pi}{2}[\frac{1}{\sqrt2}ln2+\frac{\pi}{4\sqrt2}(1+i)(1-i)]=\frac{\pi}{2\sqrt2}[ln2+\frac{\pi}{2}]$$

I am guessing I made a mistake in the arguments when opened them using $\log(z)=\log|z|+ i\arg z$, taking the arguments as $\frac{\pi}{4}$ for $z=1+i$ and $\frac{-\pi}{4}$ for $z=1-i$, but that yielded the wrong answer. apart from the LHS having the residues, everything in the RHS with the twice the desired integral and line integrals along the imaginary axis and around $z=i$ were right as follows

If $$\displaystyle \int_0^{ \infty } \frac{\log(x^{2}+1)}{x^{4}+1}dx=I$$

then in the limit as $\lim_{a \to \infty}$ and $\lim_{b \to 0}$

$$\frac{\pi}{2\sqrt2}[ln2+\frac{\pi}{2}]= 2I – 2\pi i \int_i^{i\infty}\frac{1}{z^{4}+1} dz$$ (the round trip around $z=i$, cancels out the $\log$ terms and leaves a difference of $2\pi i$).

I would appreciate some help on how to evaluate the desired integral with this contour.

Best Answer

There are several ways to proceed. Here, we will evaluate the integral of interest $I$, as given by

$$I=\int_0^\infty \frac{\log(x^2+1)}{x^4+1}\,dx$$

using contour integration. Hence, we will evaluate the conotu integral $J$ as given by

$$J=\oint_C \frac{\log(z^2+1)}{z^4+1}\,dz$$

where $C$ is the keyhole contour as defined by the OP. Using the residue theorem, we find that

$$\begin{align} \int_{-\infty}^\infty \frac{\log(x^2+1)}{x^4+1}\,dx&=\int_1^\infty \frac{[\log(x^2-1)+i\pi]-[\log(x^2-1)-i\pi]}{1+x^4}\,i\,dx\\\\ &+2\pi i \text{Res}\left(\frac{\log(z^2+1)}{z^4+1}, z=e^{i\pi/4}\right)\\\\ 2\int_0^\infty \frac{\log(x^2+1)}{x^4+1}\,dx&=-2\pi \int_1^\infty \frac1{x^4+1}\,dx+2\pi i \left(\frac{\log(\sqrt{2})+i\pi/4}{4e^{i3\pi/4}}+\frac{\log(\sqrt2)-i\pi/4}{4e^{i9\pi/4}}\right)\\\\ \int_0^\infty \frac{\log(x^2+1)}{x^4+1}\,dx&=- \underbrace{\int_1^\infty \frac{\pi}{x^4+1}\,dx}_{=\pi^2\sqrt{2}/8 -\pi\sqrt{2}\text{coth}^{-1}(\sqrt{2})/4}+\frac\pi 4\left(\sqrt2 \log(\sqrt2)+\pi \sqrt 2/4\right)\\\\ &=\frac{\pi \sqrt 2}{4}\left(\log(2+\sqrt2)-\pi/4\right) \end{align}$$

And we are done!

Related Question