What does it mean to integrate a complex function over a real domain? In complex form, we know that the $n$-th Fourier coefficient of a function $f$ is given by $$\int_{-\pi}^{\pi} f(\theta)e^{-in\theta} d\theta.$$ 
My question: What exactly does it mean to integrate the complex function $f(\theta)e^{-in\theta}$ over a real domain? How can I visualize this—in general and in this particular case?
 A: Let $f:[a,b]\to \mathbb{C}$. Since $f$ is a complex-valued function, then there exist real valued functions $f_1,f_2$ such that $$f(x)=f_1(x)+if_2(x),$$
($f_1,f_2$ are nothing but the real and imaginary part). You can simply define the integral of $f$ by
$$\int_a^b f(x)dx:=\int_a^b f_1(x)dx+i\int_a^b f_2(x)dx,$$ where $\int_a^b f_1(x)dx$ and $\int_a^b f_2(x)dx$ are the usual integrals of real valued functions.
You can even define integration of a function $f:\mathbb{C}\to \mathbb{C}$ over a countour in the complex plane.
A: You can still use Riemann's definition of the integral over the real axis, substituting a complex function wherever you have a real one, and you would have identical results.
That is, form sums of the form $$\sum_i{f(x_i)\Delta_i},$$ where $x_i$ is in the corresponding interval of length $\Delta_i.$ If $f$ is continuous over the interval of integration, we can see that these sums are bounded. Thus, the limiting value of the sum as you make the largest partition shrink towards zero exists and is called the integral of $f$ over the interval, and you can then prove the usual properties, etc.
There's really not much of a difference except that the integral is now complex-valued.
Another way to think about it is to think of integrating a vector-valued function defined over an interval of the real axis -- then you just integrate each of the components.
A: On the positive real line, $\theta= 0$ and on the negative real line, $\theta= \pi$ .  Also $e^{-in\theta}= r cos(\theta)+ irsin(\theta)= r$ on the real line. So that complex integral can be written $\int_{-\pi}^0 f(\pi)x dx+ \int_0^{\pi} f(0)ydy$.
