Recipe
Compute the complex Fourier coefficients c_n
Use when: you have a periodic function and need c_n for its complex-exponential series f(t)=\sum_{n=-\infty}^{\infty} c_ne^{in\omega_0t}
Goal: explicit values or a formula for every c_n, with n ranging over all integers
Taught in The complex form of the Fourier series
Quick recipe
-
1
Write c_n=\dfrac1T\displaystyle\int f(t)e^{-in\omega_0t}\,dt over one full period, keeping n as a symbol rather than substituting a number yet.
Example
For f(t)=t on (-\pi,\pi), period 2\pi: c_n=\dfrac1{2\pi}\displaystyle\int_{-\pi}^{\pi}t\,e^{-int}\,dt.
Why: this single formula is what orthogonality of the complex exponentials isolates, in exact analogy to how a_n and b_n were isolated.
-
2
Compute c_0=\dfrac1T\displaystyle\int f(t)\,dt directly, as a plain average, before touching the general formula.
Example
c_0=\dfrac1{2\pi}\displaystyle\int_{-\pi}^{\pi}t\,dt=0, since t is odd on a symmetric interval.
- n=0 — c_0 is just f's average value over one period; e^{-i\cdot0\cdot t}=1, so no exponential is even involved.
- n\ne0 — continue to Step 3, where integration by parts is needed.
Why: the general formula ends up with n in a denominator, which is undefined at n=0 and always needs its own line.
-
3
Use u=f(t), dv=e^{-in\omega_0t}\,dt; the leftover integral of a pure nonzero-frequency exponential over a full period vanishes, leaving only the boundary term.
Example
With u=t, dv=e^{-int}\,dt: \displaystyle\int_{-\pi}^{\pi}t\,e^{-int}\,dt=\left[\dfrac{t\,e^{-int}}{-in}\right]_{-\pi}^{\pi}+\dfrac1{in}\displaystyle\int_{-\pi}^{\pi}e^{-int}\,dt, and the second integral is 0.
Why: a nonzero-frequency exponential integrates to 0 over exactly one period, so only the boundary term from integration by parts can survive.
-
4
At the endpoints of a period centered at 0, both e^{-in\pi} and e^{in\pi} equal (-1)^n for integer n; use this to collapse the boundary term.
Example
The boundary term becomes \dfrac{-2\pi(-1)^n}{in}, so c_n=\dfrac1{2\pi}\cdot\dfrac{-2\pi(-1)^n}{in}=\dfrac{i(-1)^n}{n} for n\ne0.
Why: without this identity the boundary term stays a messy complex expression instead of the clean form most c_n answers take.
-
5
If a_n and b_n are already known, c_n=\dfrac{a_n-ib_n}{2} must match Step 4's result exactly.
Example
For f(t)=t: a_n=0, b_n=-\dfrac{2(-1)^n}{n}, so c_n=\dfrac{0-i\big({-}\tfrac{2(-1)^n}{n}\big)}{2}=\dfrac{i(-1)^n}{n}, matching Step 4 exactly.
- general real f, a_n and b_n both known — compute c_n=(a_n-ib_n)/2 as an independent check.
- f is even, so b_n=0 — c_n=a_n/2 is forced to be purely real, with no imaginary part to compute at all.
Why: two independent routes to the same integral landing on the same number catches an algebra slip before it's trusted.
Common mistakes
- Plugging n=0 into the general by-parts formula, dividing by zero.
- Forgetting the sum runs over all integers, so c_{-3} and c_3 are both separate terms, not two labels for the same one.
- Swapping c_n=(a_n-ib_n)/2 for c_n=(a_n+ib_n)/2: that second expression is c_{-n}, not c_n.
- Treating e^{-in\pi} and e^{in\pi} as though they might differ for integer n, when both always equal (-1)^n.