# Is there a quicker way to evaluate $\int_{0}^{\infty} \frac{1-x^2}{x^4+3x^2+1}\ dx$?

The integral is: $$\int_{0}^{\infty} \frac{1-x^2}{x^4+3x^2+1}\ dx$$ My procedure: $$4\int_{0}^{\infty} \frac{1-x^2}{(2x^2+3)^2-5}\ dx=4\int_{0}^{\infty} \frac{1-x^2}{(2x^2+3-\sqrt5)(2x^2+3+\sqrt5)}\ dx$$ Using partial fractions to separate the integral, we obtain: $$\frac1{\sqrt5}\int_{0}^{\infty} \left(\frac{5-\sqrt5}{2x^2+3-\sqrt5}-\frac{5+\sqrt5}{2x^2+3+\sqrt5}\right)\ dx$$ $$=\frac{5-\sqrt5}{\sqrt5}\int_{0}^{\infty} \frac1{2x^2+3-\sqrt5}\ dx-\frac{5+\sqrt5}{\sqrt5}\int_{0}^{\infty}\frac1{2x^2+3+\sqrt5}\ dx$$ We need write the fractions in the form $\frac1{u^2+1}$: $$=\frac{5-\sqrt5}{\sqrt5}\int_{0}^{\infty} \frac1{(3-\sqrt5)\left(\frac{2x^2}{3-\sqrt5}+1\right)}\ dx-\frac{5+\sqrt5}{\sqrt5}\int_{0}^{\infty}\frac1{(3+\sqrt5)\left(\frac{2x^2}{3+\sqrt5}+1\right)}\ dx$$ $$=\frac{5-\sqrt5}{\sqrt5(3-\sqrt5)}\int_{0}^{\infty} \frac1{\left(\frac{\sqrt2x}{\sqrt{3-\sqrt5}}\right)^2+1}\ dx-\frac{5+\sqrt5}{\sqrt5(3+\sqrt5)}\int_{0}^{\infty}\frac1{\left(\frac{\sqrt2x}{\sqrt{3+\sqrt5}}\right)^2+1}\ dx$$ $$\frac{5-\sqrt5}{\sqrt{10(3-\sqrt5)}}\int_{0}^{\infty} \frac{\sqrt2}{\sqrt{3-\sqrt5}\left(\left(\frac{\sqrt2x}{\sqrt{3-\sqrt5}}\right)^2+1\right)}\ dx-\frac{5+\sqrt5}{\sqrt{10(3+\sqrt5)}}\int_{0}^{\infty}\frac{\sqrt2}{\sqrt{3+\sqrt5}\left(\left(\frac{\sqrt2x}{\sqrt{3+\sqrt5}}\right)^2+1\right)}\ dx$$ Evaluating the indefinite integrals, we obtain: $$\arctan\left(\frac{\sqrt2x}{\sqrt{3-\sqrt5}}\right)-\arctan\left(\frac{\sqrt2x}{\sqrt{3+\sqrt5}}\right)+C$$ Evaluating the improper integral: $$\lim_{z \to \infty}\left[\arctan\left(\frac{\sqrt2x}{\sqrt{3-\sqrt5}}\right)-\arctan\left(\frac{\sqrt2x}{\sqrt{3+\sqrt5}}\right)\right]_0^z$$ $$=\lim_{z \to \infty}\left(\arctan\left(\frac{\sqrt2z}{\sqrt{3-\sqrt5}}\right)-\arctan\left(\frac{\sqrt2z}{\sqrt{3+\sqrt5}}\right)\right)$$ $$=\lim_{z \to \infty}\left(\arctan\left(\infty\right)-\arctan\left(\infty\right)\right)=\frac{\pi}2-\frac{\pi}2=0$$ The way that I evalauted the integral is pretty long and has a lot of calculations. Is there an easier way?

• $x\ \mapsto\ 1/x\ \implies\ \mathcal{I} = -\mathcal{I}$. $\quad\mathcal{I}$ is your integral. @xpaul already almost suggested it in its deleted answer. – Felix Marin Feb 14 '17 at 23:22

Define $$f(x) = \frac{1-x^2}{1+3x^2+x^4}$$ so that $$f(x^{-1}) = -\frac{x^2(1-x^2)}{1+3x^2+x^4}.$$ Since $$\int_{x=0}^\infty f(x) \, dx = \int_{x=0}^1 f(x) \, dx + \int_{x=1}^\infty f(x) \, dx,$$ the transformation $$x = u^{-1}, \quad dx = -u^{-2} \, du$$ gives $$\int_{x=1}^\infty f(x) \, dx = \int_{u=1}^0 -\frac{u^2(1-u^2)}{1+3u^2+u^4} (-u^{-2}) \, du = -\int_{u=0}^1 f(u) \, du.$$ Thus, we immediately obtain cancellation and the integral of $f$ on $(0,\infty)$ is $0$.

For the indefinite integral, we write $$f(x) = \frac{x^{-2} - 1}{x^{-2} + 3 + x^2} = \frac{x^{-2} - 1}{1 + (x + x^{-1})^2}.$$ This suggests the substitution $$u = x + x^{-1}, \quad du = (1 - x^{-2}) \, dx,$$ giving $$\int f(x) \, dx = \int \frac{-du}{1+u^2} = -\tan^{-1} u + C = -\tan^{-1}\left(x + \frac{1}{x}\right) + C.$$

• Thanks! How about the indefinite integral? Is there a faster way to evaluate it? – user372003 Feb 14 '17 at 7:20
• @Denis I have edited my response to include the evaluation of the indefinite integral. – heropup Feb 14 '17 at 7:26
• Wow! Much easier. Thank you! Just for curiosity, based on what criteria were you able to deduce that kind of substitution? – user372003 Feb 14 '17 at 7:35
• @Denis The best answer I can give you may not be very satisfactory: like many "tricks" in evaluating integrals, it is something that one recognizes after a certain amount of experience. Once you have seen substitutions of this form, it becomes something you can spot in other problems. – heropup Feb 14 '17 at 7:42

We have

\begin{align*} \int \frac{1-x^2}{x^4 + 3x^2 + 1} \, dx &= - \int \frac{1 - x^{-2}}{(x + x^{-1})^2 + 1} \, dx \\ &= - \arctan\left(x + \frac{1}{x}\right) + C. \end{align*}

Here, we utilized the substitution $u = x + x^{-1}$ when we move to the second line. For the definite integral, we have

$$\int_{0}^{\infty} \frac{1-x^2}{x^4 + 3x^2 + 1} \, dx = \left[ - \arctan\left(x + \frac{1}{x}\right) \right]_{0^+}^{+\infty} = -\frac{\pi}{2} + \frac{\pi}{2} = 0.$$