What is the DFT of a pure cosine wave cos(θ)
If you want to take DFT of a cosine wave $cos(\theta)$ sampled at N equally spaced values between $[0, 2\pi]$, then you need to consider taking N-point DFT of the sequence : $$x[n] = cos[2\pi \frac{n}{N}], n = 0,1,2,...,N-1$$

$cos(\theta)$">

And, for this $x[n]$, you dont even have to apply the DFT formula. It can be done pretty simply by using the Euler's formula $$cos(\theta) = \frac{e^{j\theta} + e^{-j\theta}}{2}$$.
$$x[n] = cos[2\pi \frac{n}{N}] = \frac{e^{j2\pi\frac{n}{N}} + e^{-j2\pi\frac{n}{N}}}{2} = \frac{e^{j2\pi\frac{n}{N}} + e^{j2\pi\frac{n.(N-1)}{N}}}{2}$$
Now, see the above expression as Invere DFT and figure out that $X[k]$ will be non-zero only for 2 values of $k$, i.e. $k=1$ and $k= (N-1)$. But the magnitude of $X[1]$ and $X[N-1]$ won't be $\frac{1}{2}$. 

I think you can do it now yourself to figure out the magnitude of $X[1]$ and $X[N-1]$.

Hint: The Magnitude will get scaled by the length of DFT.