Finding the discrete time fourier coefficients to this problem I'm trying to find the fourier series to this discrete time signal.
$$x_1[n] =\begin{cases}
+\frac72&amp;\text{if }0\le n \le 4\\
-\frac72&amp;\text{if }5\le n \le 9
\end{cases}$$
My approach:
We see that the discrete period, $N$, is 10, so $\Omega_0 = \frac{2\pi}{10} = \frac{\pi}{5}$
Now using the formula to get the DT fourier coefficients, $X[k]$
\begin{align}
X[k] &amp;= \frac{1}{N}\sum_{n = 0}^{n = 9}x_1[n]e^{-j\frac{\pi}{5}kn} \tag{1}\\
&amp;= \frac{1}{10}\left( \sum_{n = 0}^{n = 4}\frac{7}{2}e^{-j\frac{\pi}{5}kn} + \sum_{n = 5}^{n = 9}\frac{-7}{2}e^{-j\frac{\pi}{5}kn} \right)\tag{2}\\
&amp;= \frac{7j}{10}\sum_{n = 0}^{n = 4}\sin\left(\frac{\pi k n}{5}\right)\tag{3}
\end{align}
However according to the solutions for $k = 2$, we have $X[k = 2] = 0$, but when I substitute $kk = 2$ into the final form of the above expression, I don't get $0$. Thus, my answer must be wrong, but I'm not sure where I went wrong... Can someone please explain where my math is flawed and if there's an easier way to find the coefficients?
HINT:
$$\sum_{n=5}^9e^{-j\pi kn/5}=\sum_{n=0}^4e^{-j\pi k(n+5)/5}=\sum_{n=0}^4e^{-j\pi kn/5}e^{-j\pi k}=(-1)^k\sum_{n=0}^4e^{-j\pi kn/5}$$
I'm sure you can take it from here.