Power series representation of $f(x) = \frac{x-1}{x+2}$ What I did so far:
\begin{align*}
\frac{x-1}{x+2}&=(\frac{x-1}{2})\frac{1}{1-(-\frac{x}{2})} \\
&=(\frac{x-1}{2})\sum_{n=1}^\infty (-\frac{x}{2})^n\\
&= (x-1)\sum_{n=1}^\infty \frac{-x^n}{2^{n+1}}
\end{align*}
But i'm stuck there.
 A: But then you're already done...That can't be put in any form that will be nicer imo.
You could also try
$$\frac{x-1}{x+2}=1-\frac3{x+2}=1-\frac32\frac1{1+\frac x2}=1-\frac32\sum_{n=0}^\infty\frac{(-1)^nx^n}{2^n}=\sum_{n=0}^\infty a_nx^n$$
with
$$a_0=1-\frac32=-\frac12\;,\;\;a_n=\frac{3(-1)^{n+1}}{2^{n+1}}\;,\;\;n\ge1$$
A: $$f(x)=\frac{x-1}{x+2}=1-\frac{3}{x+2}=1-\frac{3}{2}\frac{1}{1+\frac{x}{2}}\to\\
f(x)=1-\frac{3}{2}\sum_{n=0}^{\infty}(-1)^n\left(\frac{x}{2}\right)^n
$$
There are several ways to represent this exression. If you'd like to have everything under one sum, you can do following:
$$
1=\frac{1}{2}2\to 1=\frac{1}{2}\sum_{n=0}^{\infty}\left(\frac{1}{2}\right)^n=\sum_{n=0}^{\infty}\left(\frac{1}{2}\right)^{n+1}\\
f(x)=\sum_{n=0}^{\infty}\left(\left(\frac{1}{2}\right)^{n+1}+\frac{3}{2}(-1)^{n+1}\left(\frac{x}{2}\right)^n\right)
$$
A: An alternate approach:
\begin{align}
\frac{x-1}{x+2} &= \frac{x + 2 - 3}{x+2} = 1 - \frac{3}{2 + x} = 1 - \frac{3}{2} \, \frac{1}{1 + \frac{x}{2}} \\
&= 1 - \frac{3}{2} \, \sum_{n=0}^{\infty} (-1)^{n} \, \frac{x^{n}}{2^{n}} \\
&= 1 - \frac{3}{2} + \sum_{n=1}^{\infty} \frac{(-1)^{n}}{2^{n}} \, x^{n} \\
&= \sum_{n=0}^{\infty} a_{n} \, x^n
\end{align}
which leads to
$$ a_{0} = - \frac{1}{2} \hspace{5mm} a_{n} = \frac{3 \, (-1)^{n+1}}{2^{n}}, n \ge 1   $$
