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.

• +1 the only answer that doesn't just give the correct formula, but actually says what is wrong with the OP's argument, which is what the question is really about in my opinion. Dec 19 '17 at 20:06
• Thanks for this. I see my error. Stupid of me... And I was thinking about the problem all afternoon! Should I take the question down? Dec 19 '17 at 20:21
• @Clare I wouldn't. Half my questions on this site have really short answers because I'm dumb. Even the long answers I get are usually really simple. I'm just not that bright :P Dec 19 '17 at 20:21

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}}$$