In my class we derived that the Fourier Transform of $X[n] = u[n] - u[n-7]$ is
$$\sum_{n=-\infty}^{\infty} X[n] e^{-jwn} = \sum_{n=0}^{6}e^{-jwn}$$ using the finite sum formula we get:
$$ \frac{1-e^{-jw7}}{1-e^{-jw}} =\frac{e^{-jw7/2}(e^{-jw7/2}-e^{-jw7/2})}{e^{-jw/2}(e^{-jw/2}-e^{-jw/2})} = e^{-j3w} \frac{\sin(w7/2)}{\sin(w/2)}$$
if we evaluate $e^{-j3w} \frac{\sin(w7/2)}{\sin(w/2)}$ at $w =0$we get $\frac{0}{0}$. However if we plug in $w = 0 $ into $\sum_{n=-\infty}^{\infty}X[n]e^{-j0n} = 0$ . Since the equality sign was used thrroughout all this, I am confused how one expression evaluates to a number while the other does not. Is there an underlying assumption of using the finite sum formula which causes this discrepancy ?
The finite geometric sum formula requires that your ratio not be equal to one, so you will have to consider the cases $w \ne 0$ and $w = 0$ separately. (Luckily, in the case of the ratio being equal to $1$, it is very trivial to get the end result.)