Prove $\sum_{k=1}^{n-1} k \cos\frac{3 \pi k}{n} \sin\frac{\pi k}{n}=\frac n4\csc\frac{2\pi}n$ I would like to evaluate the sum
$$\sum_{k=1}^{n-1} k \cos\frac{3 \pi k}{n} \sin\frac{\pi k}{n}
$$
which is said to reduce to the simple close-form $\frac n4\csc\frac{2\pi}n$. I have verified it numerically for a large number of $n$’s. However, I have struggled to prove it by using familiar trigonometric identities. The index term $k$ in front of the sequence is problematic. I am not sure how to get around it. Appreciate any hint or proof.

Noting that
$$
\begin{aligned}
\sum_{k=1}^{n-1} k \sin (k \theta) &=-\sum_{k=1}^{n-1} \frac{d}{d \theta}(\cos (k \theta))=-\frac{d}{d \theta}\left(\sum_{k=1}^{n-1} \cos k \theta\right)
\end{aligned}
$$
Using the identity
$$\sum_{k=1}^{n-1} \cos k \theta= 
\frac{1}{2}\left[-\cos (n \theta)+\cot \left(\frac{\theta}{2}\right) \sin (n \theta)-1\right]$$
Hence $$\sum_{k=1}^{n-1} k \sin (k \theta)= \frac{1}{2}\left[-n \sin (n \theta)-n \cot \left(\frac{\theta}{2}\right) \cos (n\theta)+\frac{1}{2} \csc ^{2}\left(\frac{\theta}{2}\right) \sin (n \theta)\right] \cdots(*) $$
Converting the product to sum yields
$$ \begin{aligned}\sum_{k=1}^{n-1} k \cos\frac{3 \pi k}{n} \sin\frac{\pi k}{n} &= \frac 1 2\sum_{k=1}^{n-1} k \left[\sin \left (\frac {4\pi k}{n}\right) -\sin \left (\frac {2\pi k}{n}\right)\right]\end{aligned}$$
Putting $\theta=\frac{4 \pi}{n}$ and $\frac{2 \pi}{n}$ in the identity (*), simplifies the  sum as
$$\begin{aligned}\sum_{k=1}^{n-1} k \cos\frac{3 \pi k}{n} \sin\frac{\pi k}{n}=
&=\frac{n}{4}\left[\cot \left(\frac{\pi}{n}\right)-\cot \left(\frac{2 \pi}{n}\right)\right]=\frac{n}{4} \csc \left(\frac{2 \pi}{n}\right)
\end{aligned} $$
