$\int (x^2+1)/(x^4+1)\ dx$
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}
Since $x^4+1=x^4+2x^2+1-2x^2=(x^2+\sqrt2x+1)(x^2-\sqrt2x+1)$, we obtain $$\frac{x^2+1}{x^4+1}=\frac{1}{2}\left(\frac{1}{x^2+\sqrt2x+1}+\frac{1}{x^2-\sqrt2x+1}\right).$$ Now, use $\int\frac{1}{1+x^2}dx=\arctan{x}+C$.