Evaluate the improper integral $\int_{-\infty}^{+\infty} \frac{\ln(1+x^{4})}{1+x^{2}} dx$

calculusdefinite integralsimproper-integralsintegration

How do I evaluate this integral ? I am a student who just studied calculus 1 and recently definite integral.

$$
\int_{-\infty}^{+\infty} \frac{\ln(1+x^{4})}{1+x^{2}} dx
$$

I substituted both $x = \tan t$ and $x = \frac1{t}$ but could not proceed further.

Best Answer

A polynomial of the form $1+x^{2n}$ can always be written as the product of $n$ quadratic factors of the form $1-2x\cos\theta + x^2$. So that suggests we consider the integral $$ I(\theta) = \int_{-\infty}^\infty \frac{\ln(1-2x\cos\theta+x^2)}{1+x^2}dx. $$ Now, if we differentiate this with respect to $\theta$, we'll get a rational function of $x$, and the integral can then be evaluated through partial fractions: \begin{eqnarray} I'(\theta) &=& \int_{-\infty}^\infty \frac{2x\sin\theta}{(1-2x\cos\theta+x^2)(1+x^2)}dx \\&=&\tan\theta\int_{-\infty}^\infty\left(\frac{1}{1-2x\cos\theta+x^2}- \frac{1}{1+x^2}\right)dx \\ &=& \pi\frac{1-\sin\theta}{\cos\theta}=\pi\frac{\cos\theta}{1+\sin\theta} = \pi\frac{d}{d\theta}\ln(1+\sin\theta). \end{eqnarray} This gives us the $\theta$ dependence of $I$, but we need the value of $I$ at a particular $\theta$ to set the constant of integtration. We can evaluate the case $\theta = \pi/2$ with clever use of trigonometric identities and variable substitutions: \begin{eqnarray} I\left(\frac{\pi}{2}\right)& = &\int_{-\infty}^\infty \frac{\ln(1+x^2)}{1+x^2} = -4\int_{0}^{\pi/2}\ln(\cos\phi)d\phi = -4\int_{0}^{\pi/2}\ln(\sin\phi)d\phi \\ &=& -2\int_0^{\pi}\ln(\sin\phi)d\phi =-4\int_0^{\pi/2}\ln(\sin 2\psi)d\psi = -4\int_0^{\pi/2}\ln(2\sin\psi\cos\psi)d\psi \\ &=& -2\pi\ln 2-4\int_{0}^{\pi/2}\ln(\cos\psi)d\psi-4\int_{0}^{\pi/2}\ln(\sin\psi)d\psi \\ &=& -2\pi\ln 2 + 2I\left(\frac{\pi}{2}\right) \end{eqnarray} Thus $I(\pi/2) = 2\pi \ln2$, and we have $$ I(\theta) = \pi\ln[2(1+\sin\theta)]. $$ From here it's easy to show $$ \int_{-\infty}^\infty \frac{\ln(1+x^4)}{1+x^2}dx = I\left(\frac{\pi}{4}\right) + I\left(\frac{3\pi}{4}\right) = 2\pi\ln(2+\sqrt{2}) $$