Why does the DTFT of unit step function exist? Using the Discrete time fourier transform formula, the unit step function should transform to:
$$\sum_{n=0}^{\infty} e^{-jwn}$$
This should be a diverging sum, right? The magnitude of every terms is $1$ for any value of $w$.
 A: It's true it doesn't converge in usual sense. Then I'm afraid you need the theory of distributions. For $z\in \Bbb{C},|z|>1$ let $$f(z) = \sum_{n=0}^\infty z^{-n} = \frac1{1-z^{-1}}$$
$f(z)$ is the $Z$ transform of $1_{n \ge 0}$ which is perfectly well-defined on $|z|> 1$.
$f(r e^{it})$ is the DTFT of $r^{-n} 1_{n \ge 0}$,
As $r \to 1^+$, $$r^{-n} 1_{n \ge 0} \to 1_{n \ge 0}$$
Then the DTFT of $1_{n \ge 0}$ is the limit in the sense of distributions $$\lim_{r \to 1^+} f(re^{it}) = \lim_{r \to 1^+}\frac1{1-r^{-1}e^{-it}}=\pi  \sum_k \delta(t-2\pi k) + pv(\frac1{1-e^{-it}})$$
where $\sum_k \delta(t-2\pi k)$ is the $2\pi$-periodic Dirac delta whose Fourier coefficients are all $1$ and $pv(\frac1{1-e^{-it}})$ is the principal value of $\frac1{1-e^{-it}}$ defined by $$\int_{-\pi}^\pi pv(\frac1{1-e^{-it}}) \phi(t)dt=\lim_{a \to 0}\int_{-\pi}^{-a}+\int_a^\pi \frac1{1-e^{-it}} \phi(t)dt$$
for all $\phi$ smooth.

Those things are defined this way so that we can recover $1_{n \ge 0}$ as the Fourier coefficients of $\frac1{2\pi}(\pi  \sum_k \delta(t-2\pi k) + pv(\frac1{1-e^{-it}}))$

