<s>[INST] Bounding $\sum_{n=n_1}^\infty x^n (n+1)^2$ I need to upperbound the sum
$$\sum_{n=n_1}^\infty x^n (n+1)^2$$
where $0<x<1$ is a parameter.
I know it can be done starting from
$$\sum_{n=n_1}^\infty x^n (n+1)^2\le \sum_{n=0}^\infty x^n (n+1)(n+2)-\sum_{n=0}^{n_1} x^n (n+1)(n+2)$$ using nasty calculations (integrating twice, then taking the second derivative from the closed form formula of the integral). I was wondering if this can be done in a simpler way. 
 [/INST] Write
$$
  \sum_{n \in S} x^n(n+1)^2
= \sum_{n \in S} \frac{d}{dx} x^{n+1} (n+1)
= \frac{d}{dx} \left( x \sum_{n \in S}  x^n (n+1) \right)
= \frac{d}{dx} \left( x \frac{d}{dx} \sum_{n \in S}  x^{n+1} \right)
$$
for any index set $S$. In the case that $S = \{n_1,n_1+1,\ldots\}$, this becomes
\begin{align}
  \sum_{n = n_1}^\infty x^n(n+1)^2
&= \frac{d}{dx} \left( x \frac{d}{dx} x^{n_1 + 1}\sum_{n =0}  x^n \right)
\\&= \frac{d}{dx} \left( x \frac{d}{dx} \frac{x^{n_1 + 1}}{1-x} \right) \\&=  
\dfrac{{x}^{n_1}\left( x+{\left( 1+n_1 -n_1x \right) }^{2}\right) }{{\left( 1-x\right) }^{3}}
\end{align}
</s>