Integral of a function with complex numbers

complex numbersintegration

I'm trying to understand how the Fourier Transform can give the coefficients of epicycloids for any arbitrary closed shape.

Given a "periodic function on the complex plane $f(t)$" (as I understand it, it's a function that returns a complex number for any $t$), one might find the coefficients of epicycloids (phase, frequency, amplitude) up to a a prescribed order $n$ using

$$\frac{1}{2\pi}\int^{2\pi}_{0} f(t) e^{-nti} dt$$

I'm not sure how I should compute that integral. Let's say I'd do it "manually", by splitting the interval $[0;2\pi]$ into fragments of length $\varepsilon$, and summing the areas of the rectangles (their height would be defined by $f(t)$, for which I know the values on that interval. Would that work ? Can I simply use the imaginary part of the complex number to get the height of the rectangle ?

It's actually the first time I see an integral with complex number, and I'm not sure if approaching it the way I described it makes sense or not.

Best Answer

Fourier coefficients are complex numbers, so you expect to get complex numbers. (It is perhaps helpful to think of these numbers as encoding the magnitude (at all times) and phase (at time $0$) of the corresponding frequency components.

We use Euler's formula to rewrite the exponential in your integral in terms of sine and cosine. $$ \mathrm{e}^{\mathrm{i}\theta} = \cos \theta + \mathrm{i}\,\sin \theta \text{,} $$ so (using even-odd properties in the last line) \begin{align*} \mathrm{e}^{\mathrm{i} (-nt)} &= \cos(-nt) + \mathrm{i}\,\sin(-nt) \\ &= \cos(nt) - \mathrm{i} \,\sin(nt) \text{.} \end{align*} Now let's rewrite your function to track the real and imaginary parts in separate integrals, turning both integrals into more familiar real integrals. \begin{align*} \frac{1}{2\pi} &\int_0^{2\pi} \; f(t) \mathrm{e}^{\mathrm{i} (-nt)} \,\mathrm{d}t \\ &= \frac{1}{2\pi} \int_0^{2\pi} \; f(t) (\cos(nt) - \mathrm{i} \,\sin(nt)) \,\mathrm{d}t \\ &= \frac{1}{2\pi} \int_0^{2\pi} \; f(t) \cos(nt) \,\mathrm{d}t - \frac{\mathrm{i}}{2\pi} \int_0^{2\pi} \; f(t)\sin(nt)) \,\mathrm{d}t \text{.} \end{align*} These are the Fourier sine and cosine transforms. These two integrands are real valued everywhere, so your thought of partitioning and summing areas of rectangles works. For each $n$ you will get a complex coefficient $u_n + \mathrm{i}\, v_n$. To get the amplitude and phase, convert to the polar representation, $r_n \mathrm{e}^{\mathrm{i}\,\theta_n} = u_n + \mathrm{i}\, v_n$.


Let $g = \Re f$ and $h = \Im f$ so that $g$ and $h$ are both real functions and $f(t) = g(t) + \mathrm{i}\, h(t)$. Then \begin{align*} \frac{1}{2\pi} &\int_0^{2\pi} f(t) \mathrm{e}^{\mathrm{i}(-nt)} \,\mathrm{d}t \\ &= \frac{1}{2\pi} \int_0^{2\pi} (g(t) + \mathrm{i}\, h(t)) (\cos(nt) - \mathrm{i} \,\sin(nt)) \,\mathrm{d}t \\ &= \frac{1}{2\pi}\left( \int_0^{2\pi} g(t)\cos(nt) \,\mathrm{d}t - \mathrm{i}\int_0^{2\pi} g(t)\sin(nt) \,\mathrm{d}t + \int_0^{2\pi} h(t)\sin(nt)\,\mathrm{d}t + \mathrm{i}\int_0^{2\pi} h(t)\cos(nt) \,\mathrm{d}t \right) \text{,} \end{align*} and each of these four integrands is a real function so your model of finding area under a curve applies to each.

Related Question