How do I evaluate the integral $\int_0^1\frac{x^2+x+1}{x^4+x^3+x^2+x+1}dx$. stuck on this integral
$$\int_0^1\dfrac{(x^2+x+1)}{(x^4+x^3+x^2+x+1)}\ dx$$
I was attempting to evaluate  the infinity sum S = $ 1- \frac{1}{4}  + \frac {1}{6} - \frac {1}{9} + \frac {1}{11} -\frac {1}{14}+  ........ $ 
what I then  did was define the S to be equal to $$ \int_0^1 (1-x^3 +x^5-x^8+x^{10}-x^{13}+........) dx $$
I simplified this  and got the above integral I tried to do partial fraction but did not succeed.
 A: If your purpose is to evaluate
$$ S=\sum_{k\geq 0}\left[\frac{1}{10k+1}-\frac{1}{10k+4}+\frac{1}{10k+6}-\frac{1}{10k+9} \right]$$
you do not need an indefinite integral, just an integral over $(0,1)$: that's a huge difference, in some cases. 
Actually, since $1+9=4+6=10$, you may just invoke the identities
$$ \sum_{k\geq 0}\left[\frac{1}{10k+1}-\frac{1}{10k+9}\right]=\frac{\pi}{10}\cot\frac{\pi}{10} $$
$$ \sum_{k\geq 0}\left[\frac{1}{10k+4}-\frac{1}{10k+6}\right]=\frac{\pi}{10}\cot\frac{4\pi}{10} $$
which follow from Herglotz' trick / the reflection formula for the digamma function.
In particular
$$ S = \frac{\pi}{5}\sqrt{1+\frac{2}{\sqrt{5}}}.$$
A: The hint:
Use $$x^4+x^3+x^2+x+1=\left(x^2+\frac{1}{2}x+1\right)^2-\left(\frac{\sqrt5}{2}x\right)^2=$$
$$=\left(x^2+\frac{1-\sqrt5}{2}x+1\right)\left(x^2+\frac{1+\sqrt5}{2}x+1\right).$$
Can you end it now?
A: $\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
\begin{align}
&\bbox[10px,#ffd]{\int_{0}^{1}{x^{2} + x + 1 \over
x^{4} + x^{3} + x^{2} + x + 1}\,\dd x} =
\int_{0}^{1}{\pars{x^{3} - 1}/\pars{x - 1} \over
\pars{x^{5} - 1}/\pars{x - 1}}\,\dd x
\\[5mm] = &\
\int_{0}^{1}{1 - x^{3} \over 1 - x^{5}}\,\dd x
\,\,\,\stackrel{x^{5}\ \mapsto\ x}{=}\,\,\,
{1 \over 5}\int_{0}^{1}{x^{-4/5} - x^{-1/5} \over 1 - x}\,\dd x
\\[5mm] = &\
{1 \over 5}\pars{\int_{0}^{1}{1 - x^{-1/5} \over 1 - x}\,\dd x -
\int_{0}^{1}{1 - x^{-4/5} \over 1 - x}\,\dd x} =
{1 \over 5}\bracks{\Psi\pars{4 \over 5} - \Psi\pars{1 \over 5}}
\\[5mm] = &\
{1 \over 5}\bracks{\pi\cot\pars{\pi{1 \over 5}}} =
\bbx{{1 \over 5}\root{1 + {2 \over \root{5}}}\,\pi} \approx 0.8648
\end{align}
