# $\int_{0}^{2\pi}\exp(ik\theta)d\theta$ where $k \neq 0$ is an integer with path integration.

complex-analysisexponential functionintegration

I am trying to solve $$\int_{0}^{2\pi}\exp(ik\theta)d\theta$$ where $$k$$ is nonzero integer.

I know the answer would be $$0$$, but I want to try it with path integration to understand the path integration better. So, I would like to share my path integration answer and hope I can get some corrections (if there are any) since I am very new to it.

Let a path $$\gamma :[0,2\pi]\rightarrow \mathbb{C}$$ s.t $$\gamma (t)=\exp(\frac{ikt}{2})$$ where $$k$$ is nonzero integer.

Then, since $$\exp$$ function is holomorphic, $$\gamma '(t)=\frac{ik}{2}\exp(\frac{ikt}{2})$$.

Now, consider $$\int_{\gamma }z \, dz$$.

By definition of the path integration,

$$\int_{\gamma }z \, dz=\int_{0}^{2\pi}\exp(\frac{ikt}{2})\cdot \frac{ik}{2}\exp(\frac{ikt}{2})dt \\ =\frac{ik}{2}\int_{0}^{2\pi}\exp(ikt)\, dt \\ = \frac{ik}{2}\cdot \frac{1}{ik}\left [ \exp(ikt) \right ]_{0}^{2\pi} \\ = \frac{1}{2}\left ( \exp(i(2\pi k))-\exp(0) \right ) \\ = \frac{1}{2}(1-1)=0$$
Thus, $$\int_{0}^{2\pi}\exp(ik\theta)d\theta=0$$ for any nonzero integer $$k$$.

Did I use the path integration correctly?

Did I set the path correctly?

Furthermore, if we don't want to use the path integration, is it safe to use the fact $$\exp$$ functions have primitive (like we normally do for the real exponential functions)? Aren't there any restrictions like the Log functions do?

I'm kind of confused, so I want to make sure I have no confusion before I get deeper into the complex integration.

It seems like your intention was to use a contour integral to evaluate a standard integral, but instead you used a standard integral to evaluate a contour integral. Alternately, you might set $$\gamma(\theta)=e^{ik\theta}$$ for $$\theta\in [0,2\pi]$$ and then $$\int_0^{2\pi} e^{i k \theta} d \theta=\int_{\gamma} \frac{dz}{ik}=0,$$ since $$\gamma$$ is a closed path and $$\frac{1}{ik}$$ is entire.