2

What are the DTFTs of the following two signals?

$$x[n] = e^{j \pi n}\left\{u[n] - u[n-8]\right\}\quad\text{and}\quad h[n] = (-1)^n\left\{u[n] - u[n-4]\right\}$$

I am trying to find $X(\omega)$ and $H(\omega)$ and the scalar $(-1)^{n}$ is throwing me off.

Gilles
  • 3,386
  • 3
  • 21
  • 28
Gary
  • 345
  • 1
  • 4
  • 14

1 Answers1

2

First note that $e^{j\pi n}=(-1)^n$. Furthermore, note that $u[n]-u[n-N]$ is a rectangular impulse of width $N$.

Now, you can calculate $$ \textrm{DTFT}\left\{u[n]-u[n-N])\right\} = \sum_{n=0}^{N-1}e^{-j2\pi nf}=\frac{1-e^{-j2\pi Nf}}{1-e^{-j2\pi f}} $$ which is the rule for the geometric sum. Furthermore, you will find

$$ \textrm{DTFT}\left\{\exp{(j\pi n)}\right\}=\delta\left(f-\frac{1}{2}\right) $$

Finally, the result follows from the convolution theorem, i.e. multiplication in time becomes convolution in frequency:

$$ \textrm{DTFT}\left\{\exp({j\pi n})(u[n]-u[n-N])\right\}=\delta\left(f-\frac{1}{2}\right)\star\frac{1-e^{-j2\pi Nf}}{1-e^{-j2\pi f}}=\frac{1-e^{-j2\pi N(f-\frac{1}{2})}}{1-e^{-j2\pi (f-\frac{1}{2})}} $$

Gilles
  • 3,386
  • 3
  • 21
  • 28
Maximilian Matthé
  • 6,218
  • 2
  • 12
  • 19