# How to solve \int^\infty_0\frac{\log(x+\frac{1}{x})}{1+x^2}dx ?

How to solve $$\displaystyle\int^{\infty}_{0}{\frac{{{\log{{\left({x}+{\frac{{{1}}}{{{x}}}}\right)}}}}}{{{1}+{x}^{{2}}}}}{\left.{d}{x}\right.}$$ ?

• Live experts 24/7
• Questions are typically answered in as fast as 30 minutes
• Personalized clear answers

### Solve your problem for the price of one coffee

• Math expert for every subject
• Pay only if we can solve it

rodclassique4r

You may write
$$\displaystyle\int^{\infty}_{0}{\frac{{{\log{{\left({x}+{\frac{{{1}}}{{{x}}}}\right)}}}}}{{{1}+{x}^{{2}}}}}{\left.{d}{x}\right.}=\int^{\infty}_{0}{\frac{{{\log{{\left({1}+{x}^{{2}}\right)}}}-{\log{{x}}}}}{{{1}+{x}^{{2}}}}}{\left.{d}{x}\right.}$$
$$\displaystyle=\int^{\infty}_{0}{\frac{{{\log{{\left({1}+{x}^{{2}}\right)}}}}}{{{1}+{x}^{{2}}}}}{\left.{d}{x}\right.}-\int^{\infty}_{0}{\frac{{{\log{{x}}}}}{{{1}+{x}^{{2}}}}}{\left.{d}{x}\right.}$$
Clearly, by the change of variable $$\\ \rightarrow\frac{1}{x}$$, we get
$$\displaystyle=\int^{\infty}_{0}{\frac{{{\log{{x}}}}}{{{1}+{x}^{{2}}}}}{\left.{d}{x}\right.}=-\int^{\infty}_{0}{\frac{{{\log{{x}}}}}{{{1}+{x}^{{2}}}}}{\left.{d}{x}\right.}$$
On the other hand, by the change of variable
$$\displaystyle{x}={\tan{\theta}},{\left.{d}{x}\right.}={\left({1}-{{\tan}^{{2}}\theta}\right)}{d}\theta,{1}+{{\tan}^{{2}}\theta}={\frac{{{1}}}{{{{\cos}^{{2}}\theta}}}}$$
we obtain the classic evaluation:
$$\displaystyle=\int^{\infty}_{0}{\frac{{{\log{{\left({1}+{x}^{{2}}\right)}}}}}{{{1}+{x}^{{2}}}}}{\left.{d}{x}\right.}=-{2}\int^{{{\frac{{\pi}}{{{2}}}}}}_{0}{\log{{\left({\cos{\theta}}\right)}}}{d}\theta=\pi{\log{{2}}}$$

###### Not exactly what you’re looking for?
Hector Roberts
Instead of using the trigonometric subsitution you may use the identity
$$\displaystyle{\log{{\left({1}+{x}^{{2}}\right)}}}={\int_{{0}}^{{1}}}{d}{a}{\frac{{{x}^{{2}}}}{{{1}+{a}{x}^{{2}}}}}$$
Calling your integral of interest $$\displaystyle{I}$$ It follows that
$$\displaystyle{I}={\int_{{0}}^{{1}}}{d}{a}\underbrace{{{\int_{{0}}^{\infty}}{\left.{d}{x}\right.}{\frac{{{x}^{{2}}}}{{{\left({x}^{{2}}+{1}\right)}{\left({1}+{a}{x}^{{2}}\right)}}}}}}_{{\text{use Residue Theorem to calculate this integral}}}$$
$$\displaystyle=\underbrace{{{\int_{{0}}^{{1}}}{d}{a}{\frac{{\pi}}{{{2}{\left({a}+\sqrt{{{a}}}\right)}}}}}}_{{\text{use }\ {a}={b}^{{2}}\ \text{ to turn this into a standard integra}}}=\pi{\log{{\left({2}\right)}}}$$
In agreement with Olivier’s answer
Vasquez

$$x\rightarrow\tan x \\I=-\int^{\frac{\pi}{2}}_0\log(\sin x\cos x)dx \\=-\int^{\frac{pi}{2}}_0\log(\sin x)dx+\int^{\frac{\pi}{2}}_0\log(\cos x)dx \\=-2\int^{\frac{\pi}{2}}_0\log(\cos x)dx \\=\pi\log2$$