The Fourier coefficient for $f:[0,2\pi]\to\mathbb{R}$ are given by:
$c_k=\frac{1}{2\pi}\int_0^{2\pi}f(t)\exp(-ikt)dt,k\in \mathbb{Z}$
The DFT coefficient are:
$a_{k,N}=\frac{1}{N}\sum_{j=0}^{N-1}f(j\frac{2\pi}{N})\exp(-ijk\frac{2\pi}{N}), k=0,...,N-1$
prove that for a trigonometric function $f=\sum_{l=-n}^nc_l\exp(ilx)$ you get that $a_{k,N}=c_k$ for $k=-n,...,n$ where $a_{-k,N}=a_{N-k,N}$ white the rest of $a_{k,N}$ are zero.
My approach: I simply put $f$ in $a_{k,N}$:
$a_{k,N}(f)=\frac{1}{N}\sum_{j=0}^{N-1}\sum_{l=-n}^nc_l\exp(il\cdot j\frac{2\pi}{N})\exp(-ijk\frac{2\pi}{N})=\frac{1}{N}\sum_{j=0}^{N-1}\sum_{l=-n}^nc_l\exp(ij\frac{2\pi}{N}(l-k))=\frac{1}{N}\sum_{l=-n}^nc_l\sum_{j=0}^{N-1}\exp(ij\frac{2\pi}{N}(l-k))=\frac{1}{N}\sum_{l=-n}^nc_l\frac{1-exp(i\frac{2\pi}{N}\cdot N(l-k))}{1-\exp(i\frac{2\pi}{N}(l-k))}=0$
because $\exp(2\pi i(l-k))=1$ for all $l-k\in \mathbb{Z}$
Please help
I solved it. Needed to notice that for l=k I divide by zero, so I need to sum it differently.