# Please help me to find Taylor expansion (or approximation) for $f(x)=\frac{1}{x^2(x-1)}$ around $a=2$

First, sorry if my translations is bad. I need help for this exercise, more precisely , I need to know if my result which I've found is good.

The exercise: Find Taylor expansion (or approximation) for $f(x)=\frac{1}{x^2(x-1)}$ around point $2$. $a=2$ in Taylor series formula: $f(x)=\sum\limits_{n=0}^{\infty}\frac{f^{(n)}(a)}{n!}(x-a)^n$

I tried this: $f(x)=-\frac{1}{x}-\frac{1}{x^2}+\frac{1}{x-1}$ then I found $n$-th derivative of each function at point $a=2$:

$f_1(x)=-\frac{1}{x}; f_1^{(n)}(2)=(-1)^{n+1}\frac{n!}{2^{n+1}}$

$f_2(x)=-\frac{1}{x^2}; f_2^{(n)}(2)=(-1)^{n-1}\frac{(n+1)!}{2^{n+2}}$

$f_3(x)=\frac{1}{x-1}; f_3^{(n)}(2)=(-1)^n n!$

Then I wrote this:

\begin{align} f(x)&=\sum\limits_{n=0}^\infty(-1)^{n+1}\frac{(x-2)^n}{2^{n+1}}+\sum\limits_{n=0}^\infty(-1)^{n-1}\frac{(n+1)(x-2)^n}{2^{n+2}}+\sum\limits_{n=0}^\infty(-1)^n(x-2)^n\\ &=\sum\limits_{n=0}^\infty(-1)^{n+1}(x-2)^n\frac{2^{n+2}+n+3}{2^{n+2}}\end{align}

I hope someone could help me by telling me if result wich I've found is correct or not.

-
check your answer here : wolframalpha.com/input/… –  Bhargav Aug 15 '11 at 12:15
@Bhargav: Your expression was parsed as $(x-1)/x^2$, so the answer at your link is wrong. Try wolframalpha.com/input/…, where I have put $y=x-2$ (otherwise Wolfram Alpha doesn't give the general form of the coefficients). It seems you have a sign error somewhere. –  TonyK Aug 15 '11 at 12:28
@NumLock There is a sign error in your final result. It should be $f(x) = \sum_{n=0}^\infty (-1)^{n+1} (x-2)^n 2^{-n-2} (n + 3 - 2^{n+2})$. –  Sasha Aug 15 '11 at 13:21

The general procedure is correct. And the details look pretty good too. I could now check the details, it would not be difficult.

Instead, I will do the problem in a somewhat different way, which in general is more efficient. It will turn out that a sign error crept into your calculation.

We have $$f(x)=-\frac{1}{x}-\frac{1}{x^2} + \frac{1}{x-1}$$ and want to express $f(x)$ as a sum of powers of $x-2$. It is useful, though not necessary, to let $y=x-2$. Then $x=y+2$. Substituting for $x$, we obtain $$f(y+2)=g(y)= -\frac{1}{y+2}-\frac{1}{(y+2)^2} + \frac{1}{y+1}.$$

We want to express $g(y)$ as a sum of powers of $y$. Let's start with the easiest part, $\frac{1}{1+y}$.

It would be a shame to do a whole lot of differentiating when we already know the power series expansion of $1/(1+y)$. Or at least we certainly know the power series expansion of $1/(1-z)$, and then we can put $y=-z$. Thus $$\frac{1}{1+y}=1-y+y^2-y^3+\cdots=\sum_0^\infty (-1)^ny^n\qquad\qquad\text{(Term 1)}$$

That was easy. Let's go on to the next easiest term, $1/(y+2)$ (I know there should be a minus sign in front, will take care of it later). We have $$\frac{1}{2+y}=\frac{1/2}{1+y/2}.$$ It would be a shame not to use the fact that we know the power series expansion of $1/(1-z)$. We get $$\frac{1}{2+y}=\frac{1}{2}\sum_0^\infty (-1)^n\frac{1}{2^n}y^n=\sum_0^\infty \frac{(-1)^n}{2^{n+1}}y^n,$$ and therefore $$-\frac{1}{2+y}=\sum_0^\infty \frac{(-1)^{n+1}}{2^{n+1}}y^n.\qquad\qquad\text{(Term 2)}$$

Finally, we want the expansion of $1/(2+y)^2$ in powers of $y$. We have just obtained the expansion of $1/(2+y)$. Note that $1/(2+y)^2$ is (almost) the derivative of $1/(2+y)$. To be precise, it is the negative of the derivative of $1/(2+y)$. So let us differentiate the series we obtained for $1/(2+y)$ term by term. We find $$-\frac{1}{(y+2)^2}=\sum_0^\infty \frac{(-1)^{n} n}{2^{n+1}}y^{n-1}=\sum_0^\infty \frac{(-1)^{n+1} (n+1)}{2^{n+2}}y^{n} \qquad\qquad\text{(Term 3)}$$

Now it is just a matter of adding Terms $1$, $2$, and $3$ together. I get, replacing $y$ by $x-2$, the following: $$\sum_0^\infty (-1)^n\left(1-\frac{n+3}{2^{n+2}}\right)(x-2)^n.$$

Comment: When we are calculating power series expansions, it is nice to avoid all those differentiations, by recycling standard expansions.

-
"When we are calculating power series expansions, it is nice to avoid all those differentiations, by recycling standard expansions." alone deserves a +1. Splitting into partial fractions is always helpful in this sort of problems. –  Ｊ. Ｍ. Aug 16 '11 at 3:40
@J.M.: You are right, I should have commented on that. It is particularly important with generating functions. But most of our graduates think partial fractions are an isolated trick for computing some integrals. –  André Nicolas Aug 16 '11 at 3:49
Thank you very much four your help. You are a good teacher! –  NumLock Aug 16 '11 at 6:33
@Numlock: Thank you. I hope that gradually you will find these questions easier. Your calculation was well-handled, the sign problem was a minor slip. Going back to first principles is fine, unless there is a faster way! –  André Nicolas Aug 16 '11 at 6:57