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}$).