I try to calculate $$\sum_{k=0}^n(-1)^kx^{(2k)}.$$
I know that the sum of $q^i$ from $i=0$ to n equals $(q^{(n+1)} -1)/(q-1)$. I think this should help with my problem. From mathematica i know that my sum should equal $(1+(-1)^n x^{(2+2n)})$ divided by $(1+x^2)$ but I don't get there with my calculation.