# Integral

#### The Lord

##### New member
I explored the challenge forums today and found it very interesting. I thought it would be a good idea to share a problem with this excellent community.

Show that

$$\int_0^\infty \frac{\ln(\tan^2 (x))}{1+x^2}dx = \pi \ln(\tanh(1))$$

#### sbhatnagar

##### Active member
I explored the challenge forums today and found it very interesting. I thought it would be a good idea to share a problem with this excellent community.

Show that

$$\int_0^\infty \frac{\ln(\tan^2 (x))}{1+x^2}dx = \pi \ln(\tanh(1))$$
Hi Lord!!

My solution requires the following three facts:

$$\log\tan^{2}\theta = -4 \sum_{n \ \mathrm{odd}}^{\infty}\frac{1}{n}\cos 2n\theta$$

$$\sum_{n \ \mathrm{odd}}^{\infty} \frac{1}{n} x^{n} = \frac{1}{2}\log\left(\frac{1+x}{1-x}\right)$$

and

$$\int_{0}^{\infty} \frac{t \sin t}{a^2 + t^2} \, dt = \frac{\pi}{2} e^{-|a|}$$

Then

\begin{align*}
I=\int_{0}^{\infty} \frac{\log\tan^2(x)}{1+x^2} \, dx
&= \int_{0}^{\infty} \log\tan^2(x) \left\{\int_{0}^{\infty} \sin t \, e^{-xt} \, dt \right\} \, dx \\
&= \int_{0}^{\infty} \sin t \int_{0}^{\infty} e^{-tx} \log\tan^2(x) \, dxdt \\
&= -4 \int_{0}^{\infty} \sin t \int_{0}^{\infty} \sum_{n \ \mathrm{odd}}^{\infty}\frac{1}{n} e^{-tx} \cos (2nx) \, dx dt \\
&= -4 \int_{0}^{\infty} \sin t \sum_{n \ \mathrm{odd}}^{\infty}\frac{1}{n} \frac{t}{4 n^{2} + t^{2}} \, dt \\
&= -4 \sum_{n \ \mathrm{odd}}^{\infty} \frac{1}{n} \int_{0}^{\infty} \frac{t \sin t}{4 n^{2} + t^{2}} \, dt \\
&= -2\pi \sum_{n \ \mathrm{odd}}^{\infty} \frac{1}{n} e^{-2n} \\
&= \pi \log \left( \frac{1-e^{-2}}{1+e^{-2}} \right) \\
&= \pi \log (\tanh (1))
\end{align*}