# Easy (?) DTFT calculation

I'm asked to compute the DTFT of the following signal but i'm quite stuck

$$\begin{cases} (-1)^{\frac{n}{2} + 1} & \text{ if } n \text{ is even} \\ 0 & \text{ if } n \text{ is odd} \end{cases}$$

Here where I am, i'm starting by using the definition of the DTFT

\begin{align} X(e^{j\omega}) &= \sum_{n=-\infty}^{+\infty} x[n]e^{-j\omega n}\\ &= \sum_{n \text{ even}} (-1)^{\frac{n}{2} + 1} e^{-j\omega n} \\ &= \sum_{k=-\infty}^{+\infty} (-1)^{\frac{2k}{2} + 1} e^{-j\omega (2k)} \quad (n = 2k, k \in \mathbb{Z}) \\ &= \sum_{k=-\infty}^{+\infty} (-1)^{k + 1} e^{-j\omega (2k)} \\ &= - \sum_{k=-\infty}^{+\infty} (-1)^{k} e^{-j\omega (2k)} \\ &= - \sum_{k=-\infty}^{+\infty} (-e^{-2j\omega})^k \end{align}

and here i'm stuck because I don't see how to compute the last sum... can someone help me ?

Thanks !

• Is your signal causal? i.e, is x[n] = 0 for n < 0? Then the answer is simply an infinite geometric series sum (en.wikipedia.org/wiki/…) 1/(1-exp(-2j\omega)) Jun 11, 2022 at 14:16
• @orchi_d: This won't work, even if all terms were zero for $n<0$, since the magnitude of the summands is not less than unity. Jun 11, 2022 at 15:13
• That is true, it would only work if if there was a term less than 1 multiplying the exponent. This sum does not converge. Jun 11, 2022 at 16:28

HINT:

Try to rewrite the given signal as

$$x[n]=\pm\cos(n\omega_0)\tag{1}$$

with the correct sign and some appropriate $$\omega_0$$. Then you can just use the well-known identity for the DTFT of a cosine.

Note that the sum you're trying to compute doesn't converge in the conventional sense.

• Thanks ! It works well :)
– Bozu
Jun 12, 2022 at 8:06

This periodic function has a Fourier series.

$$\sum\limits_{n=-\infty}^{+\infty} \delta(t-n) = \sum\limits_{k=-\infty}^{+\infty} e^{j 2 \pi k t}$$

where $$\delta(\cdot)$$ is the Dirac delta function and we're playing a little fast-and-loose with the expression of $$\delta(t)$$ outside of an integral.

variations in scaling:

$$T\sum\limits_{n=-\infty}^{+\infty} \delta(t-nT) = \sum\limits_{k=-\infty}^{+\infty} e^{j 2 \pi k t/T}$$

$$\sum\limits_{n=-\infty}^{+\infty} \delta(f_0t-n) = f_0\sum\limits_{k=-\infty}^{+\infty} e^{j 2 \pi k f_0 t}$$