Compute $\int\frac{1}{1+x^4}dx$ I was given the following hint and I can solve the problem by using the following equation. But I'm curious about how one can get the equation. Can someone give me some wikipedia links about it or hints to manipulate the equation?$$\frac{1}{1+x^4}=\frac{x-\sqrt{2}}{2\sqrt{2}(-x^2+\sqrt{2}x-1)}+\frac{x+\sqrt{2}}{2\sqrt{2}(x^2+\sqrt{2}x+1)}$$
BTW, are there any easier method to solve this integral? As seen on the answer, it seems not very possible. ;)
 A: To find this decomposition, we have to factorize $x^4 + 1$. As $x^4 + 1$ does not have real roots, it does not have real linear factors. This gives the ansatz 
$$ x^4 + 1 = (x^2 + ax + b)(x^2 + cx + d) $$
We have
$$
  (x^2 + ax + b)(x^2 + cx + d) = x^4 + (a+c)x^3 + (b + d + ac)x^2 + (bc + ad)x + bd $$
Comparing the coefficients with $x^4+ 1$, we have
\begin{align}
  a + c &= 0\tag 1\\
 b + d + ac &= 0\tag 2\\
  bc + ad &= 0\tag 3\\
   bd &= 1\tag 4
\end{align}
Now $a = -c$ from (1), this gives 
\begin{align}
  a &= -c\\
 b + d - a^2 &= 0\tag 2\\
  a(d - b) &= 0\tag 3\\
   bd &= 1\tag 4
\end{align}
As $a = 0$ is impossible, as then (2) would give $b = -d$, which contradicts (4), we must have $a \ne 0$ and hence $d = b$ from (3), this leaves us with
\begin{align}
  a &= -c\\
 2b - a^2 &= 0\tag 2\\
   d &= b\\
   b^2 &= 1\tag 4
\end{align}
By (2), $b$ is positive, hence $b = 1$ by (4). This gives $d = 1$, and hence $a = \pm \sqrt 2$. Due to symmetry in $a$ and $c$, we may let $a = \sqrt 2$, giving 
$$ x^4 + 1 = (x^2 + \sqrt 2 x + 1)(x^2 - \sqrt 2 x + 1) $$
Now we use partial fraction decomposition, starting with the ansatz 
$$ \frac 1{x^4 + 1} = \frac{\alpha x + \beta}{x^2 + \sqrt 2 x + 1} + \frac{\gamma x + \delta}{x^2 - \sqrt 2 x + 1} $$
Clearing denominators gives 
\begin{align*}
  1 &= (\alpha x + \beta)(x^2 - \sqrt 2 x + 1) + (\gamma x + \delta)(x^2 + \sqrt 2 x + 1)\\
    &= (\alpha + \gamma)x^3 + (\beta -\sqrt 2 \alpha + \delta + \sqrt 2 \gamma)x^2 + (\alpha + \gamma - \sqrt 2\beta + \sqrt 2 \delta)x + \beta + \delta
\end{align*}
Comparing coefficients gives 
\begin{align*}
    \alpha + \gamma &= 0\\
    \beta + \delta + \sqrt 2(\gamma - \alpha) &= 0\\
   \alpha + \gamma + \sqrt 2(\delta - \beta) &= 0\\
   \beta + \delta &= 1 
\end{align*}
From the first, the third equation and the forth equation we have $\beta = \delta = \frac 12$, the second one gives $\gamma - \alpha = \frac 1{\sqrt 2}$, as $\alpha = -\gamma$ by the first equation $\gamma = \frac 1{2\sqrt 2}$, $\alpha = - \frac 1{2\sqrt 2}$, giving 
$$ \frac 1{x^4 + 1} = \frac{- x + \sqrt 2}{2\sqrt 2(x^2 + \sqrt 2 x + 1)} + \frac{x + \sqrt 2}{2\sqrt 2(x^2 - \sqrt 2 x + 1)} 
$$
A: I am giving a hint.
$$\int \frac {dx}{1+x^4}=\frac 12\left(\int\frac {1+x^2}{1+x^4}dx-\int\frac {x^2-1}{1+x^4}dx\right)\\=\frac 12\left(\int\frac {1+\frac 1{x^2}}{x^2+\frac 1{x^2}}dx-\int\frac {1-\frac 1{x^2}}{x^2+\frac 1{x^2}}dx\right)$$
Now, write $x^2+\frac 1{x^2}=\left(x-\frac 1x\right)^2+2$ and $x^2+\frac 1{x^2}=\left(x+\frac 1x\right)^2-2$, for the respective integrals, substitute for $x+\frac 1x=z$ and $x-\frac 1x=u$.
Now, you have $\left(1-\frac 1{x^2}\right)dx=dz$ and $\left(1+\frac 1{x^2}\right)dx=du$
Now,proceed from here, it is easy for you now.
A: Notice, $$\int\frac{dx}{1+x^4}=\int\frac{dx}{x^2\left(\frac{1}{x^2}+x^2\right)}$$
$$=\int\frac{\frac{1}{x^2}}{\frac{1}{x^2}+x^2}dx=\frac{1}{2}\int\frac{\frac{2}{x^2}}{x^2+\frac{1}{x^2}}dx$$
$$=\frac{1}{2}\int\frac{\left(1+\frac{1}{x^2}\right)-\left(1-\frac{1}{x^2}\right)}{x^2+\frac{1}{x^2}}dx$$
$$=\frac{1}{2}\int\frac{1+\frac{1}{x^2}}{x^2+\frac{1}{x^2}}dx-\frac{1}{2}\int\frac{1-\frac{1}{x^2}}{x^2+\frac{1}{x^2}}dx$$
$$=\frac{1}{2}\int\frac{1+\frac{1}{x^2}}{\left(x-\frac{1}{x}\right)^2+(\sqrt2)^2}dx-\frac{1}{2}\int\frac{1-\frac{1}{x^2}}{\left(x+\frac{1}{x}\right)^2-(\sqrt2)^2}dx$$
$$=\frac{1}{2}\int\frac{d\left(x-\frac{1}{x}\right)}{\left(x-\frac{1}{x}\right)^2+(\sqrt2)^2}dx-\frac{1}{2}\int\frac{d\left(x+\frac{1}{x}\right)}{\left(x+\frac{1}{x}\right)^2-(\sqrt2)^2}dx$$
$$=\frac{1}{2\sqrt 2}\tan^{-1}\left(\frac{x-\frac{1}{x}}{\sqrt 2}\right)-\frac{1}{4\sqrt 2}\ln\left|\frac{x+\frac{1}{x}-\sqrt 2}{x+\frac{1}{x}+\sqrt 2}\right|+C$$
