I am in the process of learning to find general formulas for the summation of sequences. I've been given the general geometric sum
$$\sum_{i=m}^n r^i = \frac{r^m - r^{n+1}}{1 - r}$$
along with the basic summation properties, and am asked to find
$$\sum_{i=m}^n (-1)^{i^2}x^{2i}$$
Aside from rewriting the sum in different ways using the laws of exponents, I am stumped on finding the general equation for this sum and would enjoy any clue or solution.
The parity of $i^2$ is the same as $i$, hence $$\sum_{i=m}^n (-1)^{i^2}x^{2i}=\sum_{i=m}^n (-1)^{i}x^{2i}$$ then use the general geometric sum we get \begin{align*} \sum_{i=m}^n (-1)^{i^2}x^{2i}&=\sum_{i=m}^n (-1)^{i}x^{2i}=\sum_{i=m}^n \left ( -x^{2} \right )^{i}\\&= \frac{\left ( -x^2 \right )^m - \left ( -x^2 \right )^{n+1}}{1 - \left ( -x^2 \right )}\\ &=\frac{\left ( -1 \right )^{m}x^{2m}+\left ( -1 \right )^{n}x^{2n+2}}{1+x^2} \end{align*}