Q:

If $f(x)=\sum_0^\infty (-1)^n x^{2n}$ for all $x\in(0,1)$ then $f'(x)=$?

If $f(x)=\sum_0^\infty (-1)^n x^{2n}$ for all $x\in(0,1)$ then $f'(x)=$?
This is a question that appears on the GRE exam gr9367 and the answer is $\frac{-2x}{(1+x^2)^2}$. The way I justify this is as follows:
Integrating $f$ with respect to $t$ from $0$ to $x$ gives $$\begin{align}\int_0^x \sum_0^\infty (-1)^n t^{2n}dt&=\int_0^x 1-t^2+t^4-t^6+...\\&=t-\frac{1}{3}t^3+\frac{1}{5}t^5-\frac{1}{7}t^7+...\Big\vert_0^x\\&=ArcTan(x).\end{align}$$
So it goes that,$$\begin{align}f(x)&=\frac{d}{dx}ArcTan(x)\\&=\frac{1}{1+x^2},\end{align}$$
and $$f'(x)=-\frac{2x}{(1+x^2)^2}.$$
I was only able to figure this out after seeing the answer, integrating it, then I was like "oh that's the derivative of arctan." SO MY QUESTION IS: is there an observation that I'm missing which makes this problem easier, or is my solution the standard approach and I just wasn't able to think of it without knowing the answer before hand? Thanks!

A:

$f(x)=\sum_0^\infty (-1)^n x^{2n}$ is a G.P. with first term $1$ and common ratio $-x^2$.
Therefore you simply need to apply the Formula for infinite sum of a GP.
$$S_{\infty}=\frac{a}{1-r}=\frac{1}{1-(-x^2)}=\frac{1}{1+x^2}$$

