I'm asked the problem (restating from the question title),
$$\textrm{Show that }\frac{1}{2\pi} \int_0^{2\pi} e^{ik\theta}d\theta = \begin{cases} 1,\, k=0\\ 0, \, k\neq0 \end{cases}$$
My Attempt:
For the $k=0$ case, it's quite trivial to show that the integral would evaluate to $1$. However, for the case where $k\neq0$, I'm a bit confused. I'll show you why.
Evaluating the integral directly,
$$\begin{align} \frac{1}{2\pi} \int_0^{2\pi} e^{ik\theta}d\theta & = \frac{1}{2\pi}\left(\frac{1}{ik}e^{ik\theta}\bigg|_0^{2\pi}\right)\\ &= \frac{1}{2\pi ik} (e^{2\pi ik}-1) \end{align} $$
The only way I can see that equaling to $0$ is if $k\in\mathbb{Z}$ due to the periodicity of the exponential term, but other than that I'm stumped.
Where did I go wrong? What's a better approach?
You've done all of the hard work already and it's all correct. Here's the way to see that you get $0$: $e^{ix} = \cos x + i\sin x$, so
$$e^{2\pi ik} = \cos 2\pi k + i\sin 2\pi k.$$
If $k$ is an integer, what do you know about $\cos 2\pi k$ and $\sin 2\pi k$?