TITLE: $\int (x^2+1)/(x^4+1)\ dx$
QUESTION [7 upvotes]: I have Divided the numerator and Denominator by $x^2$
to get $\dfrac{1+x^{-2}}{x^2+x^{-2}}$ then changed it into $(1+(x^{-2}))/[(x-x^{-1})^2 +2]$ then took $x-(1/x)$ as $u$ and Differentiated it with respect to $x$ to get $dx=du/(1+x^{-2})$  Finally I got this expression:
$$
\int\frac{x^2+1}{x^4+1} \, dx = \int (u^2+2)^{-1} \, du
$$
After this I need help!

REPLY [7 votes]: Standard tables of integrals say:
$$ \int (1+v^2)^{-1} \, dv = (\arctan v) + \text{constant}. $$
Therefore
\begin{align}
\int (2+u^2)^{-1} \, du & = \frac 1 {2\sqrt 2} \int \left(1 + \left(\frac u {\sqrt 2} \right)^2 \right)^{-1} \, \big( \sqrt 2\, du\big) \\[10pt]
& = \frac 1 {2\sqrt 2} \int (1+v^2)^{-1} \, dv \\[10pt]
& = \frac 1 {2\sqrt 2} \arctan v + C \\[15pt]
& = \frac 1 {2\sqrt 2} \arctan \frac u {\sqrt 2} + C. 
\end{align}