So far I have been able to expand most rational and transcendental functions into the Maclaurin series. But irrational functions such as this one $\dfrac{1}{\sqrt{1+x+x^2}}$ confuse me. I try to use the binomial series formula but the general formula only gives me $2$ terms. What I have tried to do is to set up a dummy variable $X=x+x^2$ so that my function has the form $(1+X)^\frac{1}{2}$ and expand them, then reinsert the variable into the expression.
Is this method correct or not? Is there a more general binomial series formula to deal with non-factorable irrational expression?
Hint:
As $1-x^3=(1-x)(1+x+x^2),$
$$(1+x+x^2)^{-1/2}=(1-x)^{1/2}(1-x^3)^{-1/2}$$
Use https://en.m.wikipedia.org/wiki/Binomial_series assuming $|x|<1$