<s>[INST] Compute: $\int_{0}^{1}\frac{x^4+1}{x^6+1} dx$ I'm trying to compute: $$\int_{0}^{1}\frac{x^4+1}{x^6+1}dx.$$
I tried to change $x^4$ into $t^2$ or $t$, but it didn't work for me.
Any suggestions?
Thanks!
 [/INST] The denominator of the integrand $f(x):=\dfrac{x^{4}+1}{x^{6}+1}$ may be factored as
\begin{eqnarray*}
x^{6}+1 &=&\left( x^{2}+1\right) \left( x^{4}-x^{2}+1\right)  \
&=&\left( x^{2}+1\right) \left( x^{2}-\sqrt{3}x+1\right) \left( x^{2}+\sqrt{3
}x+1\right) 
\end{eqnarray*}
If you expand $f(x)$ you get
$$\begin{eqnarray*}
f(x) &=&\frac{2}{3}\frac{1}{x^{2}+1}+\frac{1}{6}\frac{1}{x^{2}-\sqrt{3}x+1}+
\frac{1}{6}\frac{1}{x^{2}+\sqrt{3}x+1} \\
&=&\frac{2}{3}\frac{1}{x^{2}+1}+\frac{2}{3}\frac{1}{\left( 2x-\sqrt{3}
\right) ^{2}+1}+\frac{2}{3}\frac{1}{\left( 2x+\sqrt{3}\right) ^{2}+1}.
\end{eqnarray*}$$
Since
$$
\int \frac{1}{x^{2}+1}dx=\arctan x
$$
and
$$
\begin{eqnarray*}
\int \frac{1}{\left( ax+b\right) ^{2}+1}dx &=&\int \frac{1}{a\left(
u^{2}+1\right) }\,du=\frac{1}{a}\arctan u \\
&=&\frac{1}{a}\arctan \left( ax+b\right), 
\end{eqnarray*}
$$
we have
$$
\begin{eqnarray*}
\int_{0}^{1}\frac{x^{4}+1}{x^{6}+1}dx &=&\frac{2}{3}\int_{0}^{1}\frac{1}{%
x^{2}+1}dx+\frac{2}{3}\int_{0}^{1}\frac{1}{\left( 2x-\sqrt{3}\right) ^{2}+1}%
dx \\
&&+\frac{2}{3}\int_{0}^{1}\frac{1}{\left( 2x+\sqrt{3}\right) ^{2}+1}dx \\
&=&\frac{2}{3}\arctan 1+\frac{2}{3}\left( \frac{1}{2}\arctan \left( 2-\sqrt{3%
}\right) -\frac{1}{2}\arctan \left( -\sqrt{3}\right) \right)  \\
&&+\frac{2}{3}\left( \frac{1}{2}\arctan \left( 2+\sqrt{3}\right) -\frac{1}{2}%
\arctan \left( \sqrt{3}\right) \right)  \\
&=&\frac{1}{6}\pi +\frac{1}{3}\left( \arctan \left( 2-\sqrt{3}\right)
+\arctan \left( \sqrt{3}\right) \right)  \\
&&+\frac{1}{3}\left( \arctan \left( 2+\sqrt{3}\right) -\arctan \left( \sqrt{3%
}\right) \right)  \\
&=&\frac{1}{6}\pi +\frac{1}{3}\left( \arctan \left( 2-\sqrt{3}\right)
+\arctan \left( 2+\sqrt{3}\right) \right)  \\
&=&\frac{1}{6}\pi +\frac{1}{6}\pi  \\
&=&\frac{1}{3}\pi, 
\end{eqnarray*}
$$
because$^1$
$$
\arctan \left( 2-\sqrt{3}\right) +\arctan \left( 2+\sqrt{3}\right) =\frac{1}{
2}\pi. 
$$

$^1$We apply the arctangent additional formula to $u=2-\sqrt{3}$ and $v=2+\sqrt{3}$
$$
\arctan u+\arctan v=\arctan \frac{u+v}{1-uv}.
$$
Since the product $uv=1$ and $\arctan \left( 2-\sqrt{3}\right) >0,\arctan
\left( 2+\sqrt{3}\right) >0$, we get on the right $\arctan \dfrac{4}{1-1}=
\dfrac{\pi }{2}.$
</s>