# Dtft of 1

1. Jul 2, 2013

### zhaniko93

Hello.
I'm stuck on calculating DTFT of 1.
DTFT formula is:

so dtft of 1 is:

1) in case of w=1, sum becomes:

doesn't it diverge?
2) in case of w no 1, how the hell should that sum be calculated?
thanks

2. Jul 2, 2013

### krome

$\displaystyle \sum_{n=-\infty}^{\infty} e^{-jn \omega} = \sum_{n=0}^{\infty} e^{-jn \omega} + \sum_{n=-\infty}^{0} e^{-jn \omega} -1 = \sum_{n=0}^{\infty} e^{-jn \omega} + \sum_{n=0}^{\infty} e^{jn \omega} - 1$.

When the sum converges, each of the last two sums is a geometric series that you should be able to calculate. The intermediate steps may not be neat, but the final answer is very simple.

However, there are values of $\omega$ for which the series is not convergent. You mention $\omega=1$. I'm guessing you actually mean $\omega=0$ or $e^{j \omega} = 1$. But this is not the only one!

Last edited: Jul 2, 2013
3. Jul 2, 2013

### zhaniko93

Thanks krome.
yes I meant w = 0, so for w=0 the sum doesnt converge. but I found such formula for DFTF of 1:

so for w=0 (and other 2πk numbers) I get 2π. did i get something wrong?
also, for w not equal to 2πk, I get 0, so that sum must converge to 0.
can you give any hint how should I calculate that sum? should I use eulers formula?

4. Jul 2, 2013

### krome

You don't actually get $2 \pi$ at $\omega = 0$, you get infinity. You get $2 \pi \delta ( \omega )$ evaluated at $\omega = 0$, which is infinite or not well-defined at least.

Yes, that is correct. You should get 0 when $\omega \neq 2 \pi k$ for any integer $k$.

Do you know how to calculate the geometric series $1+x+x^2+x^3+...$? If you do, then you should be able to calculate the two sums I wrote down. Except you run into a problem if $x= 1$. That's precisely where you get infinity. Otherwise, you should get $0$.

So for me, the logic goes as follows:
(1) $X( \omega ) = 0$ except when $\omega = 2 \pi k$ for some integer $k$. Therefore, $\displaystyle X( \omega ) = \sum_{k= - \infty}^{\infty} c_k \delta ( \omega - 2 \pi k )$ for some set of constants $c_k$.

(2) To determine $c_k$, use the inverse DTFT: $\displaystyle x(n) = \frac{1}{2 \pi} \int_{2 \pi k -\pi}^{2 \pi k + \pi} d \omega \, X( \omega ) e^{jn \omega}$. I've picked a particular region of integration of length $2 \pi$ here. $X( \omega )$ has periodicity $2 \pi$. You are free to pick any full period over which to perform the integral. Plug in $\displaystyle X( \omega ) = \sum_{m=- \infty}^{\infty} c_m \delta ( \omega - 2 \pi m )$ and interchange the sum and the integral (check out Fubini's or Tonelli's theorems for more rigor regarding such interchanges; this is a mixed case between sums and integrals). You should get $\displaystyle x(n) = \frac{c_k}{2 \pi}$, which shows that $c_k = 2 \pi$ for all $k$ since $x(n) = 1$ for all $n$.

5. Jul 2, 2013

### jbunniii

In fact, the series
$$\sum_{n=-\infty}^{\infty} e^{-in\omega}$$
diverges for all $\omega$, because the terms do not converge to zero. Therefore the Fourier transform as defined by the sum does not exist. Your solution involving Dirac delta functions is a solution in the sense of distributions. It takes quite a lot more mathematical horsepower to make it rigorous. The nonrigorous method is to work in reverse: use the integral formula for the inverse Fourier transform to calculate the inverse DTFT of
$$2\pi \sum_{k=-\infty}^{\infty}\delta(\omega - 2\pi k)$$
and show that the result is identically 1. Then in order to conclude that the DTFT of 1 is the indicated sum of Dirac delta functions, you need to employ the fact (if it is indeed a fact) that the DTFT and inverse DTFT are inverses of each other when working with distributions.

6. Jul 3, 2013

### zhaniko93

I dont quite understand, my book said that $\delta(n)$ is 1 for n = 0 and 0 otherwise. now you're saying that it is infinity? is it dirac delta or kroneker delta? how should I distinguish? (on wikipedia, $\delta[n]$ is kroneker and $\delta(w)$ is dirak, so I should distinguish by [] and (), but in my book both are (). My book is Schaum's Outlines of Digital Signal Processing

7. Jul 3, 2013

### jbunniii

It is definitely the Dirac delta in this case. Any [] vs. () notation is nonstandard. It is very common to use $\delta()$ for either the Dirac or the Kronecker delta. If there is any chance of confusion, a careful author should indicate which one is intended.