I am trying to solve it with "partial fractions"
$$\frac {x^2}{x^4+1}=\frac{x^2}{(x^2+x\sqrt{2}+1)(x^2-x\sqrt{2}+1)}=\frac{Ax+B}{(x^2+x\sqrt{2}+1)}+\frac{Cx+D}{(x^2-x\sqrt{2}+1)}$$
and I get the following system of equations:
$A+C=0$
$-\sqrt{2}A+B+\sqrt{2}C+D=1$
$A-\sqrt{2}B+C+\sqrt{2}D=0$
$B+D=0$
How can I find $A,B,C,D$?
Observe that the integrand is an even fraction, so it is invariant when we change $x$ to $-x$: $$\frac{Ax+B}{(x^2+x\sqrt{2}+1)}+\frac{Cx+D}{(x^2-x\sqrt{2}+1)}=\frac{-Ax+B}{(x^2-x\sqrt{2}+1)}+\frac{-Cx+D}{(x^2+x\sqrt{2}+1)}.$$ This implies that $\;C=-A,\; D=B$, and you have only a linear system in two unknowns.