# How to compute $\sum_{x=0}^{\infty}xa^x$? [duplicate]

Need a hint to compute $\displaystyle \sum_{x=0}^\infty xa^x$ and $\displaystyle \sum_{x=0}^\infty x^2a^x$, where $a \in (0,1)$.

• This will help: math.stackexchange.com/questions/647587/… May 31, 2015 at 18:39
• Why that strange way to write the limits in the sum? May 31, 2015 at 18:40
• I've posted answers to this question several times. I wonder if it's our most frequently re-posted question. May 31, 2015 at 18:56
• @MichaelHardy: He seems to be the first to also ask about $\sum \limits _{n=0} ^\infty n^2 a^n$. May 31, 2015 at 19:00
• @Brenton: Apparently, the original is math.stackexchange.com/questions/67364/sequence-sum-question May 31, 2015 at 19:01

Hint: Differentiate $\sum_{x=0}^{\infty}a^x$ with respect to $a$.
Consider the genral term and rewrite as $$ia^i=a(ia^{i-1})=a\frac{d}{da}(a^i)$$ So we can write the series as $$a\frac{d}{da}\sum_{i=0}^{\infty}a^i=a\frac{d}{da}\frac{1}{1-a}=\frac{a^2}{(1-a)^2}$$ I leave the second one to you. Hope this helps.