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.

To get rid of the $k$, I use the following identity:
$$\sum_{k=1}^{n-1}  kz^k=z\frac{d}{dz}\sum_{k=0}^{n-1}z^k=z\frac{d}{dz}\frac{1-z^n}{1-z}=\frac{(n-1)z^{n+1}-nz^n+z}{(1-z)^2}$$
Thus using $z=e^{\frac {4i\pi}n}$,
$$\begin{split}
\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)\\
&= \frac 1 2 \Im \left [ \sum_{k=1}^{n-1} k e^{\frac {4i\pi k}{n}} -\sum_{k=1}^{n-1} k e^{\frac {2i\pi k}{n}}\right]\\
&= \frac 1 2 \Im\left[ \frac{(n-1)e^{\frac {4i\pi}{n}}-n+e^{\frac {4i\pi}{n}}}{(1-e^{\frac {4i\pi}{n}})^2} - \frac{(n-1)e^{\frac {2i\pi}{n}}-n+e^{\frac {2i\pi}{n}}}{(1-e^{\frac {2i\pi}{n}})^2}\right]\\
&= \frac 1 2 \Im\left[ \frac{(n-1)e^{\frac {4i\pi}{n}}-n+e^{\frac {4i\pi}{n}}}{(1-e^{\frac {4i\pi}{n}})^2} - \frac{(n-1)e^{\frac {2i\pi}{n}}-n+e^{\frac {2i\pi}{n}}}{(1-e^{\frac {4i\pi}{n}})^2}(1+e^{\frac {2i\pi}{n}})^2\right]\\
&= \frac 1 2 \Im\left[ \frac{ne^{\frac {2i\pi}{n}}(1-e^{\frac {4i\pi}{n}})}{(1-e^{\frac {4i\pi}{n}})^2} \right]\\
&= \frac 1 2 \Im\left[ \frac{ne^{\frac {2i\pi}{n}}}{(1-e^{\frac {4i\pi}{n}})} \right]\\
&= \frac n 2 \Im\left[ \frac{1}{-2i\sin\left(\frac {4\pi}{n}\right)} \right]\\
&= \frac n 4 \csc \left(\frac {4i\pi}{n}\right)
\end{split}$$
