Find the sum to n terms of this series:
1 -y +y^2 -y^3 ...
I have figured that a=(-1)^n+1.
r=-y.
$\displaystyle a=1$
$\displaystyle r=-y$
$\displaystyle S_n=\displaystyle\frac{a\left(1-r^n\right)}{1-r}=\frac{a\left(r^n-1\right)}{r-1}$
$\displaystyle =\displaystyle\frac{1-r^n}{1-r}=\frac{r^n-1}{r-1}$
$\displaystyle =\displaystyle\frac{1-(-y)^n}{1-(-y)}=\frac{(-y)^n-1}{-y-1}$
$\displaystyle =\displaystyle\frac{1-(-1)^ny^n}{1+y}=\frac{(-1)^ny^n-1}{-(y+1)}$
$\displaystyle =\displaystyle\frac{1-(-1)^ny^n}{1+y}=\frac{1+(-1)(-1)^ny^n}{1+y}=\frac{1+(-1)^{n+1}y^n}{1+y}$