I am attempting to solve the below problem:


I was able to calculate the N point DFT for a cosine which is similar to this (note, this is the DFT for $\cos(2\pi n k/N)$. So for this second image assume k in the image = 1 and m in the image =k).

DFT of cos

I used a similar method to find the $N$ point DFT of $\sin(2\pi n/N)$ with the below results (same notes on the variables as above):

DFT of sin

At this point I have $X_1(k)$ and $x_2(k)$, when I multiply these together I get a very ugly series that I can't solve. I think that I am missing something here, how should I solve this problem?



HINT : $\cos(2\pi n/N) = 0.5e^{j2\pi n/N}+0.5e^{-j2\pi n/N}$. This itself is a IDFT equation, where $X_1[k] = 0.5\delta[k-1] + 0.5\delta[k+1]$.

Similarly for $\sin(2\pi n/N)$, $X_2[k] = (0.5/j)\delta[k-1]-(0.5/j)\delta[k+1]$.

So $Y[k] = (0.25/j)\delta[k-1] + (0.25/j)\delta[k+1]$, and $y[n] = (1/2) \times (0.5/j)e^{j2\pi n/N} -(1/2) \times (0.5/j)e^{-j2\pi n/N} = (1/2) \sin(2\pi n/N)$

To expand mathematically $$ X_1[k] = \sum (0.5e^{j2\pi n/N}+0.5e^{-j2\pi n/N})e^{-j2\pi kn/N}$$ $$= \sum (0.5e^{j2\pi (1-k)n/N }) +(0.5e^{j2\pi (-1-k)n/N })$$ $$= 0.5\frac{(e^{j2\pi (1-k)N/N} - 1)}{(e^{j2\pi (1-k)/N} - 1)} + 0.5\frac{(e^{j2\pi (-1-k)N/N} - 1)}{(e^{j2\pi (-1-k)/N} - 1)}$$ $$= 0.5\frac{e^{j\pi(1-k)}\sin(\pi(1-k))}{(e^{j\pi/N(1-k)}\sin(\pi/N(1-k))} + 0.5\frac{e^{j\pi(-1-k)}\sin(\pi(-1-k))}{(e^{j\pi/N(-1-k)}\sin(\pi/N(-1-k))} $$ You can use similar steps to compute $X_2[k]$. You need NOT proceed to multiply from here. Look at the numerator term of each fraction. $\sin(\pi(m-k))/\sin(\pi/N(m-k))$ is zero when $k \ne m$. For $k=m$, even before you reach the geometric series sum, you can see all terms in summation are 1. So $X[k] = N$ when $k=m$. So $X_1[k] = N\times 0.5\delta[k-1] + N \times 0.5\delta[k+1]$ . Though I am bit confused about the $N$ factor.

  • $\begingroup$ Thank you very much for your response. $\endgroup$
    – Alias
    Apr 2 '20 at 12:03
  • $\begingroup$ Thank you very much for your response. However I have a question. You stated that the sin(pi (m-k) ) term is zero for all values except for m=k. For my problem, m=1. so to me, since sin(pi*(1-k)) = 0 for any integer k, I don't see how this term can equal anything but zero? Can you elaborate :) Thank you :) $\endgroup$
    – Alias
    Apr 2 '20 at 12:11
  • $\begingroup$ For $m=1$, $\sin(\pi (1-m)) = 0$ but denominator is also $0$. You cannot have $0/0$. That is why consider $m=1$ as special case. $\endgroup$
    – jithin
    Apr 2 '20 at 12:16
  • $\begingroup$ Oh, ok. since 0/0 is indeterminate. So then I should apply something like L'Hospital's Rule (take the derivative of top and bottom and evaluate at k=1). When I do this for the x1[k] = [1/2] * [ [-pi/(-pi/N)] + [-pi/(-pi/N)] ] = [1/2] * [N+N] = N when k=1 and 0 otherwise. That seems to match the answere that you got. I will try this with the sin(...) expression as well but I think I might be heading down the right path now. Thanks a lot for your help. ) $\endgroup$
    – Alias
    Apr 2 '20 at 12:57
  • $\begingroup$ Hi, I had a follow on question. So for X1[k]=0.5δ[k−1]+0.5δ[k+1], obviously this equation only has values at k=1 and k=-1. However, whenever we evaluate IDFT it is from k = 0 to N-1. In otherwords, we never have the value k=-1. Respectfully, how do you justify having k=-1? $\endgroup$
    – Alias
    Apr 3 '20 at 1:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.