Power series of $\frac{x^{3}-2}{x^{2}+1}$ I have to find the power series of the function
$$f(x)=\frac{x^3-2}{x^{2}+1}$$
centered at $a=1$. I tried to write $f$ as
$$f(x)=(x^3-2)\cdot\frac{1}{x^{2}+1}$$
and then, find the power series of $\displaystyle\frac{1}{x^{2}+1}$ centered at $a=1$. I want to know if this is the best way to do it.

If you make $x=y+1$
$$\frac{x^3-2}{x^{2}+1}=\frac{y^3+3 y^2+3 y-1}{y^2+2 y+2}=1+y-\frac{y+3}{y^2+2 y+2}$$ If you want a truncated series, continue with the long division.
Looking at the coefficient of the first terms, I suppose that their definition is not the simplest.
Edit
Working
$$\frac{y+3}{y^2+2 y+2}=\sum_{n=0}^\infty a_n\,y^n$$ the coefficients are given by
$$a_n=2^{-(n+2)} \left((3-i) (-1-i)^n+(3+i) (-1+i)^n\right)$$ which are all real. Replacing $y$ by $(x-1)$, we then have
$$\frac{x^3-2}{x^{2}+1}=1+(x-1)-\sum_{n=0}^\infty a_n\,(x-1)^n=-\frac 12+2(x-1)-\sum_{n=2}^\infty a_n\,(x-1)^n$$
