Evaluate $\int_{0}^{1}\frac{1+x+x^2}{1+x+x^2+x^3+x^4}dx$ Evaluate $$I=\int_{0}^{1}\frac{(1+x+x^2)}{1+x+x^2+x^3+x^4}dx$$
My try:
We have:
$$1+x+x^2=\frac{1-x^3}{1-x}$$
$$1+x+x^2+x^3+x^4=\frac{1-x^5}{1-x}$$
So we get:
$$I=\int_{0}^{1}\frac{1-x^3}{1-x^5}dx$$
$$I=1+\int_{0}^{1}\frac{x^3(x^2-1)}{x^5-1}dx$$
Any idea from here?

Hint:
As the roots of the denominator are the complex fifth roots of unity, you find the factorization to be
$$1+x+x^2+x^3+x^4=\left(x^2+\frac{1+\sqrt5}2x+1\right)\left(x^2+\frac{1-\sqrt5}2x+1\right).$$
Then we can find a linear combination to obtain a quadratic polynomial with equal coefficients,
$$\left(\sqrt5+1\right)\left(x^2+\frac{1-\sqrt5}2x+1\right)+\left(\sqrt5-1\right)\left(x^2+\frac{1+\sqrt5}2x+1\right)=2\sqrt5(x^2+x+1)$$ which leads us to the decomposition in simple fractions.
Now,
$$\int_0^1\frac{dx}{x^2+2ax+1}=\int_0^1\frac{dx}{(x+a)^2+1-a^2}=\left.\frac1{\sqrt{1-a^2}}\arctan\frac{x+a}{\sqrt{1-a^2}}\right|_0^1.$$
