Proving $\lim_{n\to\infty} \sum_{i=1}^{n/2}(-1)^i \cos{\frac{(2i-1)\pi}{2n-2}}=-\frac12$ for even $n$ 
I want to prove
$$\lim_{n\to\infty} \sum_{i=1}^{n/2}(-1)^i \cos{\frac{(2i-1)\pi}{2n-2}}=-\frac12$$
when $n$ is even.

I tried to solve it with Maclaurin series, but I can't.
 A: For simplicity, change $n/2$ to $n$.
$$ S_n=\sum_{k=1}^{n}(-1)^k \cos{\frac{(2k-1)\pi}{4n-2}}\\
= \sum_{k=1}^n (-1)^k \Re \exp\left(i\frac{(2k-1)\pi}{4n-2}\right )\\
=\Re \sum_{k=1}^n (-1)^k \left[\exp\left(i\frac{2\pi}{4n-2}\right )\right]^k\exp\left(i\frac{-\pi}{4n-2}\right )\\
=\Re \left\{-\exp\left(i\frac{-\pi}{4n-2}\right )\exp\left(i\frac{2\pi}{4n-2}\right ) \frac{1-\left[-\exp\left(i\frac{2\pi}{4n-2}\right )\right]^n}{1+\exp\left(i\frac{2\pi}{4n-2}\right )}\right\} \\
$$
Taking the limit $n \to \infty$, it is pretty obvious that
$$
S_n \to -\Re \left\{\frac{1-\left[-\exp\left(i\frac{2\pi}{4n-2}\right )\right]^n}{2}\right\} \\
$$
Next, from the fact that $\frac{2n}{4n-2}\to \frac12$, we show that
$$
\left[-\exp\left(i\frac{2\pi}{4n-2}\right )\right]^n=-\exp\left(i\frac{2n\pi}{4n-2}\right ) \to -i,
$$
Hence its real part tends to zero.
From this we conclude that $S_n \to-1/2$
A: Hint
$$(-1)^k\cos\left(\frac{2k-1}{2n-2}\pi\right)=\Re\left(e^{-\frac{\pi}{2n-2}}e^{ik\pi\left(\frac{2}{2n-2}+1\right)}\right).$$
