# How did the author simplify this sum?

I have been looking at this derivation

The mean photon number is given by: \begin{align} \bar n&=\sum_{n=0}^\infty n\ \cal P_\omega(n)\\ &=\sum_{n=0}^\infty nx^n(1-x)\\ &=(1-x)x\ \frac{\text d}{\text dx}\left(\sum_{n=0}^\infty x^n\right)\\ &=(1-x)x\ \frac{\text d}{\text dx}\left(\frac1{1-x}\right)\\ &=(1-x)x\ \frac1{(1-x)^2}\\ &=\frac{x}{1-x} \end{align}

and I cannot for the life of me understand how the author simplified it. Where does the derivative come from? Any help understanding this would be greatly appreciated.

• Welcome to MSE. Please type your questions instead of posting images. Images can't be browsed and are not accessible to those using screen readers. If you need help formatting math on this site, here's a tutorial Also, please explain which step it is that you don't understand. Commented Oct 19, 2020 at 4:34
• It looks like the author is using the formula for the derivative of that particular power series: $x(d/dx)\sum x^n = x\sum (d/dx)x^n = x\sum nx^{n-1}=\sum nx^n$. Commented Oct 19, 2020 at 4:34
• You can do whatever works. $\frac {dx^n}{dx}$ does equal $nx^{n-1}$ so $\sum (1-x)nx^n= (1-x)x\sum nx^{n-1} = (1-x)x\sum\frac {dx^n}{dx}$. That it does equal that is not a question. The question is how on earth did the author think of it, and what will the author do with it.... and reading ahead that's pretty darned clever. Commented Oct 19, 2020 at 4:53

I will fill in some more lines that will hopefully make it clear what the author does: \begin{align} \bar n&=\sum_{n=0}^\infty n\ \cal P_\omega(n)\\ &=\sum_{n=0}^\infty nx^n(1-x) \\ &= \sum_{n=0}^\infty (1-x)x\,(nx^{n-1})\\ &= (1-x)x\sum_{n=0}^\infty nx^{n-1}\\ &= (1-x)x\sum_{n=0}^\infty \frac{\mathrm d}{\mathrm dx}x^n\\ &=(1-x)x\ \frac{\text d}{\text dx}\left(\sum_{n=0}^\infty x^n\right)\\ &=(1-x)x\ \frac{\text d}{\text dx}\left(\frac1{1-x}\right)\\ &=(1-x)x\ \frac1{(1-x)^2}\\ &=\frac{x}{1-x}. \end{align} We used that the derivative of a power series is the sum of the derivatives of the individual terms of the original series, and that $$\sum_{n=0}^\infty x^n = \frac{1}{1-x}$$, plus some standard derivative identities.