I have in my course notes:
$$ \sum_{k=0}^{N-1}y(k)e^{-j\omega_nk}\approx\sum_{k=-\infty}^{\infty}y(k)e^{-j\omega_nk} $$
Where the $\approx$ for some reason becomes $=$ when $y(k)$ is periodic. Could you please explain why this is the case?
Thank you so much!
By definition, the DTFT of an aperiodic signal $y(n)$ is given by
$$Y(\omega) = \sum_{n=-\infty}^\infty y(k)e^{-j\omega n} \tag{1}$$
And the $N$-DFT is given by
\begin{align} Y(k) &= Y(\omega)\bigg|_{\omega=2\pi\frac{k}{N}} \qquad \text{for }k=0,1,\ldots,N-1\\ &= \sum_{n=-\infty}^\infty y(n)e^{-j2\pi\frac{k}{N} n}\\ &= \sum_{l=-\infty}^\infty \sum_{m=0}^{N-1}y(m+lN)e^{-j2\pi\frac{k}{N} (m+lN)}\\ &=\sum_{m=0}^{N-1} \sum_{l=-\infty}^\infty y(m+lN)e^{-j2\pi\frac{k}{N}m}\\ &=\sum_{n=0}^{N-1} y_p(n)e^{-j2\pi\frac{k}{N}n}\\ \end{align}
where in the third equality we rewrite the infinite summation as an infinite sum of finite summations and let $n = m+lN$. In the fourth equality we interchange the order of summations and realize that $e^{-j2\pi kl} = 1$. In the last equality we just change $m$ by $n$ for convenience.
Now let's take a look at the summation
$$y_p(n) = \sum_{l=-\infty}^\infty y(n+lN) \tag{2}\label{2}$$
The relationship between $y_p(n)$ and $y(n)$ depends on the length $L$ of $y(n)$ and $N$. For example, let's consider the case where $y(n) = 0$ outside $0 \leq n \leq N$. At $n=N$, all the terms in \eqref{2} are zero except for $l=-1$ and $l=0$, then
$$y_p(N) = y(N)+y(0),$$
and here we clearly see that $y_p(N) \neq y(N)$. In this case $L = N+1$, and there is one overlapping between $y(0)$ and $y(N)$. If $L=N+2$, we would have two samples from $y(n)$ overlapping with two samples of $y(n-N)$, and so on.
Take now the case of $L=N$, in other words $y(n)$ is zero outside of $0\leq n\leq N-1$. Then we find that for $n=N$, all terms in \eqref{2} are zero except for $l=0$ and we get:
$$ y_p(N)=y(N) $$
Generally, if $L \leq N$, there is not overlapping and in that case $y_p(n) = y(n)$, and therefore
$$Y(k) = \sum_{n=-\infty}^\infty y(n)e^{-j2\pi\frac{k}{N} n} = \sum_{n=0}^{N-1} y(n)e^{-j2\pi\frac{k}{N}n}\tag{3}$$
When $y(n)$ is periodic, the DTFT actually coincides with the definition of the DFT
$$Y(k) = \sum_{n=0}^{N-1} y(n)e^{-j2\pi\frac{k}{N}n}\qquad\text{for }k=0,1,\ldots,N-1$$
My conclusion: