Compute: $\int_{0}^{1}\frac{x^4+1}{x^6+1} dx$

Edited Here is a much simpler version of the previous answer.

$$\int_0^1 \frac{x^4+1}{x^6+1}dx =\int_0^1 \frac{x^4-x^2+1}{x^6+1}dx+ \int_0^1 \frac{x^2}{x^6+1}dx$$

After canceling the first fraction, and subbing $y=x^3$ in the second we get:

$$\int_0^1 \frac{x^4+1}{x^6+1}dx =\int_0^1 \frac{1}{x^2+1}dx+ \frac{1}{3}\int_0^1 \frac{1}{y^2+1}dy = \frac{\pi}{4}+\frac{\pi}{12}=\frac{\pi}{3} \,.$$

P.S. Thanks to Zarrax for pointing the stupid mistakes I did...


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


A not so simple but funny way to compute it :

Denote I the value we are looking for. With a power series expansion of the integrand, we have $$ I = 1 + 2\sum_{n=1}^\infty \frac{(-1)^n}{36n^2-1} $$ With another series expansion and interversion of the summation, we have $$ I = 1 + 2\sum_{k=1}^\infty 6^{-2k}\sum_{n=1}^\infty \frac{(-1)^{n-1}}{n^{2k}} $$ We recognize the Dirichlet Eta function evaluated at even integers, so $$ I = 1+\sum_{k=1}^\infty \frac{(2^{2k}-2)\pi^{2k}}{6^{2k}}\frac{|B_{2k}|}{(2k)!} $$ Recognizing the well-known series exansion $$ 1 - \frac x2 \mathrm{cot} \frac x2 = \sum_{k=1}^\infty \frac{|B_{2k}| x^{2k}}{(2k)!},$$ we have $$ I = 1 + f(\pi / 3) - 2f(\pi/6), $$ where $f$ is the above function.

The trigonometric computation is not trivial but we eventually find $$ I = \frac{\pi}{3} $$


First substitute $x=\tan\theta$. Simplify the integrand, noticing that $\sec^2\theta$ is a factor of the original denominator. Use the identity connecting $\tan^2\theta$ and $\cos2\theta$ to write the integrand in terms of $\cos^22\theta$. Now the substitution $t=\tan2\theta$ reduces the integral to a standard form, which proves $\pi/3$ to be the correct answer. This method seems rather roundabout in retrospect, but it requires only natural substitutions, standard trigonometric identities, and straightforward algebraic simplification.