Where did I go wrong here?
As part of my worksheet for uni, I had to calculate the sum of the series $\sum_{k=2}^\infty (k-1)(1-p)^{k-2}$. ($p \in (0,1)$ denotes a probablity.) According to the German Wiki page on Geometric Series (relevant formula anchored in link, language not relevant), the series can be solved by differentiating. The result turns out to be $\frac{1}{p^2}$, which I know to be correct.
My initial calculations as detailed below, however, led to the incorrect result of $\frac{1}{p(1-p)}$. I would like to know where exactly I went wrong.
Let $S$ denote the sum of the series.
\begin{eqnarray} S &:=& \sum_{k=2}^\infty (k-1)(1-p)^{k-2} \\ &=& (2-1)(1-p)^{2-2} + (3-1)(1-p)^{3-2} + (4-1)(1-p)^{4-2} + \dots \\ &=& 1(1-p)^0 + 2(1-p)^1 + 3(1-p)^2 + \dots \\ \Leftrightarrow (1-p)S &=& 1(1-p)^1 + 2(1-p)^2 + 3(1-p)^3 + \dots \\\\ \Leftrightarrow (1-p)S &=& (1(1-p)^0 - (1-p)^0) + (2(1-p)^1 - (1-p)^1) \\ &&+ (3(1-p)^2 - (1-p)^2) + (4(1-p)^3 - (1-p)^3) + \dots \\\\ \Leftrightarrow (1-p)S &=& (1(1-p)^0 + 2(1-p)^1 + 3(1-p)^2 + 4(1-p)^3 + \dots) \\\\ && -((1-p)^0 + (1-p)^1 + (1-p)^2 + (1-p)^3 + \dots) \\\\ \Leftrightarrow S(1-p) &=& S - \sum_{i=0}^\infty (1-p)^i \\ &=& S - \frac{1}{1-p} \\ \Leftrightarrow S((1-p)-1) &=& - \frac{1}{1-p} \\ \Leftrightarrow S &=& - \frac{1}{(1-p)(-p)} = \frac{1}{p(1-p)} \end{eqnarray}
Any help is greatly appreciated! Thanks in advance!
Your problem is in the equality \begin{align*} S(1-p)&=S-\sum_{i=0}^\infty (1-p)^i\\ &=S-\frac{1}{1-p}. \end{align*} Remember that $$ \frac{1}{1-x}=\sum_{i=0}^\infty x^i; $$ do you see the error?