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.