Trigonometric identity involving sum of "Dirichlet kernel like" fractions Computing the eigenvalues of a matrix related to fast Fourier transform, we stumbled upon the following identities.
Let $k$ and  $N$ be natural numbers with $k<N$, then:
$$\sum\limits_{j=1}^N (-1)^{j+1}\frac
{\sin \left( \frac{2\pi j k}{2N+1}\right)}
{\sin\left( \frac{\pi j}{2N+1}\right)}=k$$
and
$$\sum \limits_{j=1}^{N}(-1)^{j+1} 
\sin \left( \frac{\pi j k}{N}\right)
\cot \left( \frac{\pi j}{2N} \right)=k.$$
How can these be proven? (This is not a homework question. I have seen lots of similar formulae but not exactly these ones. These can be reformulated in various ways, e.g., the first is simultaneously an identity for Chebyshev polynomials of second kind.)
 A: $\square$ Let us denote
$$S_k=\sum_{j=1}^N(-1)^{j+1}\frac{\sin  \frac{2\pi j k}{2N+1}}{\sin \frac{\pi j}{2N+1}},$$
and observe that for $k=0,\ldots,N-1$ one has
\begin{align}S_{k+1}-S_k&=\sum_{j=1}^N(-1)^{j+1}
\frac{\sin  \frac{2\pi j (k+1)}{2N+1}-\sin  \frac{2\pi j k}{2N+1}}{\sin \frac{\pi j}{2N+1}}=\\
&=2\sum_{j=1}^N(-1)^{j+1}\cos \frac{\pi j (2k+1)}{2N+1}=\\
&=\sum_{j=1}^N(-1)^{j+1}e^{\frac{\pi i (2k+1) j}{2N+1}}+\sum_{j=1}^N(-1)^{j+1}e^{-\frac{\pi i (2k+1) j}{2N+1}}=\\
&=e^{\frac{\pi i (2k+1)}{2N+1}}\frac{1-(-1)^Ne^{\frac{\pi i (2k+1)N}{2N+1}}}{1+e^{\frac{\pi i (2k+1)}{2N+1}}}+e^{-\frac{\pi i (2k+1)}{2N+1}}\frac{1-(-1)^Ne^{\frac{-\pi i (2k+1)N}{2N+1}}}{1+e^{-\frac{\pi i (2k+1)}{2N+1}}}=\\&
=1+(-1)^{N+1}\frac{e^{\frac{\pi i (2k+1)(2N+1-N)}{2N+1}}+e^{\frac{-\pi i (2k+1)N}{2N+1}}}{1+e^{\frac{\pi i (2k+1)}{2N+1}}}=\\
&=1.\tag{$\heartsuit$}\end{align}
Here at the first step we use that $\sin a -\sin b=2\sin\frac{a-b}{2}\cos\frac{a+b}{2}$ and the third is obtained by summing finite geometric series. 
Obviously, $S_0=0$, and therefore the first identity (written as $S_k=k$) easily follows from ($\heartsuit$) by induction.
$\blacksquare$
The second identity can be proved in a completely analogous fashion - that is, by considering the difference of the left sides for two consecutive $k$, summing up the resulting finite geometric series and induction with a trivial base case.
P.S. As pointed out by Grigory M, one does not even need to sum up geometric series: the same result ($\heartsuit$) can be achieved with simpler manipulations.
A: (In the spirit of Dirichlet kernel &c) let's rewrite the sum as
$$
\sum_{j=1}^N(-1)^{j+1}2\left[\cos\left(\frac{\pi j}{2N+1}\right)+\cos\left(\frac{3\pi j}{2N+1}\right)+\dots+\cos\left(\frac{(2k+1)\pi j}{2N+1}\right)\right]
$$
and change the order of summation — since
$$
2\sum_{j=1}^N(-1)^{j+1}\cos\left(\frac{(2l+1)\pi j}{2N+1}\right)=
\sum_{j=1}^{2N}(-1)^{j+1}\cos\left(\frac{(2l+1)\pi j}{2N+1}\right)=1
$$
we are done.
