Calculate $\lim_{n\rightarrow \infty}\sum_{k=1}^{n}\cos\left(\frac{2\pi k}{2n+1}\right)$. Calculate
$$\lim_{n\rightarrow \infty}\sum_{k=1}^{n}\cos\left(\frac{2\pi k}{2n+1}\right)$$
Question: I want to verify that my next attempt is correct, I do it too exhausted and in that state I do not trust my abilities.
My attempt: Note that $$\sum_{k=1}^{n}\cos\left(\frac{2\pi k}{2n+1}\right)=\mathbb{Re}\left(\sum_{k=1}^{n}e^{\frac{2\pi k i}{2n+1}}\right).$$
In this sense, we know that
$$\begin{array}{rcl}\sum_{k=1}^{n}e^{\frac{2\pi k i}{2n+1}}&=&{\displaystyle \sum_{k=1}^{n}\left(e^{\frac{2\pi  i}{2n+1}}\right)^{k} } \\ &=& {\displaystyle\frac{e^{\frac{2\pi  i}{2n+1}}-\left(e^{\frac{2\pi  i}{2n+1}}\right)^{n+1}}{1-e^{\frac{2\pi  i}{2n+1}}} } \\
&=& {\displaystyle\frac{ \left(e^{\frac{2\pi  i}{2n+1}}-e^{\frac{2(n+1)\pi  i}{2n+1}}\right)\left( 1-e^{\frac{-2\pi  i}{2n+1}} \right)  }{\left(1-e^{\frac{2\pi  i}{2n+1}}\right)\left(1-e^{\frac{-2\pi  i}{2n+1}}\right) } } \\
&=& {\displaystyle\frac{e^{\frac{2\pi  }{2n+1}}-e^{\frac{2\pi (n+1)  }{2n+1}} -1 +e^{\frac{2\pi n }{2n+1}}  }{2-\cos\left( \frac{2\pi  }{2n+1} \right)} } 
\end{array}$$
Therefore, we have
$${\mathbb{Re}\left(\sum_{k=1}^{n}e^{\frac{2\pi k i}{2n+1}}\right)=\displaystyle\frac{\cos\left(\frac{2\pi  }{2n+1}\right)-\cos\left(\frac{2\pi (n+1)  }{2n+1}\right) -1 +\cos\left(\frac{2\pi n }{2n+1}\right)   }{2-\cos\left( \frac{2\pi  }{2n+1} \right)} }.  $$
Hence, we can conclude
$$\lim_{n\rightarrow \infty}\sum_{k=1}^{n}\cos\left(\frac{2\pi k}{2n+1}\right)=\lim_{n\rightarrow \infty}\mathbb{Re}\left(\sum_{k=1}^{n}e^{\frac{2\pi k i}{2n+1}}\right)=\displaystyle\frac{\cos\left(0\right)-\cos\left(\pi\right) -1 +\cos\left(0\right)   }{2-\cos\left( 0 \right)}=0 .$$

For all $n\in\Bbb{Z}^+ $,
$$
\sum_1^n \cos\frac{2\pi k}{2n+1} = -\frac12$$
Proof:
$$
\sum_1^{2n+1} \cos\frac{2\pi k}{2n+1} = 0$$
because it is the real part of 
$$
S=\sum_1^{2n+1} e^{i\frac{2\pi k}{2n+1}}$$
and $S$ can be multiplied by any $e^{i\frac{2\pi r}{2n+1}}$ for integer $r$ with the effect of just rotating the entries in the sum, thus not changing the sum; so $S$ is a number which when multiplied by different complex quantities remains the same, thus $S=0$.
$$
\sum_1^{2n+1} \cos\frac{2\pi k}{2n+1} = \sum_1^{n} \cos\frac{2\pi k}{2n+1}
+ \sum_{n+1}^{2n} \cos\frac{2\pi k}{2n+1} + \cos\frac{2\pi (2n+1)}{2n+1}
$$
Now since $\cos(\pi-x)=\cos(\pi+x)$,
$$
0=\sum_1^{2n+1} \cos\frac{2\pi k}{2n+1} = 2\sum_1^{n} \cos\frac{2\pi k}{2n+1}
 + \cos(2\pi) =  2\sum_1^{n} \cos\frac{2\pi k}{2n+1}
 + 1\\
\sum_1^{n} \cos\frac{2\pi k}{2n+1} = -\frac12
$$
So your limit is in fact $-\frac12$ and as I commented, it approaches it very rapidly (immediately at $n=1$.
Son' task where @Don Antonio's reasoning went astray...
