Elegant Trigonometric Sums While studying characters of a finite field and the Polya-Vinogradov inequality, I've found some nice identities (verified by simulations) that I'm not sure how to prove. They seem to be related to Chebyshev's polynomials of the second kind.
The identities are:
$$ \sum_{a=1}^{q-1} \left( \frac{\sin (\frac{\pi N a}{q})}{\sin (\frac{\pi a}{q})}\right)^2 = N(q-N) \tag{1}$$
$$ \sum_{a=1}^{q-1} (-1)^a \frac{\sin (\frac{\pi N a}{q})}{\sin (\frac{\pi a}{q})} = -N \cdot 1_{N+q \equiv 1 \mod 2}\tag{2}$$
Another function that interests me is the following:
$$ f(N,q,c) = \sum_{a=1}^{q-1} (-1)^{a+ac} \frac{\sin (\frac{\pi N a}{q})}{\sin (\frac{\pi a}{q})} \frac{\sin (\frac{\pi N ac}{q})}{\sin (\frac{\pi ac}{q})}\tag{3}$$
For $c=\pm 1$ it coincides with $1$. How does it behave in general?
$N,q$ and $C$ are positive integers satisfying $N&ltq$.
 A: A partial answer:
To prove (1), follow Franz Lemmermeyer's suggestion.  Let $\omega=e^{i\pi/q}$ and write the left-hand side as 
$$
S_1=\sum_{a=1}^{q-1}\left[\frac{\omega^{aN}-\omega^{-aN}}{\omega^a-\omega^{-a}}\right]=\sum_{a=1}^{q-1}\left[\sum_{j=1}^N \omega^{a(N+1-2j)}\right]^2=\sum_{a=1}^{q-1}\sum_{j=1}^N \omega^{a(N+1-2j)}\sum_{k=1}^N\omega^{a(N+1-2k)}.
$$
Reordering the sums gives
$$
S_1=\sum_{j=1}^N\sum_{k=1}^N\sum_{a=1}^{q-1}\omega^{2a(N+1-j-k)}=-N^2+\sum_{j=1}^N\sum_{k=1}^N\sum_{a=0}^{q-1}\omega^{2a(N+1-j-k)}.
$$
The innermost sum equals 0 unless $j+k=N+1$, in which case it equals $q$. Since the double sum over $j$ and $k$ contains $N$ terms in which the condition $j+k=N+1$ holds, we have
$$
S_1=-N^2+Nq.
$$
The second one should work out similarly.  I'll have to think more about the third.
A: The second identity may be proved using some known trigonometrical power sums, combined with  the representation  of the binomial coefficients  by the  residue operator.  To carry out this computation, the sum may be written as   $$S_{2}(N)=\sum_{s\geq0}(-1)^{s}\binom {N-s-1}{s}2^{N-2s-1}\sum_{a=1}^{q-1}(-1)^a\cos^{N-2s-1}(a\pi/q),$$ so,  one has to evaluate the sum over $a$, this sum turns out to depend on both $N$, $q$. From the classic textbook by  I. J. Schwatt, An Introduction to the Operations with Series. Philadelphia, (1924), using the formulas  Eq (113), and  Eq (114), page 222, then, we may show that the sum is different from $0$
for $N$ odd, $ q$ even, and vanishes for $N$ odd, $ q$ odd. If $N$ is even, then, the above sum is non-vanishing only  for $q$ odd. Using the residue representation of the binomial coefficients
$$\binom {n}{k}=\hbox{res}_w (1+w){^n}{w^{-k-1}},$$  together with the definition of the normalized Chebysheve polynomial of the second kind, then, we prove the following identities,
$$ S_{2}(l)=\sum_{a=1}^{q-1}(-1)^a\frac{\sin(aN\pi/q)}{\sin(a\pi/q)}=-2\hbox{res}_{w=0} \frac{1}{w^{N-1}}\frac{1}{(1-w)^2}-\hbox{res}_{w=0} \frac{1}{w^N}\frac{1}{(1-w)}=-(2N-1),$$ for $N$ odd,  $ q$ even, 
similarly,
$$ S_{2}(N)=\sum_{a=1}^{q-1}(-1)^a\frac{\sin(aN\pi/q)}{\sin(a\pi/q)}=-2\hbox{res}_{w=0} \frac{1}{w^{N}}\frac{1}{(1-w)^2}=-2N,$$ for $N$ even, $ q$ odd. 
 Now, consider the following alternating sum  $$ S_{3}(q,N,c=2)=\sum_{a=1}^{q-1}(-1)^{a}\frac{\sin(aN\pi/q)}{\sin(a\pi/q)}\frac{\sin(2aN\pi/q)}{\sin(2a\pi/q)}. $$  Here, $q$ is assumed to be odd, then, it can be shown that the sum is non-vanishing only for $N$ even. By using similar steps as in the previous case, one can show that the sum  $ S_{3}(q,2N-1,c=2)$,  has  the following closed form;
$$-\frac{1}{2}3N(3N-1)+\frac{1}{2}N(N-1)-N+q\Big(3N-\frac{(q+1)}{2}+\frac{1}{2}(1-(-1)^{N-\frac{(q+1)}{2}}\Big), $$ where the last term contributes  only for $ 3N > \frac{(q+1)}{2}$.
For the explicit computations, see the author 's recent work; Trigonometrical sums connected with one-dimensional lattice, the chiral Potts model, and number theory using the residue operator, arXiv:1206.6673v1 [math-ph]
