Evaluating $\int \frac{1}{{x^4+1}} dx$ I am trying to evaluate the integral
$$\int \frac{1}{1+x^4} \mathrm dx.$$
The integrand $\frac{1}{1+x^4}$ is a rational function (quotient of two polynomials), so I could solve the integral if I can find the partial fraction of $\frac{1}{1+x^4}$. But I failed to factorize $1+x^4$. 
Any other methods are also wellcome. 

Hint:
$$x^4+1=(x^2-\sqrt{2}x+1)(x^2+\sqrt{2}x+1) \tag{1}$$
You can integrate using partial fraction decomposition. Since
$$x^4+1=(x^2-\sqrt{2}x+1)(x^2+\sqrt{2}x+1),$$
then
$$\frac{1}{x^4+1}=\frac{Ax+B}{x^2-\sqrt{2}x+1}+\frac{Cx+D}{x^2+\sqrt{2}x+1}=\frac{(Ax+B)(x^2+\sqrt{2}x+1)+(Cx+D)(x^2-\sqrt{2}x+1)}{(x^2-\sqrt{2}x+1)(x^2+\sqrt{2}x+1)} = \\
= \frac{x^3(A+C)+x^2(A\sqrt{2}+B+D-C\sqrt{2})+x(B\sqrt{2}-D\sqrt{2})+B+D}{(x^2-\sqrt{2}x+1)(x^2+\sqrt{2}x+1)}$$
$$\begin{cases}
A+C=0;\\
B+D+\sqrt{2}(A-C)=0; \\
B-D=0; \\
B+D=1.
\end{cases}$$
$$
A=-C=-\frac{1}{2\sqrt{2}}; \\
B=D=\frac{1}{2}$$
$$
\frac{1}{x^4+1}=\frac{1}{2\sqrt{2}}\left(\dfrac{-x+\sqrt{2}}{x^2-\sqrt{2}x+1}+ \dfrac{x+\sqrt{2}}{x^2+\sqrt{2}x+1} \right).
$$
Added
Decomposition (1) can be done using one of the following ways:


*

*Completion to the full square 
$$x^4+1=x^4 +2x^2+1 -2x^2=(x^2+1)^2-\left(\sqrt{2}x\right)^2 = \\ =\big(x^2-\sqrt{2}x +1 \big)\big( x^2+\sqrt{2}x +1 \big).$$

*Let $\omega_i, \ i\in\{1,\, 2,\,3,\,4\}   $ are roots of the equation $x^4+1=0$ over $\mathbb{C}:$ $\omega_1=\frac{\sqrt{2}}{2}(1-i), \ \omega_2=\frac{\sqrt{2}}{2}(1+i) \ \omega_3=\frac{\sqrt{2}}{2}(-1+i), \ \omega_4=\frac{\sqrt{2}}{2}(-1-i). $ Then use the decomposition into prime factors and multiply pairwise complex conjugate:
$x^4+1= \left( x-\frac{\sqrt{2}}{2}(1-i) \right)\left( x-\frac{\sqrt{2}}{2}(1+i) \right)\left( x-\frac{\sqrt{2}}{2}(-1+i) \right)\left( x-\frac{\sqrt{2}}{2}(-1-i) \right) = \\ =\big(x^2-\sqrt{2}x +1 \big)\big( x^2+\sqrt{2}x +1 \big).$
