I have the infinite sums:
$$\sum_{k=0}^\infty k^2a^k \quad \text{and}\quad \sum_{k=0}^\infty ka^k$$
where, $\left\lvert a \right\rvert<1$. I was able to find the answers to the infite sums here, but I am interested on how I could use generating functions to get the same answer.
I am unsure of how to even begin this problem. Thanks for any help in advance.
Let's consider the geometric series \begin{align*} \sum_{k=0}^{\infty}x^k=\frac{1}{1-x} \end{align*}