# DFT of a unit step

Studying DSP on my own.

Intuitively I understand that DFT of unit step is $\delta[n]$ , but I can't demonstrate it mathematically. Here is what I have so far

$$DFT\{u[n]\} = X_k = <\textbf w^{(k)}, \textbf u> = \sum_{n=0}^{N-1}\overline {w^{(k)}}[n]u[n] = \sum_{n=0}^{N-1}\overline {e^{j \frac{2 \pi}{N}kn}}u[n] = \sum_{n=0}^{N-1}e^{-j \frac{2 \pi}{N}kn}u[n] = \sum_{n=0}^{N-1}e^{-j \frac{2 \pi}{N}kn}$$

Using the formula for geometric progression,

$$\sum_{k=0}^{n} ar^k = \frac{a(1-r^{n+1})}{1-r}$$

In my case $a = 1$ and $r=e^{-j\frac{2\pi}{N}k}$, so

$$X_k = \sum_{n=0}^{N-1}e^{-j \frac{2 \pi}{N}kn} = \sum_{n=0}^{N-1}\left(e^{-j \frac{2 \pi}{N}k}\right)^n = \frac{1-e^{-j\frac{2\pi}{N}kN}}{1-e^{-j \frac{2 \pi}{N}k}} = \frac{1-e^{-j2\pi k}}{1-e^{-j \frac{2 \pi}{N}k}}$$

It looks like $X_k$ for $k = 0$ is not even defined. I have a feeling I've done something wrong, but I quite can't figure it out. Have rechecked calculations several times and can't find any issues.

Would appreciate any help with this.

• i think you have more fundamental problems stemming from how to relate the DFT to the Fourier transform of non-repeating signals like the unit step. Jan 16 '18 at 2:39
• you need to get the part of the unit step that is equal to zero represented in this problem Jan 16 '18 at 2:48
• Note (as hinted at by Robert) that this is just the DFT of a constant signal. There's no step involved anywhere. If you wanted a step you would need to choose your DFT window symmetrically around $n=0$ to get zero values for negative $n$ and unity values for $n\ge 0$. Jan 16 '18 at 8:02

$$X_k = \sum_{n=0}^{N-1}e^{-j \frac{2 \pi}{N}kn} = \frac{1-e^{-j2\pi k}}{1-e^{-j \frac{2 \pi}{N}k}} = \begin{cases} N &, \text{ for } k=0 \\ 0 &, \text{ for } k \neq 0 \\ \end{cases} = N\cdot\delta[k]$$ for $k=0,1,...,N-1$.
How to arrive the conclusion? The most elementary treatment is to pre-set the value of $k=0$ into the summation before using the formula for the sum, hence avoid the undefined $0/0$.
• tiny tiny tiny thing: shouldn't it be $N$ for $k=0$, according to the sum over all $N$ instances of $e^0$? Jan 16 '18 at 0:04
• @flashburn: $e^{-j2\pi k}=1$ for any integer $k$. Jan 16 '18 at 7:59
• @flashburn. You are right. If you want to make the closed form (geometric sum formula) to be used for all k then for $k=0$ as you get $0/0$, you should apply L'Hopital's rule to get rid of $0/0$. Then it will be ok. But some people object to such a trick to be applied for discrete-time sequences hence they prefer the more algebraic version. Jan 17 '18 at 9:10