[tex]\displaystyle \int\dfrac{1}{(x^2+1)(x^4+1)}\, dx =\\ \\ \\= \dfrac{1}{2}\int \left(\dfrac{1}{1+x^2} + \dfrac{1-x^2}{1+x^4}\right)\, dx \\ \\=\dfrac{1}{2}\int\dfrac{1}{1+x^2}\, dx+\dfrac{1}{2}\int \dfrac{1-x^2}{1+x^4}\, dx \\ \\= \dfrac{1}{2}\arctan x+\dfrac{1}{2}\int \dfrac{x^{-2}-1}{x^{-2}+x^{2}}\, dx \\ \\ =\dfrac{\arctan x}{2}+\dfrac{1}{2}\int \dfrac{x^{-2}-1}{x^{-2}+x^2+2-2}\, dx \\ \\ = \dfrac{\arctan x}{2}-\dfrac{1}{2}\int \dfrac{(x+x^{-1})'}{(x+x^{-1})^2-(\sqrt{2})^2}\, dx[/tex]
[tex]= \dfrac{\arctan x}{2}-\dfrac{1}{4\sqrt{2}}\ln \left|\dfrac{x+x^{-1}-\sqrt{2}}{x+x^{-1}+\sqrt{2}}\right|+C\\ \\\\ = \dfrac{\arctan x}{2}-\dfrac{1}{4\sqrt{2}}\ln \left|\dfrac{x^2-\sqrt{2}x+1}{x^2+\sqrt{2}x+1}\right|+C[/tex]