Evaluate the following integral for \(t>0\) and for \(t<0\) when \(\omega _{0}>0\) and \(\epsilon \rightarrow 0^{+}\)\[ \int _{-\infty }^{\infty }\frac{e^{i\omega t}}{\left ( \omega -i\epsilon \right ) ^{2}-\omega _{0}^{2}}d\omega \] Solution
Case \(t>0\)
We select the upper half for contour \(C\) since when \(t>0\) the integral on upper half will vanish as will be shown below.
Hence\begin{align*} \int _{-\infty }^{\infty }\frac{e^{i\omega t}}{\left ( \omega -i\epsilon \right ) ^{2}-\omega _{0}^{2}}d\omega & ={\displaystyle \oint \limits _{C}} \frac{e^{izt}}{\left ( z-i\epsilon \right ) ^{2}-\omega _{0}^{2}}dz\\ & =\lim _{R\rightarrow \infty }\left ( P.V.\right ) \int _{-R}^{R}\frac{e^{izt}}{\left ( z-i\epsilon \right ) ^{2}-\omega _{0}^{2}}dz+\int _{CR}\frac{e^{izt}}{\left ( z-i\epsilon \right ) ^{2}-\omega _{0}^{2}}dz\\ & =2\pi i\sum \operatorname{Residue} \end{align*}
Therefore, if we can show that \(\lim _{R\rightarrow \infty }\) \(\int _{CR}\frac{e^{izt}}{\left ( z-i\epsilon \right ) ^{2}-\omega _{0}^{2}}dz=0\), then the above implies that \begin{equation} \int _{-\infty }^{\infty }\frac{e^{i\omega t}}{\left ( \omega -i\epsilon \right ) ^{2}-\omega _{0}^{2}}d\omega =2\pi i\sum \operatorname{Residue} \tag{1} \end{equation} Now we need to find the residues inside the contour shown. There is a pole when \(\left ( \omega -i\epsilon \right ) ^{2}=\omega _{0}^{2}\) or \(\omega -i\epsilon =\pm \omega _{0}\) or \(\omega =i\epsilon \pm \omega _{0}\). Hence there are two simple poles, they are\begin{align*} z_{1} & =i\epsilon +\omega _{0}\\ z_{2} & =i\epsilon -\omega _{0} \end{align*}
They are both in upper half, inside the contour (since \(\omega _{0}>0\) and \(\epsilon \) is positive).
Now we find the residues\begin{align} \operatorname{Residue}\left ( z_{1}\right ) & =\lim _{z\rightarrow z_{1}}\left ( z-z_{1}\right ) \frac{e^{izt}}{\left ( z-z_{1}\right ) \left ( z-z_{2}\right ) }\nonumber \\ & =\lim _{z\rightarrow z_{1}}\frac{e^{izt}}{\left ( z-z_{2}\right ) }\nonumber \\ & =\frac{e^{it\left ( i\epsilon +\omega _{0}\right ) }}{\left ( i\epsilon +\omega _{0}\right ) -\left ( i\epsilon -\omega _{0}\right ) }\nonumber \\ & =\frac{e^{-t\epsilon }e^{it\omega _{0}}}{2\omega _{0}} \tag{2} \end{align}
And\begin{align} \operatorname{Residue}\left ( z_{2}\right ) & =\lim _{z\rightarrow z_{2}}\left ( z-z_{2}\right ) \frac{e^{izt}}{\left ( z-z_{1}\right ) \left ( z-z_{2}\right ) }\nonumber \\ & =\lim _{z\rightarrow z_{2}}\frac{e^{izt}}{\left ( z-z_{1}\right ) }\nonumber \\ & =\frac{e^{it\left ( i\epsilon -\omega _{0}\right ) }}{\left ( i\epsilon -\omega _{0}\right ) -\left ( i\epsilon +\omega _{0}\right ) }\nonumber \\ & =\frac{e^{-t\epsilon }e^{-it\omega _{0}}}{-2\omega _{0}} \tag{3} \end{align}
Substituting (2,3) into (1) gives\begin{align*} \int _{-\infty }^{\infty }\frac{e^{i\omega t}}{\left ( \omega -i\epsilon \right ) ^{2}-\omega _{0}^{2}}d\omega & =2\pi i\left ( \frac{e^{-t\epsilon }e^{it\omega _{0}}}{2\omega _{0}}+\frac{e^{-t\epsilon }e^{-it\omega _{0}}}{-2\omega _{0}}\right ) \\ & =\frac{2\pi i}{2\omega _{0}}e^{-t\epsilon }\left ( e^{it\omega _{0}}-e^{-it\omega _{0}}\right ) \\ & =\frac{2\pi }{\omega _{0}}e^{-t\epsilon }\left ( \frac{e^{it\omega _{0}}-e^{-it\omega _{0}}}{-2i}\right ) \\ & =-\frac{2\pi }{\omega _{0}}e^{-t\epsilon }\left ( \frac{e^{it\omega _{0}}-e^{-it\omega _{0}}}{2i}\right ) \\ & =-\frac{2\pi }{\omega _{0}}e^{-t\epsilon }\sin \left ( t\omega _{0}\right ) \end{align*}
Now, to finish the solution, we must show that \(\lim _{R\rightarrow \infty }\) \(\int _{CR}\frac{e^{izt}}{\left ( z-i\epsilon \right ) ^{2}-\omega _{0}^{2}}dz=0\). But
\begin{align} \int _{CR}\frac{e^{izt}}{\left ( z-i\epsilon \right ) ^{2}-\omega _{0}^{2}}dz & \leq \left \vert \int _{CR}\frac{e^{izt}}{\left ( z-i\epsilon \right ) ^{2}-\omega _{0}^{2}}dz\right \vert _{\max }\nonumber \\ & \leq \int _{CR}\left \vert \frac{e^{izt}}{\left ( z-i\epsilon \right ) ^{2}-\omega _{0}^{2}}\right \vert _{\max }dz\nonumber \\ & =\left \vert \frac{e^{izt}}{\left ( z-i\epsilon \right ) ^{2}-\omega _{0}^{2}}\right \vert _{\max }\int _{CR}dz\nonumber \\ & =\left \vert \frac{e^{izt}}{\left ( z-i\epsilon \right ) ^{2}-\omega _{0}^{2}}\right \vert _{\max }\int _{0}^{\pi }Rd\theta \nonumber \\ & =R\pi \left \vert \frac{e^{izt}}{\left ( z-i\epsilon \right ) ^{2}-\omega _{0}^{2}}\right \vert _{\max } \tag{4} \end{align}
But\begin{align*} \left \vert \frac{e^{izt}}{\left ( z-i\epsilon \right ) ^{2}-\omega _{0}^{2}}\right \vert _{\max } & \leq \frac{\left \vert e^{izt}\right \vert _{\max }}{\left \vert \left ( z-z_{1}\right ) \left ( z-z_{2}\right ) \right \vert _{\min }}\\ & \leq \frac{\left \vert e^{izt}\right \vert _{\max }}{\left \vert \left ( z-z_{1}\right ) \right \vert _{\min }\left \vert \left ( z-z_{2}\right ) \right \vert _{\min }}\\ & =\frac{\left \vert e^{it\left ( x+iy\right ) }\right \vert _{\max }}{\left \vert \left ( z-z_{1}\right ) \right \vert _{\min }\left \vert \left ( z-z_{2}\right ) \right \vert _{\min }}\\ & =\frac{\left \vert e^{itx-ty}\right \vert _{\max }}{\left \vert \left ( z-z_{1}\right ) \right \vert _{\min }\left \vert \left ( z-z_{2}\right ) \right \vert _{\min }}\\ & =\frac{\left \vert e^{itx}\right \vert _{\max }\left \vert e^{-ty}\right \vert _{\max }}{\left \vert \left ( z-z_{1}\right ) \right \vert _{\min }\left \vert \left ( z-z_{2}\right ) \right \vert _{\min }}\\ & \leq \frac{\left \vert e^{-ty}\right \vert _{\max }}{\left \vert \left ( z-z_{1}\right ) \right \vert _{\min }\left \vert \left ( z-z_{2}\right ) \right \vert _{\min }} \end{align*}
Now, since \(y>0\) (we are in the upper half) and also since \(t>0\), then \(\left \vert e^{-ty}\right \vert _{\max }=1\), which occurs when \(y=0\). Hence the above becomes\[ \left \vert \frac{e^{izt}}{\left ( z-i\epsilon \right ) ^{2}-\omega _{0}^{2}}\right \vert _{\max }\leq \frac{1}{\left \vert \left ( z-z_{1}\right ) \right \vert _{\min }\left \vert \left ( z-z_{2}\right ) \right \vert _{\min }}\] By inverse triangle inequality \(\left \vert \left ( z-z_{1}\right ) \right \vert _{\min }\geq \left \vert z\right \vert ^{2}+\left \vert z_{1}\right \vert ^{2}=R^{2}+\left \vert \epsilon ^{2}+\omega _{0}^{2}\right \vert ^{2}\) and \(\left \vert \left ( z-z_{2}\right ) \right \vert _{\min }\geq \left \vert z\right \vert ^{2}+\left \vert z_{2}\right \vert ^{2}=R^{2}+\left \vert \epsilon ^{2}+\omega _{0}^{2}\right \vert ^{2}\). The above becomes\[ \left \vert \frac{e^{izt}}{\left ( z-i\epsilon \right ) ^{2}-\omega _{0}^{2}}\right \vert _{\max }\leq \frac{1}{2R^{2}+2\left \vert \epsilon ^{2}+\omega _{0}^{2}\right \vert ^{2}}\] Substituting the above in (4) gives\begin{align*} \lim _{R\rightarrow \infty }\int _{CR}\frac{e^{izt}}{\left ( z-i\epsilon \right ) ^{2}-\omega _{0}^{2}}dz & \leq \lim _{R\rightarrow \infty }R\pi \left ( \frac{1}{2R^{2}+2\left \vert \epsilon ^{2}+\omega _{0}^{2}\right \vert ^{2}}\right ) \\ & =\pi \lim _{R\rightarrow \infty }\frac{R}{2R^{2}+2\left \vert \epsilon ^{2}+\omega _{0}^{2}\right \vert ^{2}} \end{align*}
But \(2\left \vert \epsilon ^{2}+\omega _{0}^{2}\right \vert ^{2}\) is a finite value, say \(\beta \) so the above is \[ \lim _{R\rightarrow \infty }\int _{CR}\frac{e^{izt}}{\left ( z-i\epsilon \right ) ^{2}-\omega _{0}^{2}}dz\leq \pi \lim _{R\rightarrow \infty }\frac{R}{2R^{2}+\beta }\] And it is clear now that the above limit goes to zero. In other words, \(\lim _{R\rightarrow \infty }\frac{R}{2R^{2}+\beta }=\lim _{R\rightarrow \infty }\frac{\frac{1}{R}}{2+\frac{\beta }{R^{2}}}=\frac{0}{2}=0\).
Hence The final solution is\[ \int _{-\infty }^{\infty }\frac{e^{i\omega t}}{\left ( \omega -i\epsilon \right ) ^{2}-\omega _{0}^{2}}d\omega =-\frac{2\pi }{\omega _{0}}e^{-t\epsilon }\sin \left ( t\omega _{0}\right ) \] Case \(t<0\)
Here, we must use the lower half for the contour in order for the half circle contour integral to vanish.
In this case the sum of residues is zero (since both poles are in the upper half), then we see right away that \[ \int _{-\infty }^{\infty }\frac{e^{i\omega t}}{\left ( \omega -i\epsilon \right ) ^{2}-\omega _{0}^{2}}d\omega =0\qquad t<0 \] But we must show that \(\lim _{R\rightarrow \infty }\int _{CR}\frac{e^{izt}}{\left ( z-i\epsilon \right ) ^{2}-\omega _{0}^{2}}dz=0\) here as well for the above result to be valid. Similar to what was done earlier:\begin{align} \int _{CR}\frac{e^{izt}}{\left ( z-i\epsilon \right ) ^{2}-\omega _{0}^{2}}dz & \leq \left \vert \int _{CR}\frac{e^{izt}}{\left ( z-i\epsilon \right ) ^{2}-\omega _{0}^{2}}dz\right \vert _{\max }\nonumber \\ & \leq \int _{CR}\left \vert \frac{e^{izt}}{\left ( z-i\epsilon \right ) ^{2}-\omega _{0}^{2}}\right \vert _{\max }dz\\ & =R\pi \left \vert \frac{e^{izt}}{\left ( z-i\epsilon \right ) ^{2}-\omega _{0}^{2}}\right \vert _{\max } \tag{4} \end{align}
But\begin{align*} \left \vert \frac{e^{izt}}{\left ( z-i\epsilon \right ) ^{2}-\omega _{0}^{2}}\right \vert _{\max } & \leq \frac{\left \vert e^{izt}\right \vert _{\max }}{\left \vert \left ( z-z_{1}\right ) \right \vert _{\min }\left \vert \left ( z-z_{2}\right ) \right \vert _{\min }}\\ & \leq \frac{\left \vert e^{it\left ( x+iy\right ) }\right \vert _{\max }}{\left \vert \left ( z-z_{1}\right ) \right \vert _{\min }\left \vert \left ( z-z_{2}\right ) \right \vert _{\min }}\\ & =\frac{\left \vert e^{itx-ty}\right \vert _{\max }}{\left \vert \left ( z-z_{1}\right ) \right \vert _{\min }\left \vert \left ( z-z_{2}\right ) \right \vert _{\min }}\\ & =\frac{\left \vert e^{itx}\right \vert _{\max }\left \vert e^{-ty}\right \vert _{\max }}{\left \vert \left ( z-z_{1}\right ) \right \vert _{\min }\left \vert \left ( z-z_{2}\right ) \right \vert _{\min }}\\ & \leq \frac{\left \vert e^{-ty}\right \vert _{\max }}{\left \vert \left ( z-z_{1}\right ) \right \vert _{\min }\left \vert \left ( z-z_{2}\right ) \right \vert _{\min }} \end{align*}
Since \(y<0\) (we are now in lower half) and also since \(t<0\), then \(\left \vert e^{-ty}\right \vert _{\max }=1\), which occurs when \(y=0\). Hence\[ \left \vert \frac{e^{izt}}{\left ( z-i\epsilon \right ) ^{2}-\omega _{0}^{2}}\right \vert _{\max }\leq \frac{1}{\left \vert \left ( z-z_{1}\right ) \right \vert _{\min }\left \vert \left ( z-z_{2}\right ) \right \vert _{\min }}\] But by inverse triangle inequality \(\left \vert \left ( z-z_{1}\right ) \right \vert _{\min }\geq \left \vert z\right \vert ^{2}+\left \vert z_{1}\right \vert ^{2}=R^{2}+\left \vert \epsilon ^{2}+\omega _{0}^{2}\right \vert ^{2}\) and \(\left \vert \left ( z-z_{2}\right ) \right \vert _{\min }\geq \left \vert z\right \vert ^{2}+\left \vert z_{2}\right \vert ^{2}=R^{2}+\left \vert \epsilon ^{2}+\omega _{0}^{2}\right \vert ^{2}\). Hence the above becomes\[ \left \vert \frac{e^{izt}}{\left ( z-i\epsilon \right ) ^{2}-\omega _{0}^{2}}\right \vert _{\max }\leq \frac{1}{2R^{2}+2\left \vert \epsilon ^{2}+\omega _{0}^{2}\right \vert ^{2}}\] The rest follows what was done in first part. Therefore\begin{align*} \lim _{R\rightarrow \infty }\int _{CR}\frac{e^{izt}}{\left ( z-i\epsilon \right ) ^{2}-\omega _{0}^{2}}dz & \leq \lim _{R\rightarrow \infty }R\pi \left ( \frac{1}{2R^{2}+2\left \vert \epsilon ^{2}+\omega _{0}^{2}\right \vert ^{2}}\right ) \\ & =\pi \lim _{R\rightarrow \infty }\frac{R}{2R^{2}+2\left \vert \epsilon ^{2}+\omega _{0}^{2}\right \vert ^{2}} \end{align*}
But \(2\left \vert \epsilon ^{2}+\omega _{0}^{2}\right \vert ^{2}\) is finite number, say \(\beta \) so the above is \[ \lim _{R\rightarrow \infty }\int _{CR}\frac{e^{izt}}{\left ( z-i\epsilon \right ) ^{2}-\omega _{0}^{2}}dz\leq \pi \lim _{R\rightarrow \infty }\frac{R}{2R^{2}+\beta }\] And it is clear now that the above limit goes to zero.
The final solution is\[ \int _{-\infty }^{\infty }\frac{e^{i\omega t}}{\left ( \omega -i\epsilon \right ) ^{2}-\omega _{0}^{2}}d\omega =0\qquad t<0 \]
Evaluate the following integrals \(\int _{0}^{\infty }\frac{\ln x}{1+x^{2}}dx\) and \(\int _{0}^{\infty }\frac{\ln ^{2}x}{1+x^{2}}dx\). In order to find the second one you need to consider the integral \(\int _{0}^{\infty }\frac{\ln ^{3}x}{1+x^{2}}dx\)
Solution
There are two ways to find \(\int _{0}^{\infty }\frac{\ln x}{1+x^{2}}dx\). One uses a substitution method and requires no complex contour integration and the second method uses \(\int _{0}^{\infty }\frac{\ln ^{2}x}{1+x^{2}}dx\) with complex integration to find \(\int _{0}^{\infty }\frac{\ln x}{1+x^{2}}dx.\)
Method one
Let \(x=\frac{1}{y}\). Hence \(dx=-\frac{1}{y^{2}}dy\,\). When \(x=0\rightarrow y=\infty \) and when \(x=\infty \rightarrow y=0\). Hence the integral \(\int _{0}^{\infty }\frac{\ln x}{1+x^{2}}dx\) becomes\begin{align*} \int _{0}^{\infty }\frac{\ln x}{1+x^{2}}dx & =\int _{\infty }^{0}\frac{\ln \left ( \frac{1}{y}\right ) }{1+\frac{1}{y^{2}}}\left ( -\frac{1}{y^{2}}dy\right ) \\ & =-\int _{\infty }^{0}\frac{\ln \left ( \frac{1}{y}\right ) }{\frac{y^{2}+1}{y^{2}}}\left ( \frac{1}{y^{2}}dy\right ) \\ & =-\int _{\infty }^{0}\frac{\ln \left ( \frac{1}{y}\right ) }{y^{2}+1}dy\\ & =\int _{\infty }^{0}\frac{\ln \left ( y\right ) }{y^{2}+1}dy\\ & =-\int _{0}^{\infty }\frac{\ln \left ( y\right ) }{y^{2}+1}dy \end{align*}
Since on the RHS \(y\) is arbitrary integration variable, we can rename it back to \(x\). Hence the above becomes\begin{align*} \int _{0}^{\infty }\frac{\ln x}{1+x^{2}}dx & =-\int _{0}^{\infty }\frac{\ln \left ( x\right ) }{x^{2}+1}dy\\ 2\int _{0}^{\infty }\frac{\ln x}{1+x^{2}}dx & =0 \end{align*}
Therefore \[ \fbox{$\int _0^\infty \frac{\ln x}{1+x^2}dx=0$}\] Method two
In this method will use complex integration on \(\int _{0}^{\infty }\frac{\ln ^{2}z}{1+z^{2}}dz\) to show that \(\int _{0}^{\infty }\frac{\ln z}{1+z^{2}}dz=0\). The following contour will be used.
\begin{align*}{\displaystyle \oint } \frac{\ln ^{2}z}{1+z^{2}}dz & ={\displaystyle \oint } f\left ( z\right ) dz\\ & =\int _{L_{2}}f\left ( z\right ) dz+\int _{C_{r_{0}}}f\left ( z\right ) dz+\int _{L_{1}}f\left ( z\right ) dz+\int _{C_{R}}f\left ( z\right ) dz\\ & =2\pi i\sum \operatorname{Residue} \end{align*}
Hence \begin{equation} \int _{L_{2}}f\left ( z\right ) dz+\int _{C_{r_{0}}}f\left ( z\right ) dz+\int _{L_{1}}f\left ( z\right ) dz+\int _{C_{R}}f\left ( z\right ) dz=2\pi i\sum \operatorname{Residue} \tag{1} \end{equation} There are two poles in \(\frac{\ln ^{2}z}{\left ( z-i\right ) \left ( z+i\right ) }\). Residue at \(z_{1}=i\) is\begin{align} \operatorname{Residue}\left ( i\right ) & =\lim _{z\rightarrow i}\left ( z-i\right ) \frac{\ln ^{2}z}{\left ( z-i\right ) \left ( z+i\right ) }\nonumber \\ & =\lim _{z\rightarrow i}\frac{\ln ^{2}z}{\left ( z+i\right ) }\nonumber \\ & =\frac{\ln ^{2}i}{2i}\nonumber \\ & =\frac{\left ( \ln \left ( 1\right ) +i\frac{\pi }{2}\right ) ^{2}}{2i}\nonumber \\ & =\frac{\left ( i\frac{\pi }{2}\right ) ^{2}}{2i}\nonumber \\ & =\frac{-\frac{\pi ^{2}}{4}}{2i}\nonumber \\ & =\frac{-\pi ^{2}}{8i} \tag{2} \end{align}
And\begin{align*} \operatorname{Residue}\left ( -i\right ) & =\lim _{z\rightarrow -i}\left ( z+i\right ) \frac{\ln ^{2}z}{\left ( z-i\right ) \left ( z+i\right ) }\\ & =\lim _{z\rightarrow -i}\frac{\ln ^{2}z}{\left ( z-i\right ) }\\ & =\frac{\ln ^{2}\left ( -i\right ) }{-2i} \end{align*}
But \(\ln \left ( -i\right ) =\ln \left ( 1\right ) +i\frac{3}{2}\pi \). Notice that the phase is \(\frac{3}{2}\pi \) and not \(-\frac{\pi }{2}\) since we are using principle branch defined as \(0<\theta <2\pi \). Therefore the above becomes\begin{align} \operatorname{Residue}\left ( -i\right ) & =\frac{\left ( \ln \left ( 1\right ) +i\frac{3}{2}\pi \right ) ^{2}}{-2i}\nonumber \\ & =\frac{-\frac{9}{4}\pi ^{2}}{-2i}\nonumber \\ & =\frac{9\pi ^{2}}{8i} \tag{3} \end{align}
Adding (2+3) and substituting in (1) gives\begin{align*} \int _{L_{2}}f\left ( z\right ) dz+\int _{C_{r_{0}}}f\left ( z\right ) dz+\int _{L_{1}}f\left ( z\right ) dz+\int _{C_{R}}f\left ( z\right ) dz & =2\pi i\left ( \frac{-\pi ^{2}}{8i}+\frac{9\pi ^{2}}{8i}\right ) \\ \int _{L_{2}}f\left ( z\right ) dz+\int _{C_{r_{0}}}f\left ( z\right ) dz+\int _{L_{1}}f\left ( z\right ) dz+\int _{C_{R}}f\left ( z\right ) dz & =2\pi ^{3} \end{align*}
We will show at the end that \(\lim _{r_{0}\rightarrow 0}\int _{C_{r_{0}}}f\left ( z\right ) dz=0\) and that \(\lim _{R\rightarrow \infty }\int _{C_{R}}f\left ( z\right ) dz=0\). Given this, the above simplifies to only two integrals to evaluate\begin{equation} \int _{L_{2}}f\left ( z\right ) dz+\int _{L_{1}}f\left ( z\right ) dz=2\pi ^{3} \tag{3A} \end{equation} We will now work on finding \(\int _{L_{1}}f\left ( z\right ) dz\). Let \(z=re^{i\epsilon }\), hence \(dz=dre^{i\epsilon }\) and the integral becomes\begin{align*} \int _{L_{1}}\frac{\ln ^{2}z}{1+z^{2}}dz & =\int _{0}^{\infty }\frac{\ln ^{2}\left ( re^{i\epsilon }\right ) }{1+\left ( re^{i\epsilon }\right ) ^{2}}dre^{i\epsilon }\\ & =e^{i\epsilon }\int _{0}^{\infty }\frac{\left ( \ln r+i\epsilon \right ) ^{2}}{1+r^{2}e^{2i\epsilon }}dr\\ & =e^{i\epsilon }\int _{0}^{\infty }\frac{\ln ^{2}r+i^{2}\epsilon ^{2}+2i\epsilon \ln r}{1+r^{2}e^{2i\epsilon }}dr \end{align*}
Now taking the limit as \(\epsilon \rightarrow 0\) the above becomes\begin{equation} \int _{L_{1}}\frac{\ln ^{2}z}{1+z^{2}}dz=\int _{0}^{\infty }\frac{\ln ^{2}r}{1+r^{2}}dr \tag{4} \end{equation} We will now work on finding \(\int _{L_{2}}f\left ( z\right ) dz\). Let \(z=re^{i\left ( 2\pi -\epsilon \right ) }\), hence \(dz=dre^{i\left ( 2\pi -\epsilon \right ) }\) and the integral becomes\begin{align*} \int _{L_{2}}\frac{\ln ^{2}z}{1+z^{2}}dz & =\int _{\infty }^{0}\frac{\ln ^{2}\left ( re^{i\left ( 2\pi -\epsilon \right ) }\right ) }{1+\left ( re^{i\left ( 2\pi -\epsilon \right ) }\right ) ^{2}}dre^{i\left ( 2\pi -\epsilon \right ) }\\ & =e^{i\left ( 2\pi -\epsilon \right ) }\int _{\infty }^{0}\frac{\left ( \ln \left ( r\right ) +i\left ( 2\pi -\epsilon \right ) \right ) ^{2}}{1+r^{2}e^{2i\left ( 2\pi -\epsilon \right ) }}dr\\ & =e^{i\left ( 2\pi -\epsilon \right ) }\int _{\infty }^{0}\frac{\ln ^{2}\left ( r\right ) -\left ( 2\pi -\epsilon \right ) ^{2}+2i\left ( 2\pi -\epsilon \right ) \ln r}{1+r^{2}e^{2i\left ( 2\pi -\epsilon \right ) }}dr\\ & =e^{i\left ( 2\pi -\epsilon \right ) }\int _{\infty }^{0}\frac{\ln ^{2}\left ( r\right ) -\left ( 4\pi ^{2}+\epsilon ^{2}-4\pi \epsilon \right ) +2i\left ( 2\pi -\epsilon \right ) \ln r}{1+r^{2}e^{2i\left ( 2\pi -\epsilon \right ) }}dr \end{align*}
Taking the limit as \(\epsilon \rightarrow 0\) the above becomes\[ \int _{L_{2}}\frac{\ln ^{2}z}{1+z^{2}}dz=e^{i2\pi }\int _{\infty }^{0}\frac{\ln ^{2}\left ( r\right ) -4\pi ^{2}+4\pi i\ln r}{1+r^{2}e^{i4\pi }}dr \] But \(e^{i2\pi }=1\) and \(e^{i4\pi }=1\) then the above becomes\begin{align} \int _{L_{2}}\frac{\ln ^{2}z}{1+z^{2}}dz & =\int _{\infty }^{0}\frac{\ln ^{2}\left ( r\right ) -4\pi ^{2}+4\pi i\ln r}{1+r^{2}}dr\nonumber \\ & =\int _{\infty }^{0}\frac{\ln ^{2}r}{1+r^{2}}dr-\int _{\infty }^{0}\frac{4\pi ^{2}}{1+r^{2}}dr+4\pi i\int _{\infty }^{0}\frac{\ln r}{1+r^{2}}dr\nonumber \\ & =-\int _{0}^{\infty }\frac{\ln ^{2}r}{1+r^{2}}dr+\int _{0}^{\infty }\frac{4\pi ^{2}}{1+r^{2}}dr-4\pi i\int _{0}^{\infty }\frac{\ln r}{1+r^{2}}dr \tag{5} \end{align}
Using (4,5) in (3A) gives\begin{align*} -\int _{0}^{\infty }\frac{\ln ^{2}r}{1+r^{2}}dr+\int _{0}^{\infty }\frac{4\pi ^{2}}{1+r^{2}}dr-4\pi i\int _{0}^{\infty }\frac{\ln r}{1+r^{2}}dr+\int _{0}^{\infty }\frac{\ln ^{2}r}{1+r^{2}}dr & =2\pi ^{3}\\ 4\pi ^{2}\int _{0}^{\infty }\frac{1}{1+r^{2}}dr-4\pi i\int _{0}^{\infty }\frac{\ln r}{1+r^{2}}dr & =2\pi ^{3} \end{align*}
But \(\int _{0}^{\infty }\frac{1}{1+r^{2}}dr=\arctan \left ( r\right ) _{0}^{\infty }=\arctan \left ( \infty \right ) -\arctan \left ( 0\right ) =\frac{\pi }{2}\), hence the above becomes\begin{align*} 4\pi ^{2}\left ( \frac{\pi }{2}\right ) -4\pi i\int _{0}^{\infty }\frac{\ln r}{1+r^{2}}dr & =2\pi ^{3}\\ -4\pi i\int _{0}^{\infty }\frac{\ln r}{1+r^{2}}dr & =0 \end{align*}
Which implies \[ \fbox{$\int _0^\infty \frac{\ln r}{1+r^2}dr=0$}\] Which is the same result obtained using method one above.
Appendix Here we will show that \(\lim _{r_{0}\rightarrow 0}\int _{C_{r_{0}}}f\left ( z\right ) dz=0\) and \(\lim _{R\rightarrow \infty }\int _{C_{R}}f\left ( z\right ) dz=0\).
For \(\lim _{r_{0}\rightarrow 0}\int _{C_{r_{0}}}f\left ( z\right ) dz\), let \(z=r_{0}e^{i\theta }\). Hence \(dz=r_{0}ie^{i\theta }d\theta \) and the integral becomes\[ \lim _{r_{0}\rightarrow 0}\int _{2\pi -\epsilon }^{\epsilon }\frac{\ln ^{2}\left ( r_{0}e^{i\theta }\right ) }{1+r_{0}^{2}e^{2i\theta }}r_{0}ie^{i\theta }d\theta =\lim _{r_{0}\rightarrow 0}i\int _{2\pi -\epsilon }^{\epsilon }\frac{\ln ^{2}\left ( r_{0}e^{i\theta }\right ) }{1+r_{0}^{2}e^{i\theta }}r_{0}d\theta \] As \(\epsilon \rightarrow 0\) the above becomes\begin{align*} \lim _{r_{0}\rightarrow 0}\int _{2\pi -\epsilon }^{\epsilon }\frac{\ln ^{2}\left ( r_{0}e^{i\theta }\right ) }{1+r_{0}^{2}e^{2i\theta }}r_{0}ie^{i\theta }d\theta & =\lim _{r_{0}\rightarrow 0}i\int _{2\pi }^{0}\frac{\ln ^{2}\left ( r_{0}e^{i\theta }\right ) }{1+r_{0}^{2}e^{i\theta }}r_{0}d\theta \\ & \leq \lim _{r_{0}\rightarrow 0}\left \vert i\int _{2\pi }^{0}\frac{\ln ^{2}\left ( r_{0}e^{i\theta }\right ) }{1+r_{0}^{2}e^{i\theta }}r_{0}d\theta \right \vert _{\max }\\ & \leq \lim _{r_{0}\rightarrow 0}\int _{2\pi }^{0}\left \vert \frac{\ln ^{2}\left ( r_{0}e^{i\theta }\right ) }{1+r_{0}^{2}e^{i\theta }}\right \vert _{\max }r_{0}d\theta \\ & \leq \lim _{r_{0}\rightarrow 0}\left \vert \frac{\ln ^{2}\left ( r_{0}e^{i\theta }\right ) }{1+r_{0}^{2}e^{i\theta }}\right \vert _{\max }\int _{2\pi }^{0}r_{0}d\theta \\ & =2\pi r_{0}\lim _{r_{0}\rightarrow 0}\left \vert \frac{\ln ^{2}\left ( r_{0}e^{i\theta }\right ) }{1+r_{0}^{2}e^{i\theta }}\right \vert _{\max }\\ & \leq 2\pi r_{0}\lim _{r_{0}\rightarrow 0}\frac{\left \vert \ln ^{2}\left ( r_{0}e^{i\theta }\right ) \right \vert _{\max }}{\left \vert 1+r_{0}^{2}e^{i\theta }\right \vert _{\min }}\\ & =2\pi r_{0}\lim _{r_{0}\rightarrow 0}\frac{\left \vert \ln r_{0}+i\theta \right \vert _{\max }^{2}}{\left \vert 1+r_{0}^{2}e^{i\theta }\right \vert _{\min }}\\ & =2\pi r_{0}\lim _{r_{0}\rightarrow 0}\frac{\left \vert \ln ^{2}r_{0}+\left ( i\theta \right ) ^{2}+2i\theta \ln r_{0}\right \vert _{\max }}{1-r_{0}^{2}}\\ & =2\pi \lim _{r_{0}\rightarrow 0}\frac{r_{0}\ln ^{2}r_{0}-4\pi ^{2}r_{0}+4\pi r_{0}\ln r_{0}}{1-r_{0}^{2}}\\ & =2\pi \lim _{r_{0}\rightarrow 0}\left ( \frac{r_{0}\ln ^{2}r_{0}}{1-r_{0}^{2}}-4\pi ^{2}\frac{r_{0}}{1-r_{0}^{2}}+4\pi \frac{r_{0}\ln r_{0}}{1-r_{0}^{2}}\right ) \end{align*}
But \(\lim _{r_{0}\rightarrow 0}\frac{r_{0}\ln ^{2}r_{0}}{1-r_{0}^{2}}=0\) and \(\lim _{r_{0}\rightarrow 0}\frac{r_{0}}{1-r_{0}^{2}}=0\) and \(\lim _{r_{0}\rightarrow 0}\frac{r_{0}\ln r_{0}}{1-r_{0}^{2}}=0\) Hence all terms on the RHS above become zero in the limit. Therefore\begin{align*} \lim _{r_{0}\rightarrow 0}\int _{2\pi -\epsilon }^{\epsilon }\frac{\ln ^{2}\left ( r_{0}e^{i\theta }\right ) }{1+r_{0}^{2}e^{2i\theta }}r_{0}ie^{i\theta }d\theta & =\lim _{r_{0}\rightarrow 0}\int _{C_{r_{0}}}\frac{\ln ^{2}z}{1+z^{2}}dz\\ & =0 \end{align*}
Now we will do the same \(\lim _{R\rightarrow \infty }\int _{C_{R}}f\left ( z\right ) dz\), let \(z=Re^{i\theta }\). Hence \(dz=Rie^{i\theta }d\theta \) and the integral becomes\[ \lim _{R\rightarrow \infty }\int _{\epsilon }^{2\pi -\epsilon }\frac{\ln ^{2}\left ( Re^{i\theta }\right ) }{1+R^{2}e^{2i\theta }}Rie^{i\theta }d\theta =\lim _{R\rightarrow \infty }i\int _{\epsilon }^{2\pi -\epsilon }\frac{\ln ^{2}\left ( \operatorname{Re}^{i\theta }\right ) }{1+R^{2}e^{2i\theta }}Rd\theta \] As \(\epsilon \rightarrow 0\) the above becomes\begin{align*} \lim _{R\rightarrow \infty }\int _{\epsilon }^{2\pi -\epsilon }\frac{\ln ^{2}\left ( Re^{i\theta }\right ) }{1+R^{2}e^{2i\theta }}Rie^{i\theta }d\theta & =\lim _{R\rightarrow \infty }i\int _{0}^{2\pi }\frac{\ln ^{2}\left ( \operatorname{Re}^{i\theta }\right ) }{1+R^{2}e^{2i\theta }}Rd\theta \\ & \leq \lim _{R\rightarrow \infty }\left \vert i\int _{0}^{2\pi }\frac{\ln ^{2}\left ( \operatorname{Re}^{i\theta }\right ) }{1+R^{2}e^{2i\theta }}Rd\theta \right \vert _{\max }\\ & \leq \lim _{R\rightarrow \infty }\int _{0}^{2\pi }\left \vert \frac{\ln ^{2}\left ( \operatorname{Re}^{i\theta }\right ) }{1+R^{2}e^{2i\theta }}R\right \vert _{\max }d\theta \\ & \leq \lim _{R\rightarrow \infty }\left \vert \frac{\ln ^{2}\left ( \operatorname{Re}^{i\theta }\right ) }{1+R^{2}e^{2i\theta }}\right \vert \int _{0}^{2\pi }Rd\theta \\ & =2\pi \lim _{R\rightarrow \infty }R\frac{\left \vert \ln ^{2}\left ( \operatorname{Re}^{i\theta }\right ) \right \vert _{\max }}{\left \vert 1+R^{2}e^{2i\theta }\right \vert _{\min }}\\ & =2\pi \lim _{R\rightarrow \infty }R\frac{\left \vert \ln R+i\theta \right \vert _{\max }^{2}}{1-R^{2}}\\ & =2\pi \lim _{R\rightarrow \infty }R\frac{\left \vert \ln ^{2}R-\theta ^{2}+2i\theta \ln R\right \vert _{\max }}{1-R^{2}}\\ & \leq 2\pi \lim _{R\rightarrow \infty }\frac{R\ln ^{2}R-4\pi ^{2}R+4\pi R\ln R}{1-R^{2}}\\ & =2\pi \lim _{R\rightarrow \infty }\left ( \frac{R\ln ^{2}R}{1-R^{2}}-4\pi ^{2}\frac{R}{1-R^{2}}+4\pi \frac{R\ln R}{1-R^{2}}\right ) \end{align*}
But \(\lim _{R\rightarrow \infty }\frac{R\ln ^{2}R}{1-R^{2}}=0\) and \(\lim _{R\rightarrow \infty }\frac{R}{1-R^{2}}=0\) and \(\lim _{R\rightarrow \infty }\frac{R\ln R}{1-R^{2}}=0\) Hence all terms on the RHS above become zero in the limit. Therefore\begin{align*} \lim _{R\rightarrow \infty }\int _{\epsilon }^{2\pi -\epsilon }\frac{\ln ^{2}\left ( Re^{i\theta }\right ) }{1+R^{2}e^{2i\theta }}Rie^{i\theta }d\theta & =\lim _{R\rightarrow \infty }\int _{C_{R}}\frac{\ln ^{2}z}{1+z^{2}}dz=0\\ & =0 \end{align*}
We will now find \(\int _{0}^{\infty }\frac{\ln ^{3}z}{1+z^{2}}dz\) in order to determine \(\int _{0}^{\infty }\frac{\ln ^{2}z}{1+z^{2}}dz\). We will use the same contour integration as part (a) above.\begin{equation} \int _{L_{2}}f\left ( z\right ) dz+\int _{C_{r_{0}}}f\left ( z\right ) dz+\int _{L_{1}}f\left ( z\right ) dz+\int _{C_{R}}f\left ( z\right ) dz=2\pi i\sum \operatorname{Residue} \tag{1} \end{equation} There are two poles in \(\frac{\ln ^{3}z}{\left ( z-i\right ) \left ( z+i\right ) }\). Residue at \(z_{1}=i\) is\begin{align} \operatorname{Residue}\left ( i\right ) & =\lim _{z\rightarrow i}\left ( z-i\right ) \frac{\ln ^{3}z}{\left ( z-i\right ) \left ( z+i\right ) }\nonumber \\ & =\lim _{z\rightarrow i}\frac{\ln ^{3}z}{\left ( z+i\right ) }\nonumber \\ & =\frac{\ln ^{3}i}{2i}\nonumber \\ & =\frac{\left ( \ln \left ( 1\right ) +i\frac{\pi }{2}\right ) ^{3}}{2i}\nonumber \\ & =\frac{\left ( i\frac{\pi }{2}\right ) ^{3}}{2i}\nonumber \\ & =\frac{-i\frac{\pi ^{3}}{8}}{2i}\nonumber \\ & =\frac{-\pi ^{3}}{16} \tag{2} \end{align}
And\begin{align*} \operatorname{Residue}\left ( -i\right ) & =\lim _{z\rightarrow -i}\left ( z+i\right ) \frac{\ln ^{3}z}{\left ( z-i\right ) \left ( z+i\right ) }\\ & =\lim _{z\rightarrow -i}\frac{\ln ^{3}z}{\left ( z-i\right ) }\\ & =\frac{\ln ^{3}\left ( -i\right ) }{-2i} \end{align*}
But \(\ln \left ( -i\right ) =\ln \left ( 1\right ) +i\frac{3}{2}\pi \). Notice that the phase is \(\frac{3}{2}\pi \) and not \(-\frac{\pi }{2}\) since we are using principle branch defined as \(0<\theta <2\pi \). Therefore the above becomes\begin{align} \operatorname{Residue}\left ( -i\right ) & =\frac{\left ( \ln \left ( 1\right ) +i\frac{3}{2}\pi \right ) ^{3}}{-2i}\nonumber \\ & =\frac{\left ( i\frac{3}{2}\pi \right ) ^{3}}{-2i}\nonumber \\ & =\frac{-i\frac{27}{8}\pi ^{3}}{-2i}\nonumber \\ & =\frac{27\pi ^{3}}{16} \tag{3} \end{align}
Adding (2+3) and substituting in (1) gives\begin{align*} \int _{L_{2}}f\left ( z\right ) dz+\int _{C_{r_{0}}}f\left ( z\right ) dz+\int _{L_{1}}f\left ( z\right ) dz+\int _{C_{R}}f\left ( z\right ) dz & =2\pi i\left ( \frac{-\pi ^{3}}{16}+\frac{27\pi ^{3}}{16}\right ) \\ \int _{L_{2}}f\left ( z\right ) dz+\int _{C_{r_{0}}}f\left ( z\right ) dz+\int _{L_{1}}f\left ( z\right ) dz+\int _{C_{R}}f\left ( z\right ) dz & =\frac{13}{4}\pi ^{4}i \end{align*}
We will show below that \(\lim _{r_{0}\rightarrow 0}\int _{C_{r_{0}}}f\left ( z\right ) dz=0\) and that \(\lim _{R\rightarrow \infty }\int _{C_{R}}f\left ( z\right ) dz=0\), which simplifies the above to\begin{equation} \int _{L_{2}}f\left ( z\right ) dz+\int _{L_{1}}f\left ( z\right ) dz=\frac{13}{4}\pi ^{4}i \tag{3A} \end{equation} We will now work on finding \(\int _{L_{1}}f\left ( z\right ) dz\). Let \(z=re^{i\epsilon }\), hence \(dz=dre^{i\epsilon }\) and the integral becomes\begin{align*} \int _{L_{1}}\frac{\ln ^{3}z}{1+z^{2}}dz & =\int _{0}^{\infty }\frac{\ln ^{3}\left ( re^{i\epsilon }\right ) }{1+\left ( re^{i\epsilon }\right ) ^{2}}dre^{i\epsilon }\\ & =e^{i\epsilon }\int _{0}^{\infty }\frac{\left ( \ln r+i\epsilon \right ) ^{3}}{1+r^{2}e^{2i\epsilon }}dr\\ & =e^{i\epsilon }\int _{0}^{\infty }\frac{\left ( \ln ^{2}r+i^{2}\epsilon ^{2}+2i\epsilon \ln r\right ) \left ( \ln r+i\epsilon \right ) }{1+r^{2}e^{2i\epsilon }}dr\\ & =e^{i\epsilon }\int _{0}^{\infty }\frac{\left ( \ln ^{3}r+i^{2}\epsilon ^{2}\ln r+2i\epsilon \ln ^{2}r\right ) +\left ( i\epsilon \ln ^{2}r+i^{3}\epsilon ^{3}+2i^{2}\epsilon ^{2}\ln r\right ) }{1+r^{2}e^{2i\epsilon }}dr \end{align*}
Now taking the limit as \(\epsilon \rightarrow 0\) the above becomes\begin{equation} \int _{L_{1}}\frac{\ln ^{3}z}{1+z^{2}}dz=\int _{0}^{\infty }\frac{\ln ^{3}r}{1+r^{2}}dr \tag{4} \end{equation} We will now work on finding \(\int _{L_{2}}f\left ( z\right ) dz\). Let \(z=re^{i\left ( 2\pi -\epsilon \right ) }\), hence \(dz=dre^{i\left ( 2\pi -\epsilon \right ) }\) and the integral becomes\begin{align*} \int _{L_{2}}\frac{\ln ^{3}z}{1+z^{2}}dz & =\int _{\infty }^{0}\frac{\ln ^{3}\left ( re^{i\left ( 2\pi -\epsilon \right ) }\right ) }{1+\left ( re^{i\left ( 2\pi -\epsilon \right ) }\right ) ^{2}}dre^{i\left ( 2\pi -\epsilon \right ) }\\ & =e^{i\left ( 2\pi -\epsilon \right ) }\int _{\infty }^{0}\frac{\left ( \ln \left ( r\right ) +i\left ( 2\pi -\epsilon \right ) \right ) ^{3}}{1+r^{2}e^{2i\left ( 2\pi -\epsilon \right ) }}dr \end{align*}
But \(\lim _{\epsilon \rightarrow 0}e^{i\left ( 2\pi -\epsilon \right ) }=e^{2\pi i}=1\) and the above becomes\begin{align*} \int _{L_{2}}\frac{\ln ^{3}z}{1+z^{2}}dz & =\int _{\infty }^{0}\frac{\left ( \ln ^{2}r-\left ( 2\pi -\epsilon \right ) ^{2}+2i\left ( 2\pi -\epsilon \right ) \ln r\right ) \left ( \ln \left ( r\right ) +i\left ( 2\pi -\epsilon \right ) \right ) }{1+r^{2}e^{2i\left ( 2\pi -\epsilon \right ) }}dr\\ & =\int _{\infty }^{0}\frac{\ln ^{3}r-\ln r\left ( 2\pi -\epsilon \right ) ^{2}+2i\left ( 2\pi -\epsilon \right ) \ln ^{2}r+i\left ( 2\pi -\epsilon \right ) \ln ^{2}r-i\left ( 2\pi -\epsilon \right ) ^{3}+2i^{2}\left ( 2\pi -\epsilon \right ) ^{2}\ln r}{1+r^{2}e^{2i\left ( 2\pi -\epsilon \right ) }}dr \end{align*}
Taking the limit as \(\epsilon \rightarrow 0\) the above becomes\begin{align*} \int _{L_{2}}\frac{\ln ^{3}z}{1+z^{2}}dz & =\int _{\infty }^{0}\frac{\ln ^{3}r-4\pi ^{2}\ln r+4\pi i\ln ^{2}r+2\pi i\ln ^{2}r-i\left ( 2\pi -\epsilon \right ) ^{2}\left ( 2\pi -\epsilon \right ) +2i^{2}\left ( 4\pi ^{2}+\epsilon ^{2}-4\pi \epsilon \right ) \ln r}{1+r^{2}e^{4\pi i}}dr\\ & =\int _{\infty }^{0}\frac{\ln ^{3}r-4\pi ^{2}\ln r+4\pi i\ln ^{2}r+2\pi i\ln ^{2}r-i\left ( 4\pi ^{2}+\epsilon ^{2}-4\pi \epsilon \right ) \left ( 2\pi -\epsilon \right ) -8\pi ^{2}\ln r}{1+r^{2}}dr\\ & =\int _{\infty }^{0}\frac{\ln ^{3}r-4\pi ^{2}\ln r+6\pi i\ln ^{2}r-i\left ( 8\pi ^{3}+2\pi \epsilon ^{2}-8\pi ^{2}\epsilon \right ) -\left ( 4\pi ^{2}\epsilon +\epsilon ^{3}-4\pi \epsilon ^{2}\right ) -8\pi ^{2}\ln r}{1+r^{2}}dr \end{align*}
Taking the limit as \(\epsilon \rightarrow 0\) the above becomes\begin{align*} \int _{L_{2}}\frac{\ln ^{3}z}{1+z^{2}}dz & =\int _{\infty }^{0}\frac{\ln ^{3}\left ( r\right ) -4\pi ^{2}\ln r+6\pi i\ln ^{2}r-8i\pi ^{3}-8\pi ^{2}\ln r}{1+r^{2}}dr\\ & =\int _{\infty }^{0}\frac{\ln ^{3}\left ( r\right ) -12\pi ^{2}\ln r+6\pi i\ln ^{2}r-8i\pi ^{3}}{1+r^{2}}dr \end{align*}
Hence the above becomes\begin{align} \int _{L_{2}}\frac{\ln ^{3}z}{1+z^{2}}dz & =\int _{\infty }^{0}\frac{\ln ^{3}\left ( r\right ) }{1+r^{2}}dr-12\pi ^{2}\int _{\infty }^{0}\frac{\ln r}{1+r^{2}}dr+6\pi i\int _{\infty }^{0}\frac{\ln ^{2}r}{1+r^{2}}dr-8i\pi ^{3}\int _{\infty }^{0}\frac{1}{1+r^{2}}dr\nonumber \\ & =-\int _{0}^{\infty }\frac{\ln ^{3}r}{1+r^{2}}dr+12\pi ^{2}\int _{0}^{\infty }\frac{\ln r}{1+r^{2}}dr-6\pi i\int _{0}^{\infty }\frac{\ln ^{2}r}{1+r^{2}}dr+8i\pi ^{3}\int _{0}^{\infty }\frac{1}{1+r^{2}}dr\nonumber \end{align}
But \(\int _{0}^{\infty }\frac{\ln r}{1+r^{2}}dr=0\) from part (a) and \(\int _{0}^{\infty }\frac{1}{1+r^{2}}dr=\frac{\pi }{2}\), hence the above becomes\begin{equation} \int _{L_{2}}\frac{\ln ^{3}z}{1+z^{2}}dz=-\int _{0}^{\infty }\frac{\ln ^{3}r}{1+r^{2}}dr-6\pi i\int _{0}^{\infty }\frac{\ln ^{2}r}{1+r^{2}}dr+4i\pi ^{4} \tag{5} \end{equation} Using (4,5) in (3A) gives\begin{align*} \int _{L_{2}}f\left ( z\right ) dz+\int _{L_{1}}f\left ( z\right ) dz & =\frac{13}{4}\pi ^{4}i\\ \left ( -\int _{0}^{\infty }\frac{\ln ^{3}r}{1+r^{2}}dr-6\pi i\int _{0}^{\infty }\frac{\ln ^{2}r}{1+r^{2}}dr+4i\pi ^{4}\right ) +\left ( \int _{0}^{\infty }\frac{\ln ^{3}r}{1+r^{2}}dr\right ) & =\frac{13}{4}\pi ^{4}i\\ -6\pi i\int _{0}^{\infty }\frac{\ln ^{2}r}{1+r^{2}}dr+4i\pi ^{4} & =\frac{13}{4}\pi ^{4}i\\ \int _{0}^{\infty }\frac{\ln ^{2}r}{1+r^{2}}dr & =\frac{\frac{13}{4}\pi ^{4}i-4i\pi ^{4}}{-6\pi i}\\ \int _{0}^{\infty }\frac{\ln ^{2}r}{1+r^{2}}dr & =\frac{13\pi ^{4}i-16i\pi ^{4}}{-24\pi i}\\ & =\frac{-3\pi ^{4}i}{-24\pi i}\\ & =\frac{\pi ^{3}}{8} \end{align*}
Which implies \[ \fbox{$\int _0^\infty \frac{\ln ^2x}{1+x^2}dx=\frac{\pi ^3}{8}$}\]
Appendix Here we will show that \(\lim _{r_{0}\rightarrow 0}\int _{C_{r_{0}}}f\left ( z\right ) dz=0\) and \(\lim _{R\rightarrow \infty }\int _{C_{R}}f\left ( z\right ) dz=0\).
For \(\lim _{r_{0}\rightarrow 0}\int _{C_{r_{0}}}f\left ( z\right ) dz\), let \(z=r_{0}e^{i\theta }\). Hence \(dz=r_{0}ie^{i\theta }d\theta \) and the integral becomes\[ \lim _{r_{0}\rightarrow 0}\int _{2\pi -\epsilon }^{\epsilon }\frac{\ln ^{3}\left ( r_{0}e^{i\theta }\right ) }{1+r_{0}^{2}e^{2i\theta }}r_{0}ie^{i\theta }d\theta =\lim _{r_{0}\rightarrow 0}i\int _{2\pi -\epsilon }^{\epsilon }\frac{\ln ^{3}\left ( r_{0}e^{i\theta }\right ) }{1+r_{0}^{2}e^{i\theta }}r_{0}d\theta \] As \(\epsilon \rightarrow 0\) the above becomes\begin{align*} \lim _{r_{0}\rightarrow 0}\int _{2\pi -\epsilon }^{\epsilon }\frac{\ln ^{3}\left ( r_{0}e^{i\theta }\right ) }{1+r_{0}^{2}e^{2i\theta }}r_{0}ie^{i\theta }d\theta & =\lim _{r_{0}\rightarrow 0}i\int _{2\pi }^{0}\frac{\ln ^{3}\left ( r_{0}e^{i\theta }\right ) }{1+r_{0}^{2}e^{i\theta }}r_{0}d\theta \\ & \leq \lim _{r_{0}\rightarrow 0}\left \vert i\int _{2\pi }^{0}\frac{\ln ^{3}\left ( r_{0}e^{i\theta }\right ) }{1+r_{0}^{2}e^{i\theta }}r_{0}d\theta \right \vert _{\max }\\ & \leq \lim _{r_{0}\rightarrow 0}\int _{2\pi }^{0}\left \vert \frac{\ln ^{3}\left ( r_{0}e^{i\theta }\right ) }{1+r_{0}^{2}e^{i\theta }}\right \vert _{\max }r_{0}d\theta \\ & \leq \lim _{r_{0}\rightarrow 0}\left \vert \frac{\ln ^{3}\left ( r_{0}e^{i\theta }\right ) }{1+r_{0}^{2}e^{i\theta }}\right \vert _{\max }\int _{2\pi }^{0}r_{0}d\theta \\ & =2\pi r_{0}\lim _{r_{0}\rightarrow 0}\left \vert \frac{\ln ^{3}\left ( r_{0}e^{i\theta }\right ) }{1+r_{0}^{2}e^{i\theta }}\right \vert _{\max }\\ & \leq 2\pi r_{0}\lim _{r_{0}\rightarrow 0}\frac{\left \vert \ln ^{3}\left ( r_{0}e^{i\theta }\right ) \right \vert _{\max }}{\left \vert 1+r_{0}^{2}e^{i\theta }\right \vert _{\min }}\\ & \leq 2\pi r_{0}\lim _{r_{0}\rightarrow 0}\frac{\left \vert \ln r_{0}+i\theta \right \vert _{\max }^{2}\left \vert \ln r_{0}+i\theta \right \vert _{\max }}{\left \vert 1+r_{0}^{2}e^{i\theta }\right \vert _{\min }} \end{align*}
But from part (a) we showed that \(2\pi r_{0}\lim _{r_{0}\rightarrow 0}\frac{\left \vert \ln r_{0}+i\theta \right \vert _{\max }^{2}}{\left \vert 1+r_{0}^{2}e^{i\theta }\right \vert _{\min }}=0\), hence it follows that the RHS above goes to zero. Therefore\begin{align*} \lim _{r_{0}\rightarrow 0}\int _{2\pi -\epsilon }^{\epsilon }\frac{\ln ^{3}\left ( r_{0}e^{i\theta }\right ) }{1+r_{0}^{2}e^{2i\theta }}r_{0}ie^{i\theta }d\theta & =\lim _{r_{0}\rightarrow 0}\int _{C_{r_{0}}}\frac{\ln ^{3}z}{1+z^{2}}dz\\ & =0 \end{align*}
Now we will do the same \(\lim _{R\rightarrow \infty }\int _{C_{R}}f\left ( z\right ) dz\), let \(z=Re^{i\theta }\). Hence \(dz=Rie^{i\theta }d\theta \) and the integral becomes\[ \lim _{R\rightarrow \infty }\int _{\epsilon }^{2\pi -\epsilon }\frac{\ln ^{3}\left ( Re^{i\theta }\right ) }{1+R^{2}e^{2i\theta }}Rie^{i\theta }d\theta =\lim _{R\rightarrow \infty }i\int _{\epsilon }^{2\pi -\epsilon }\frac{\ln ^{3}\left ( \operatorname{Re}^{i\theta }\right ) }{1+R^{2}e^{2i\theta }}Rd\theta \] As \(\epsilon \rightarrow 0\) the above becomes\begin{align*} \lim _{R\rightarrow \infty }\int _{\epsilon }^{2\pi -\epsilon }\frac{\ln ^{3}\left ( Re^{i\theta }\right ) }{1+R^{2}e^{2i\theta }}Rie^{i\theta }d\theta & =\lim _{R\rightarrow \infty }i\int _{0}^{2\pi }\frac{\ln ^{3}\left ( \operatorname{Re}^{i\theta }\right ) }{1+R^{2}e^{2i\theta }}Rd\theta \\ & \leq \lim _{R\rightarrow \infty }\left \vert i\int _{0}^{2\pi }\frac{\ln ^{3}\left ( \operatorname{Re}^{i\theta }\right ) }{1+R^{2}e^{2i\theta }}Rd\theta \right \vert _{\max }\\ & \leq \lim _{R\rightarrow \infty }\int _{0}^{2\pi }\left \vert \frac{\ln ^{3}\left ( \operatorname{Re}^{i\theta }\right ) }{1+R^{2}e^{2i\theta }}R\right \vert _{\max }d\theta \\ & \leq \lim _{R\rightarrow \infty }\left \vert \frac{\ln ^{3}\left ( \operatorname{Re}^{i\theta }\right ) }{1+R^{2}e^{2i\theta }}\right \vert \int _{0}^{2\pi }Rd\theta \\ & =2\pi \lim _{R\rightarrow \infty }R\frac{\left \vert \ln ^{3}\left ( \operatorname{Re}^{i\theta }\right ) \right \vert _{\max }}{\left \vert 1+R^{2}e^{2i\theta }\right \vert _{\min }}\\ & \leq 2\pi \lim _{R\rightarrow \infty }R\frac{\left \vert \ln R+i\theta \right \vert _{\max }^{2}\left \vert \ln \left ( \operatorname{Re}^{i\theta }\right ) \right \vert _{\max }}{1-R^{2}} \end{align*}
But from part (a) we showed that \(2\pi \lim _{R\rightarrow \infty }R\frac{\left \vert \ln R+i\theta \right \vert _{\max }^{2}}{1-R^{2}}=0\), hence it follows that the RHS above goes to zero. Therefore\begin{align*} \lim _{R\rightarrow \infty }\int _{\epsilon }^{2\pi -\epsilon }\frac{\ln ^{3}\left ( Re^{i\theta }\right ) }{1+R^{2}e^{2i\theta }}Rie^{i\theta }d\theta & =\lim _{R\rightarrow \infty }\int _{C_{R}}\frac{\ln ^{3}z}{1+z^{2}}dz=0\\ & =0 \end{align*}