TITLE: How to integrate complex exponential??
QUESTION [7 upvotes]: Consider
$$\int^{\frac{1}{2}}_{-\frac{1}{2} } e^{i2\pi f} \,df  = \int^{\frac{1}{2} }_{-\frac{1}{2} } \cos(2 \pi f)\, df$$
Why do we only look at the real part? What about the imaginary part $i\sin(2\pi f)$?
What is the reasoning behind this?

REPLY [2 votes]: As the sine function is odd, the integral over a symmetric range is null.
In this particular case, as you are integrating over a whole period, you can also trade the cosine for a sine, and
$$\int^{\frac{1}{2} }_{-\frac{1}{2} } \cos(2 \pi f)\,df=\int^{\frac{1}{2} }_{-\frac{1}{2} } \sin(2 \pi f)\,df=0\ !$$