<s>[INST] 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?
 [/INST] 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}
</s>