TITLE: Evaluating $\int_{0}^{1} \frac{x^{2} + 1}{x^{4} + 1 } \ dx$
QUESTION [6 upvotes]: How do I evaluate  $$\int_{0}^{1} \frac{x^{2} + 1}{x^{4} + 1 } \ dx$$
I tried using substitution but I am getting stuck. If there was $x^3$ term in the numerator, then this would have been easy, but this one doesn't.

REPLY [6 votes]: Another way, if you want to sweat harder instead of the elegant suggestion of Chandrasekhar:$$x^4+1=(x^2+\sqrt{2}\,x+1)(x^2-\sqrt{2}\,x+1)\Longrightarrow$$$$ \frac{x^2+1}{x^4+1}=1-\frac{\sqrt 2\,x}{x^2+\sqrt 2\,x+1}+1+\frac{\sqrt 2\,x}{x^2-\sqrt 2\,x+1}$$  so for example$$\int\frac{\sqrt 2\,x}{x^2+\sqrt 2\,x+1}dx=\frac{1}{\sqrt 2}\int\frac{2x+\sqrt 2}{x^2+\sqrt 2\,x+1}dx-\frac{1}{2\sqrt 2}\int\frac{\sqrt 2dx}{(\sqrt 2 x+1)^2+1}=$$$$=\frac{1}{\sqrt 2}\log|x^2+\sqrt 2\,x+1|-\frac{1}{2\sqrt 2}\arctan(\sqrt 2\,x+1)+C$$ and etc.