This is bound to be an embarrassingly simple question, but here it goes...
I was reading the chapter on discrete Fourier transforms (DFT) of this really didactic online book, The Scientist and Engineer's Guide to Digital Signal Processing, by Steven W. Smith and I got stuck thinking about the last sentence in the caption to this illustration:
The parameter, $k$, determines the frequency of the wave. In an $N$ point DFT, $k$ takes on values between $0$ and $\color{red}{\frac{N}{2}}.$
He goes on to say with regards to the $32$-point DFT,
Fig. 8-5 shows some of the $17$ sine and $17$ cosine waves used in an N = $32$ point DFT.
So it seems to indicate $16$ sine waves, or $(N/2)$, plus the constant component, and a parallel split for cosine waves.
However, the DFT is defined as:
$$X(k)\equiv \sum_{n=0}^{N-1} x(n)\; \exp\left(\mathbf-i\frac{2\pi}{N}kn\right), \quad k=0,1,\dots,\color{red}{N-1}$$
which is $\color{red}{N}$ values of $k$, not $\color{red}{\frac{N}{2}}.$
And given Euler's formula:
$$e^{-ix}=\cos x - i \sin x$$
it seems as though there should be an equal number of sine and cosine basis equations: one of each frequency parameter $k$ for a total of $N$ sine and $N$ cosine.
Of course, at some points, the sine or cosine components will be zero (as we move around the complex plane, and depending on $N$), but not necessarily $\frac{N}{2}$. For instance, the $4$-point DFT would indeed either fall on the $x$-axis (real - cosine), or $y$-axis (imaginary - sine), splitting the basis function in half. Yet this seems to be a very sweet and unique example.
What am I missing?