I'm attending this course (Coursera: Audio Signal Processing for Music Applications) in which the professor derives a general equation for Discrete Fourier Transform (DFT) for a complex sinusoid. The following is the screenshot of the slide he used:

Slide Content

While the derivation is totally fine, I'm having trouble understanding the concluding statement

if $k \neq k_0, denominator \neq 0$ & $numerator = 0$ thus $ X_1[k]=N$ for $k=k_0$ & $X_1[k]=0$ for $k \neq k_0$

I did try value substitution and all, but all that can't seem to justify the statement. My understanding is that if $k=k_0$, both the numerator and the denominator would be zero and there would be no way the result is $N$ and I have no clue about the first part of the statement either. Or I'm missing something here (or forgotten some basic school math here). What's going on here?

  • 2
    $\begingroup$ You can use L'Hospital's rules if you wish. But it's better to consult to the answers below. $\endgroup$
    – Fat32
    Jul 20, 2017 at 13:50
  • $\begingroup$ De L'Hospital rule is neat, but one should use it with a lot of care, or not use it at all math.stackexchange.com/questions/1710786/… $\endgroup$ Dec 10, 2018 at 20:49
  • $\begingroup$ few years later, but I am doing the exact same course, and was confused by the exact same statement! $\endgroup$
    – Tom
    Dec 28, 2023 at 17:06

2 Answers 2


The last expression (sum of a geometric series) is a common abuse of notations: it should have been:

  • $N$ if $k= k_0$
  • $f(r)=\frac{1-r^N}{1-r}$ with $r=e^{-j 2\pi(k-k_0)/N}$ if $k\neq k_0$

Indeed, as you correctly remarked, numerator and denominator would vanish for $r=1$ (or $k= k_0$), so the fraction is not "theoretically" defined. However, it is consistent to the limit, as $f(r)\to N$ as $r\to 1$ since $e^{-j 2\pi(k-k_0)/N}\to 1$ when $k \to k_0$ (allowing real $k$).

Mathematically, the fraction gives one single expression, defined by continuity at $k= k_0$. It is a bit like saying that $\frac{r^2-1}{r-1}$, not defined at $r=1$, is in some way equivalent to $r+1$ (using $r^2-1=(r-1)(r+1)$ and wrongfully simplifying the fraction. This is not correct, but makes sense.


Do the substitution before trying to sum the series (the line before the fraction). Note that e^0 = 1, thus the series is no longer geometric looking, thus trying to use that fraction to sum a series might not be an appropriate step.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.