[Integral][Please identify problem] $\displaystyle\int \cfrac{1}{1+x^4}\>\mathrm{d} x$ Here is my attempt. The result is not right. Please help identify the issue(s).
$\displaystyle f(x)=\int\cfrac{1}{x^4+1}\>\mathrm{d}x$, let $x=\tan t$, we have $ \mathrm{d}x = \sec^2 t\>\mathrm{d}t,\> t=\tan^{-1} x\in\left(-\cfrac{\pi}{2},\cfrac{\pi}{2}\right)$
\begin{align}
\displaystyle f(\tan t)&= \int\cfrac{\sec^2 t\> \mathrm{d}t}{1+\tan^4 t}=\int\cfrac{\cos^2 t\> \mathrm{d}t}{\cos^4 t+\sin^4 t}=\int\cfrac{\cfrac{1+\cos 2t}{2}\> \mathrm{d}t}{(\cos^2 t+\sin^2 t)^2-2\sin^2 t\cos^2 t} \notag\\
&=\int\cfrac{1+\cos 2t}{2-\sin^2 2t} \>\mathrm{d}t
=\int\cfrac{\mathrm{d}t}{2-\sin^2 2t} + \cfrac 12\int\cfrac{\mathrm{d}\sin 2t}{2-\sin^2 2t} \notag\\
&=\int\cfrac{\sec^2 2t \>\mathrm{d}t}{2\sec^2 2t-\tan^2 2t} + \cfrac {\sqrt{2}}8\int\cfrac{1}{\sqrt{2}-\sin 2t} + \cfrac{1}{\sqrt{2}+\sin 2t}\>\mathrm{d}\sin 2t \notag\\
&=\cfrac 12\int\cfrac{\mathrm{d}\tan 2t}{2+\tan^2 2t} +\cfrac{\sqrt{2}}{8}\ln \cfrac{\sqrt{2}+\sin 2t}{\sqrt{2}-\sin 2t} \notag\\
&=\cfrac {\sqrt{2}}4 \tan^{-1} \cfrac{\tan 2t}{\sqrt{2}} +\cfrac{\sqrt{2}}{8}\ln \cfrac{\sqrt{2}+\sin 2t}{\sqrt{2}-\sin 2t} \notag
\end{align}
As $\tan 2t=\cfrac{2\tan t}{1-\tan^2 t}=\cfrac{2x}{1-x^2}, \cfrac{\sqrt{2}+\sin 2t}{\sqrt{2}-\sin 2t}=\cfrac{\sqrt{2}\sec^2 t+\tan t}{\sqrt{2}\sec^2 t-\tan t}=\cfrac{\sqrt{2}(x^2+1)+x}{\sqrt{2}(x^2+1)-x},$
$f(x)=\cfrac {\sqrt{2}}4 \tan^{-1} \cfrac{\sqrt{2}x}{1+x^2} +\cfrac{\sqrt{2}}{8}\ln \cfrac{\sqrt{2}(x^2+1)+x}{\sqrt{2}(x^2+1)-x}+c$
If the above holds, $\displaystyle \int_0^{\infty} \cfrac{\mathrm{d} x}{1+x^4}$ would be $0$, which is impossible(Should be $\cfrac {\sqrt{2}\pi}{4}$).

Comparing to the method I used in the following, maybe the issue occurs when computing
$$
\int \frac {\mathrm dt} {2-\sin^2(2t)}.
$$ 
Then from now on $t$ cannot take the value $\pm \pi /4$ if we want to devide the numerator and the denominator by $\cos^2(2t)$. Now to compute the improper integral, we should take the limit $x \to 1^-$ and $x\to 1^+$ separately, since the result is discontinuous at $1$. Fundamental Theorem of Calculus may deduce the wrong result if we apply it to a discontinued antiderivative. So if we use the OP as the antiderivative, we should compute
$$
f(+\infty) - f(1^+) + f(1^-) - f(0),
$$ 
which would give the right result $\sqrt 2 \pi/4$. 
Conclusion: the computation in the OP is right, but when apply it to compute definite integral, we should split the interval at the point $1$. 
Appendix
I'm here to give another approach. We would introduce a conjugate pair. Assume $x \neq 0$. 
\begin{align*}
\int \frac {\mathrm d x} {1+x^4} 
&= \frac 12 \int \frac {1-x^2}{1+x^4} \mathrm dx + \int \frac {1+x^2}{1+x^4}\mathrm dx \\
&= \frac 12 \int \frac {x^{-2} - 1}{x^2+x^{-2 }} \mathrm dx + \frac 12 \int \frac {x^{-2} + 1}{x^2+x^{-2 }} \mathrm dx\\
&= -\frac 12 \int \frac {\mathrm d (x + x^{-1})} {(x+x^{-1} )^2 -2} \mathrm dx+\frac 12 \int \frac {\mathrm d(x-x^{-1})} {(x - x^{-1})^2 +2}\\
&= -\frac {\sqrt 2}8 \int \left( \frac 1 {x +x^{-1}-\sqrt 2} - \frac 1{x+x^{-1}+ \sqrt 2}\right)\mathrm d(x+x^{-1}) \\
&\phantom{==}+\frac {\sqrt2}4 \int \frac {\mathrm d(x - x^{-1})/\sqrt 2} {((x-x^{-1})/\sqrt 2)^2 +1} \\
&= \frac {\sqrt 2}8 \log \left( \frac {x + x^{-1}+\sqrt 2} {x +x^{-1}-\sqrt 2}\right) + \frac {\sqrt 2}4 \mathrm {arctan}\left( \frac {x-x^{-1}} {\sqrt 2}\right) + C \\
&= \frac {\sqrt 2}8 \log \left(\frac {x^2 +\sqrt 2 x + 1} {x^2 - \sqrt2 x +1}\right) +\frac {\sqrt 2}4 \mathrm{arctan} \left(\frac {x^2 -1}{\sqrt 2 x}\right) + C.
\end{align*}
If we use this as the result, then
$$
f(+\infty) - f(0) = \frac {\sqrt 2} 4 \left( \frac \pi 2 + \frac \pi 2\right) = \frac {\sqrt 2}4 \pi. 
$$
Also note that when $x \neq 0$,
$$
\arctan(x) + \mathrm{arccot} (x) = \mathrm {sgn} (x)\frac \pi 2 \implies \arctan (x) = \mathrm {sgn} (x)\frac \pi 2 + \arctan \left(-\frac 1x\right),
$$
so the OP is correct. 
