Fix $j,k$ with $0 \leq j,k \leq N$. If $j+k$ is even, (i.e. if $j,k$ have same parity), then
$$ \sum_{n=1}^{N-1} \cos\left(\frac{j\pi}Nn\right)\sin\left(\frac{k \pi}Nn\right) = 0 $$
and
$$ \sum_{n=0}^{N-1} \cos\left(\frac{j\pi}Nn\right) \cos\left(\frac{k\pi}Nn\right) = 0 $$
Except the second sum is $4$ for $j=k$.
basically wondering if there's a clean way to show the sum is 0 when we replace sin with cos
– sweetpotato Sep 18 '21 at 22:07