Integrating a cosine log integral around a semi-circle contour

Prove that 

$$\int^1_0 \frac{\cos(\log x)}{x^2+1}\,dx =
\frac{\pi}{4}\mathrm{sech}\left( \frac{\pi}{2}\right)$$

First note that

$$2 \int^1_0 \frac{\cos(\log x) }{x^2+1}\,dx = \int^\infty_0 \frac{\cos(\log x)}{x^2+1}\,dx$$

Integrate the following function

$$f(z) = \frac{e^{i\log(z)}}{z^2+1}$$

Around a semi-circle in the upper half place. Where we avoid the branch point at \( z=0 \) by a semi-circle. We assume that the branch cut is taken on the negative imaginary axis.

$$\int^{-r}_{-R}f(z) \,dz +\int^{R}_{r}f(z) \,dz+ \int_{C_R}f(z)\,dz+\int_{c_r}f(z)\,dz =2\pi i \mathrm{Res}(f,i)$$

The integral on semi-circles

\begin{align}\left|\int_{C_R} \frac{e^{i\log(z)}}{z^2+1}\right|
&\leq R \int^{\pi}_0 \left|\frac{e^{i \log(R e^{it})}}{R^2e^{2it}+1}\right| dt\\
&\leq R \int^{\pi}_0 \frac{e^{i \log R-t}}{|R^2-1|} dt\\
&\leq \frac{R}{R^2-1} \int^{\pi}_0 e^{-t} dt\\
&\leq \frac{R(1-e^{-\pi})}{R^2-1} dt \sim_{\infty} 0


$$\lim_{r \to 0}\int_{C_r} \frac{e^{i\log(z)}}{z^2+1} = 0$$

Hence we have as \( R \to \infty , r \to 0 \)
$$\int_{-\infty}^0 \frac{e^{i\log|x|-\pi}}{x^2+1}\,dx +\int^\infty_0 \frac{e^{i\log(x)}}{x^2+1}\,dx =2\pi i \mathrm{Res}(f,i)$$

$$(1+e^{-\pi})\int^\infty_0 \frac{e^{i\log(x)}}{x^2+1}\,dx =2\pi i \mathrm{Res}(f,i)$$

Note that

$$\mathrm{Res}(f,i) = \frac{e^{i\log(i)}}{2i} = \frac{e^{-\pi/2}}{2i}$$


$$\int^\infty_0 \frac{e^{i\log(x)}}{x^2+1}\,dx =\pi \frac{e^{-\pi/2}}{1+e^{-\pi}} = \frac{\pi}{e^{\pi/2}+e^{-\pi/2}} = \frac{\pi}{2}\mathrm{sech}\left( \frac{\pi}{2}\right)$$

Which implies that

$$\int^\infty_0 \frac{\cos(\log x)}{x^2+1}\,dx = \frac{\pi}{2}\mathrm{sech}\left( \frac{\pi}{2}\right)$$

Hence we have our result
$$\int^1_0 \frac{\cos(\log x)}{x^2+1}\,dx =
\frac{\pi}{4}\mathrm{sech}\left( \frac{\pi}{2}\right)$$

This entry was posted in Contour Integration and tagged , , , , , , , . Bookmark the permalink.

Leave a Reply