How I could evaluate this integral? $$I_n=\int_0^1 \frac{x^n}{x^2+x+1} \,dx$$
I’ve tried so far integration by parts and partial fraction, each method has led to a dead end. So how I should evaluate this using standard methods, if is possible of course.
 A: Here is one possible approach. I'm just going to sketch it out. First note that
$$\frac{x^{3n} - 1}{x^2+x+1} = (1 + x^3 + x^6 + \ldots + x^{3n-3})(x-1)$$
This formula allows you to evaluate $I_{3n},I_{3n+1},I_{3n+2}$ separately (by multiplying the above by $1$, $x$ and $x^2$) as a sum of $I_0,I_1,I_2$ respectively and the integral of polynomials (which will be rational).
For the polynomials above we can find a simple recursion for the integrals. For example for $I_{3n+1}$ we have
$$I_{3n+1} = I_1 + \int_0^1 \frac{x^{3n+1}-x}{x^2+x+1}{\rm d}x = I_1 + \int_0^1 P_n(x){\rm d}x$$
where the polynomial is
$$P_n(x) = x(1 + x^3 + x^6 + \ldots + x^{3n-3})(x-1)$$ 
which satisfy $P_{n+1}(x) = P_n(x)  + x(x-1)x^{3n}$ which is easy to integrate.
The integral $I_0$ can be solved by completing the square in the denominator and remembering $\int\frac{{\rm d}x}{1+x^2} = \arctan(x) + C$ (gives rise to $\pi$'s). For $I_1$ we can use a substitution $u = x^2+x+1$ (gives rise to $\log$'s) plus the result for $I_0$ and for $I_2$ we can use polynomial division and then the result for $I_1$ and $I_0$ (gives rise to $\pi$'s and $\log$'s).
This will lead to something like $I_{3n} = \frac{\pi}{3\sqrt{3}} + a_n$, $I_{3n+1} =  -\frac{\pi}{6\sqrt{3}}+\frac{\log(3)}{2} + b_n$ and $I_{3n+2} = 1-\frac{\pi}{6\sqrt{3}} - \frac{\log(3)}{2} + c_n$ where $a_n,b_n,c_n$ are rational numbers which has simple recursion relations and will for $I_n$ correspond to a sum of $[n/3]$ terms (you will find an expression on the form  $-\sum_{k=0}^{n-1}\frac{1}{(i+1)(i+2) + (9+6i) k + 9k^2}$ with $a_n$ corresponding to $i=0$, $b_n$ to $i=1$ and $c_n$ to $i=2$).
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}
I_{n} & \equiv \int_{0}^{1}{x^{n} \over x^{2} + x + 1}\,\dd x =
\int_{0}^{1}{x^{n} - x^{n + 1}\over 1 - x^{3}}\,\dd x =
{1 \over 3}\int_{0}^{1}{x^{n/3 - 2/3} - x^{n/3 - 1/3} \over
1 - x}\,\dd x
\\[5mm] & =
{1 \over 3}\bracks{\int_{0}^{1}{1 - x^{n/3 - 1/3} \over
1 - x}\,\dd x - \int_{0}^{1}{1 - x^{n/3 - 2/3} \over
1 - x}\,\dd x}
\\[5mm] & =
{1 \over 3}\bracks{\Psi\pars{{n \over 3} + {2 \over 3}} -
\Psi\pars{{n \over 3} + {1 \over 3}}}\qquad
\pars{~\Psi:\ Digamma\ Function~}
\end{align}

See
  $\mathbf{\color{black}{6.3.22}}$ in A&S Table.

