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.)

(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.
