Integral $\int\frac{4x^4}{{x^8+1}}\;dx$ I'm attempting this integral but I'm unsure how to proceed. I've begun to suspect it's actually non-elementary. Can anyone do this? I could always use Taylor series after a small bit of u-sub and integration by parts, but I wanted to know if there were a somewhat more direct way of doing it.
 The integral is $$\int\frac{4x^4}{{x^8+1}}\;dx$$
Thanks in advance.
 A: First of all, let me precise that, for this kind of integrals, Taylor expansions could me more thatn dangerous.
Considering the integrand, you can first write (by analogy with $(x^4+1)$
$$\frac {4x^4}{x^8+1}=\frac{\sqrt{2} x^2}{x^4-\sqrt{2} x^2+1}-\frac{\sqrt{2} x^2}{x^4+\sqrt{2} x^2+1}$$
Then
$$x^4-\sqrt{2} x^2+1=\left(x^2-\frac{1+i}{\sqrt{2}}\right) \left(x^2-\frac{1-i}{\sqrt{2}}\right)$$
$$x^4+\sqrt{2} x^2+1=\left(x^2+\frac{1-i}{\sqrt{2}}\right) \left(x^2+\frac{1+i}{\sqrt{2}}\right)$$ which finally make
$$\frac {4x^4}{x^8+1}=\frac{i \sqrt{2}}{\sqrt{2}-(1-i) x^2}-\frac{i \sqrt{2}}{\sqrt{2}-(1+i) x^2}+\frac{i \sqrt{2}}{\sqrt{2}+(1-i) x^2}-\frac{i \sqrt{2}}{\sqrt{2}+(1+i) x^2}$$ and now, we face quite trivial integrals.
$$\int\frac {4x^4}{x^8+1}\,dx=\cos \left(\frac{\pi }{8}\right) \left(\frac{1}{2} \log \left(\frac{x^2+2 x \sin
   \left(\frac{\pi }{8}\right)+1}{x^2-2 x \sin \left(\frac{\pi
   }{8}\right)+1}\right)+\tan ^{-1}\left(\frac{2 x \sin \left(\frac{\pi
   }{8}\right)}{1-x^2}\right)\right)+$$
$$\sin \left(\frac{\pi }{8}\right) \left(\frac{1}{2} \log \left(\frac{x^2-2 x \cos
   \left(\frac{\pi }{8}\right)+1}{x^2+2 x \cos \left(\frac{\pi
   }{8}\right)+1}\right)-\tan ^{-1}\left(\frac{2 x \cos \left(\frac{\pi
   }{8}\right)}{1-x^2}\right)\right)$$
In particular
$$\int_0^\infty\frac{4x^4}{{x^8+1}}\;dx=\pi\sqrt{1-\frac{1}{\sqrt{2}}} $$
A: Not an answer.  Maybe this result inspires a by-hand method.  The integral is "elementary".
\begin{align*}
&\int \frac{4x^4}{x^8+1} \,\mathrm{d}x  \\
&= 4 \left(-\frac{1}{8} \cos \left(\frac{\pi }{8}\right) \log \left(x^2-2 x \sin
   \left(\frac{\pi }{8}\right)+1\right)  
\right.  \\  &\quad \left. {}
+\frac{1}{8} \cos \left(\frac{\pi
   }{8}\right) \log \left(x^2+2 x \sin \left(\frac{\pi
   }{8}\right)+1\right)
\right.  \\  &\quad \left. {}
+\frac{1}{8} \sin \left(\frac{\pi }{8}\right) \log
   \left(x^2-2 x \cos \left(\frac{\pi }{8}\right)+1\right)
\right.  \\  &\quad \left. {}
-\frac{1}{8} \sin
   \left(\frac{\pi }{8}\right) \log \left(x^2+2 x \cos \left(\frac{\pi
   }{8}\right)+1\right)
\right.  \\  &\quad \left. {}
+\frac{1}{4} \cos \left(\frac{\pi }{8}\right) \tan
   ^{-1}\left(\csc \left(\frac{\pi }{8}\right) \left(x-\cos \left(\frac{\pi
   }{8}\right)\right)\right)
\right.  \\  &\quad \left. {}
+\frac{1}{4} \cos \left(\frac{\pi }{8}\right) \tan
   ^{-1}\left(\csc \left(\frac{\pi }{8}\right) \left(x+\cos \left(\frac{\pi
   }{8}\right)\right)\right)
\right.  \\  &\quad \left. {}
-\frac{1}{4} \sin \left(\frac{\pi }{8}\right) \tan
   ^{-1}\left(\sec \left(\frac{\pi }{8}\right) \left(x-\sin \left(\frac{\pi
   }{8}\right)\right)\right)
\right.  \\  &\quad \left. {}
-\frac{1}{4} \sin \left(\frac{\pi }{8}\right) \tan
   ^{-1}\left(\sec \left(\frac{\pi }{8}\right) \left(x+\sin \left(\frac{\pi
   }{8}\right)\right)\right)\right)  \text{.}
\end{align*}
Produced by a CAS.  There are some "simplifications", but they don't shorten the expression much.
