<s>[INST] Maclaurin expansion of $y=\frac{1+x+x^2}{1-x+x^2}$ to $x^4$ 
Maclaurin expansion of $$\displaystyle y=\frac{1+x+x^2}{1-x+x^2}\,\,\text{to } x^4$$

I have tried by using Maclaurin expansion of $\frac1{1-x}=1+x+x^2+\cdots +x^n+o(x^n)$, but it seems not lead me to anything.
 [/INST] Hint: notice that
$$y(x) = \frac{1+x}{1-x}\cdot\frac{1-x^3}{1+x^3}\tag{1}$$
and that:
$$ \frac{1+x}{1-x}=1+2x+2x^2+2x^3+\ldots,\tag{2}$$
from which:
$$ \frac{1-x^3}{1+x^3}=1-2x^3+2x^6-2x^9+2x^{12}-\ldots\tag{3}$$
Are you able to multiply $(2)$ and $(3)$ and prove that:
$$ y(x) = 1 + \left(2x+2x^2\right) - \left(2x^4+2x^5\right)+ \left(2x^7+2x^8\right)-\ldots \tag{4}$$
?
</s>