Where am I going wrong while trying to figure out the sum of the finite series?

96 Views Asked by At

I have to find the Discrete Time Fourier Transform of the function $u[n-a] - u[n-b]$. I can do this in two ways: the first way is to take the DTFT for each function and subtract them: $$\frac {e^{-ajw}}{1-e^{-jw}}- \frac {e^{-bjw}}{1-e^{-jw}}$$

The other way is to realize that the infinite sum that defines the DTFT has nonzero terms only within the range $[a,b]$ and use the formula for the sum of the first k terms of the geometric series: $$S=t_1 \frac{1-r^n}{1-r}$$ where $t_1$ is the first term.

And actually compute the DTFT.

Suppose I try to do this for say, the range $[-3,2]$. By the first method, this is just $$\frac {e^{-(-3)jw}}{1-e^{-jw}}- \frac {e^{-2jw}}{1-e^{-jw}}.$$

By the second method, this is the sum of the first 6 terms (i.e. $k=6$) of a geometric series with $t_1=e^{3jw}$ and $r=e^{-jw}$.

Therefore, the sum would be: $$e^{3jw} \frac{1-e^{-6jw}}{1-e^{-jw}}$$ which gives $e^{3jw} - e^{-3jw}$ in the numerator.

Where exactly am I going wrong?

1

There are 1 best solutions below

0
On BEST ANSWER

You are off by one in your upper bound on your range.

I.e.

$$u[2-(-3)]-u[2-2] =1-1 =0 \ne 1$$

So your $k=5$, not $6$.