Why does Taylor expansion of $f(x)=\frac{1}{1-x}$ give me a different expression than expected?

Let $f(x)=\frac{1}{1-x}$. Using partial sums I can derive the following for $-1<x<1$:

$$f(x)=1+x+x^2+x^3+\cdots \tag{*}\label*$$

To find a Taylor series expansion of $f(x)$ I need to find a general expression for the nth derivative of $f(x)$. By induction I get:

$$f^{(n)}(x)=\frac{(-1)^n\ n!}{(1-x)^{n+1}}$$

I want to centre my series around zero. So plugging zero in I get...

$$f^{(n)}(0)=(-1)^n\ n!$$

Plugging this in to the formula for the Taylor Series I get...

$$f(x)=\sum_{n=0}^\infty(-1)^nx^n$$

I use the ratio test to find the radius of convergence which is $-1<x<1$.

So using the Taylor Series expansion I get

$$f(x)=1-x+x^2-x^3+\cdots$$ which contradicts \eqref{*} above.

• since you found the Taylor expansion for $\frac 1{1+x}$ it means you forgot to derivate the minus sign in $1-x$ as well.
– zwim
Dec 19 '17 at 20:03
• The "By induction" part is erroneous. $$\dfrac{\mathrm d (-1)^n n! (1-x)^{-1-n}}{\mathrm d x} = (-1)^n (n+1)! (1-x)^{-2-n}$$ Dec 19 '17 at 20:07

The derivatives are wrong - you have to use the chain rule. In addition to getting a $-$ sign from the negative exponents, you also get a minus sign from $1-x$ having derivative $-1$. So at each stage, they cancel out, and you should have all positive terms.
Note that $f'(x)=\frac1{(1-x)^2}$, $f''(x)=\frac2{(1-x)^3}$ and, in general$$f^{(n)}(x)=\frac{n!}{(1-x)^{n+1}}.$$So, your formula for $f^{(n)}$ is wrong.
$$f^{(n)}(x) \ne \frac{(-1)^n\ n!}{(1-x)^{n+1}}$$
We have $f'(x) = \frac{1!}{(1-x)^2}$, $f''(x) = \frac{2!}{(1-x)^3}$ and so on. So we have $$f^{(n)}(x) = \frac{n!}{(1-x)^{n+1}}$$