How can I calculate this sum (while $0 < q,\ p < 1$)?
$$\sum_{x=1}^{\infty} x^2\cdot q^{x-1} \cdot p$$
I thought to calculate it with the derivative of something that gives $x^2\cdot q^{x-1} \cdot p$, but I don't know how to do it.
How can I calculate this sum (while $0 < q,\ p < 1$)?
$$\sum_{x=1}^{\infty} x^2\cdot q^{x-1} \cdot p$$
I thought to calculate it with the derivative of something that gives $x^2\cdot q^{x-1} \cdot p$, but I don't know how to do it.
Here is one way to proceed.
Let $D$ be the differential operator ($Df = f'$). Then, \begin{equation} \sum_{k = 1}^\infty k^2 q^{k - 1} = \frac{1}{q} \sum_{k = 1}^\infty (qD)^2 q^k = \frac{1}{q} (qD)^2 \sum_{k = 1}^\infty q^k. \end{equation} This last sum is geometric. Carrying out the (somewhat tedious) calculations yields: \begin{equation*} \frac{1}{q} (qD)^2 \frac{q}{1 - q} = -\frac{q + 1}{(q - 1)^3}. \end{equation*} Multiplying by an arbitrary constant $p$ will not change the result.