using Taylor's theorem . I need to find $f\left ( x \right ) = \frac{x^{2}+1}{x^{2}-2x+1}$ when $a=0$ and (the variable): $k=n$
I tried to use the taylor's theorem on $g\left ( x \right ) = \frac{1}{(x-1)^{2}}$
and i came to this result $f\left ( x \right ) =2\sum_{n=0}^{\infty}\left (n+1 \right )x^{n}+\sum_{n=0}^{\infty}\left (n+1 \right )x^{2}+\epsilon (x^{n})$ is it correct ?
thanks for your support.
More quickly note that
$$g(x)=\frac d{dx}\frac1{1-x}=\frac d{dx}\sum_{n=0}^\infty x^n=\sum_{n=0}^\infty(n+1)x^n$$
Multiply it by $x^2+1$ and you should've got
$$f(x)=\sum_{n=0}^\infty(n+1)x^{n+2}+\sum_{k=0}^\infty(k+1)x^k\\=1+2x+\sum_{n=2}^\infty(n-1)x^n+\sum_{k=2}^\infty(k+1)x^k\\=1+2x+2\sum_{n=2}^\infty nx^n$$