Q:

How to find the expansion in power of x?

How to find the expansion in power of x of the following function?
$$f(x) = \frac{1}{(1 + x)^2}$$
We are given the hint that $f(x)$ is the derivative of 
$$ -\frac{1}{1 + x}$$
I also know that the expansion should follow some form of 
$$1 + x + x^2 + x^3 + x^4 +\ldots + x^k + \ldots$$
However I am not sure where to begin in finding the expansion

A:

\begin{align}
f(x) &= - \frac{d}{dx}\left( \frac{1}{1+x}\right)\\
&= - \frac{d}{dx}\sum_{i=0}^\infty (-x)^i \text{, by Geometric sum}\\
&= \sum_{i=0}^\infty(-1)^{i+1}\frac{d}{dx} x^i \\
&= \sum_{i=1}^\infty(-1)^{i+1}ix^{i-1} \\
&=\sum_{i=0}^\infty (-1)^{i}(i+1)x^i
\end{align}
Remark: Actually we should still justify when can we perform termwise differentiation. 

