Show that $\sum_{k=0}^\infty \frac{e^{-x}(k-x)^2x^k}{k!} = x$ Show that $$\sum_{k=0}^\infty \frac{e^{-x}(k-x)^2x^k}{k!} = x$$
I guess I can use Maclaurin expansion of $e^x = \sum_{k=0}^\infty \frac{x^k}{k!}$.

Consider instead 
$$\begin{align*}
\sum_{k=0}^\infty (k(k-1)-2kx+x^2)\frac{x^k}{k!} 
 &= \sum_{k=2}^\infty k(k-1)\frac{x^k}{k!} - 2\sum_{k=1}^\infty k\frac{x^{k+1}}{k!} + \sum_{k=0}^\infty \frac{x^{k+2}}{k!} 
\\ &= \sum_{k=2}^\infty \frac{x^k}{(k-2)!} - 2\sum_{k=1}^\infty \frac{x^{k+1}}{(k-1)!} + \sum_{k=0}^\infty \frac{x^{k+2}}{k!} \\ &= 0
\end{align*}$$
Then adding $\displaystyle\sum_{k=0}^\infty k\frac{x^k}{k!}$ to both sides gives
$$\sum_{k=0}^\infty (k-x)^2\frac{x^k}{k!} = \sum_{k=0}^\infty k\frac{x^k}{k!} = \sum_{k=0}^\infty \frac{x^{k+1}}{k!} = xe^x$$
which gives the intended result by multiplying both sides by $e^{-x}$
