The indefinite integral is a rational fraction and is typically solved using partial fractions decomposition.
You first factor the denominator $x^4+1$, which has four complex roots, the fourth roots of minus one, let $\omega_0$, $\omega_1$, $\omega_2$, and $\omega_3$. Then you decompose
$$\frac1{x^4+1}=\frac a{x-\omega_0}+\frac b{x-\omega_1}+\frac c{x-\omega_2}+\frac d{x-\omega_3}$$
The unknown coefficients are found by multiplying by one of the denominators and taking the limit to the root:
$$a=\lim_{x\to\omega_0}\frac{x-\omega_0}{x^4+1}=\frac1{4\omega_0^3},$$
and similarly for the other terms.
Then, a single term is integrated with a complex logarithm
$$\int\frac{dx}{x-\omega}=\ln(x-\omega)=\ln|x-\omega|+i\angle(x-\omega).$$
Here we have $\omega_0=\dfrac{1+i}{\sqrt2}$, hence
$$\ln\sqrt{(x-\frac1{\sqrt2})^2+(\frac1{\sqrt2})^2}-i\arctan\frac{\frac1{\sqrt2}}{x-\frac1{\sqrt2}}\\
=\frac12\ln(x^2-\sqrt2x+1)-i\frac\pi2+i\arctan(\sqrt2x-1).$$
Repeat for the four terms (there is a lot of symmetry) and form the linear combination.