Taylor Series for $\dfrac{x}{x ^ 2 + x + 1}$. I'm trying to calculate the taylor series of $\dfrac{x}{x ^ 2 + x + 1}$.
Algebraic manipulation didn't get me anywhere, since the roots of $ x ^ 2 + x + 1 $ are complex.
Integrate or derive made the problem worse
Any tips on how to proceed?
 A: There seem to be many ways to go about this, so here is one: put $\dfrac{x}{x ^ 2 + x + 1}=\sum_{n=0}^{\infty} a_nx^n$, then $$x=\sum_{n=0}^{\infty} a_nx^n(x^2+x+1)=a_0+(a_1+a_0)x+\sum_{n=2}^{\infty}(a_n+a_{n-1}+a_{n-2})x^n,$$
and by comparing the coefficients we get $a_0=0$, $a_1=1$, and $a_n+a_{n-1}+a_{n-2}=0$ for $n \geq 2$. You can see the coefficients repeat ($a_2=-1,a_3=0,a_4=1,\dots$), so we have $a_{3k}=0, a_{3k+1}=1, a_{3k+2}=-1$, or in other words 
$$
\dfrac{x}{x ^ 2 + x + 1}=x-x^2+x^4-x^5+\dots
$$
A: $\begin{array}\\
\dfrac{x}{x ^ 2 + x + 1}
&=\dfrac{x(1-x)}{1-x^3}\\
&=(x-x^2)\sum_{k=0}^{\infty} x^{3k}\\
&=\sum_{k=0}^{\infty} x^{3k+1}-\sum_{k=0}^{\infty} x^{3k+2}\\
\end{array}
$
A: Suppose we have the recurrence 
$$q_{n+2}=aq_{n+1}+bq_n\qquad n\ge0$$
where $q_0,q_1$ are given. We then define the generating function for this sequence,
$$q(x)=\sum_{n\ge0}q_nx^n.$$
We see that 
$$q_{n+2}x^{n+2}=ax\cdot q_{n+1}x^{n+1}+bx^2\cdot q_nx^n,$$
so that, upon applying $\sum_{n\ge0}$ to both sides, 
$$q(x)-q_1x-q_0=ax(q(x)-q_0)+bx^2q(x)$$
and 
$$q(x)=\frac{(q_1-aq_0)x+q_0}{1-ax-bx^2}.$$
We apply this to the problem in question ($a=b=-1$), and get 
$$\frac{x}{x^2+x+1}=\sum_{n\ge0}q_nx^n,$$
where $$q_{n+2}+q_{n+1}+q_{n}=0\qquad q_0=0,q_1=1.$$
The first few values for $q_n$ are $0,1,-1,0,1,-1,0,1,-1,0,...$
A: Hint
$$(1-x)(1+x+x^2)=?$$
For $-1<x<1,$
$$(1+x+x^2)^{-1}=(1-x)(1-x^3)^{-1}=?$$
Using Binomial Series/ Infinite Geometric Series, $$\dfrac x{1+x+x^2}=x(1-x)(1-x^3)^{-1}=(x-x^2)\sum_{r=0}^\infty(x^3)^r=\sum_{r=0}^\infty(x^{3r+1}- x^{3r+2})$$
