Calculate $\int_{0}^{1} \frac{1+x^{2}}{1+x^{4}} d x$ I have to calculate the integral
$$\int_{0}^{1} \frac{1+x^{2}}{1+x^{4}} d x$$
I've calculated the integral $\int_{-\infty}^{+\infty} \frac{1+x^{2}}{1+x^{4}} d x= \sqrt{2}  \pi $. Then $\int_{-\infty}^{+\infty} \frac{1+x^{2}}{1+x^{4}} d x=2 \int_{0}^{+\infty} \frac{1+x^{2}}{1+x^{4}} d x$. How do I now arrive at the initial integral?
 A: Note
$$\int_{0}^{1} \frac{1+x^{2}}{1+x^{4}} dx
= \int_{0}^{1} \frac{1+\frac1{x^{2}}}{x^{2}+\frac1{x^2}} dx
=\int_0^1 \frac {d(x-\frac1x)}{(x-\frac1x)^2+2}
= \frac\pi{2\sqrt2}
$$
A: Note that\begin{align}\int_1^\infty\frac{1+x^2}{1+x^4}\,\mathrm dx&=-\int_1^0\frac{1+y^{-2}}{1+y^{-4}}\left(-\frac1{y^2}\right)\,\mathrm dy\\&=\int_0^1\frac{1+y^2}{1+y^4}\,\mathrm dy\end{align}and that therefore\begin{align}\int_0^\infty\frac{1+x^2}{1+x^4}\,\mathrm dx&=\int_0^1\frac{1+x^2}{1+x^4}\,\mathrm dx+\int_1^\infty\frac{1+x^2}{1+x^4}\,\mathrm dx\\&=2\int_0^1\frac{1+x^2}{1+x^4}\,\mathrm dx.\end{align}
A: Just another way to do it
$$\frac{1+x^{2}}{1+x^{4}}=\frac{1+x^{2}}{(x^2+i)(x^2-i)}=\frac 12\left( \frac{1+i}{x^2+i}+\frac{1-i}{x^2-i}\right)$$ and you could even continue with partial fractions.
Without any simplifications
$$\int\frac{1+x^{2}}{1+x^{4}}\, dx=\frac{2 (i+1) \tan ^{-1}\left(\frac{x}{\sqrt{i}}\right)-(i-1) \left(\log
   \left(\sqrt{i}-x\right)-\log \left(\sqrt{i}+x\right)\right)}{4 \sqrt{i}}$$ Now, playing with the complex numbers,
$$\int\frac{1+x^{2}}{1+x^{4}}\, dx=\frac{\tan ^{-1}\left(1+\sqrt{2} x\right)-\tan ^{-1}\left(1-\sqrt{2}
   x\right)}{\sqrt{2}}$$ REcombining the arctangents,
$$\int\frac{1+x^{2}}{1+x^{4}}\, dx=\frac 1{\sqrt{2}}\tan ^{-1}\left(\frac{\sqrt{2} x}{1-x^2}\right)$$
