I'm trying to calculate the the following equation:
$$ p(1-p)\frac{d}{dp}(p\frac{d}{dp}\sum_{k=0}^\infty p^k) $$
I've expanded the summation in the following steps:
$$p(1-p) \frac{d}{dp}(p \frac{d}{dp}[1 + p + p^2 +p^3 +....])$$ $$p(1-p) \frac{d}{dp}(p [1 + 2p + 3p^2 + 4p^3 + 5p^4 +...])$$ $$p(1-p)\frac{d}{dp}(p + 2p^2 + 3p^3 + 4p^4 + 5p^5 + ...)$$ $$p(1-p) (1 + 4p + 9p^2 + 16p^3 + 25p^4 + ...)$$
Thus, the pattern $\sum_{n=0}^{\infty}n^2 p^{n-1}$ has been reached, which was answered in this question. The final answer turned out to be: $\color{blue}{\frac{(1+p)}{(1-p)^3}}$
However, when I plug that same formula to wolfram it's not getting the same answer it seems:
https://www.wolframalpha.com/input/?i=(sum+i%3D0,infinity(i%5E2(x%5E(i-1)))
It outputs: $\color{blue}{-\frac{(x+1)}{(x-1)^3}}$
Am I going crazy or is wolfram incorrect?