Differential Equations › Section H · Boundary value problems and Fourier series › Topic H.6
Full Fourier series
Most functions on a symmetric interval are neither even nor odd, so they need sines and cosines together. The full Fourier series combines both families, and the sine and cosine series turn out to be its special cases.
Sines and cosines together
A signal that repeats, such as an alternating voltage or a daily temperature cycle, rarely has the symmetry of a pure sine or cosine series. On \([-L, L]\), the periodic boundary conditions of "Eigenvalues and eigenfunctions" supplied the constant 1 together with both \(\cos\frac{n\pi x}{L}\) and \(\sin\frac{n\pi x}{L}\), and "Periodic and orthogonal functions" showed that this combined set is orthogonal on \([-L, L]\). The full Fourier series uses all of them:
The coefficient formulas
Multiply by one member of the set and integrate over \([-L, L]\); orthogonality removes every other term. The squared norms on this interval are \(L\) for each cosine and sine with \(n \ge 1\), and \(2L\) for the constant, which the \(\frac{a_0}{2}\) convention absorbs. So
The constant term \(\frac{a_0}{2}\) is again the average of \(f\). With \(L = \pi\), these are exactly the Fourier coefficients of "Applications of inner product spaces".
Even and odd shortcuts
Symmetry cuts the work. If \(f\) is even, then \(f(x)\sin\frac{n\pi x}{L}\) is odd, so every \(b_n = 0\), and \(a_n = \frac{2}{L}\int_0^L f\cos\frac{n\pi x}{L}\,dx\): the full series is the cosine series. If \(f\) is odd, every \(a_n = 0\), including \(a_0\), and the full series is the sine series. In general, split \(f\) into its even part \(f_e\) and odd part \(f_o\). The cosine terms come only from \(f_e\) and the sine terms only from \(f_o\). For example, \(f(x) = 1 + x\) on \([-L, L]\) has \(\frac{a_0}{2} = 1\), every other \(a_n = 0\), and the sine coefficients of \(x\), namely \(b_n = \frac{2L(-1)^{n+1}}{n\pi}\).
Worked example: a step
Let \(f(x) = 0\) for \(-\pi \le x < 0\) and \(f(x) = 2\) for \(0 \le x \le \pi\), so \(L = \pi\). 1. \(a_0 = \frac{1}{\pi}\int_0^\pi 2\,dx = 2\), so the constant term is 1, the average. 2. For \(n \ge 1\), \(a_n = \frac{1}{\pi}\int_0^\pi 2\cos nx\,dx = \frac{2\sin n\pi}{n\pi} = 0\). 3.
which is \(\frac{4}{n\pi}\) for odd \(n\) and 0 for even \(n\). 4. So
5. Check by symmetry: \(f - 1\) is odd, equal to \(\pm 1\), so only sines should appear beyond the constant, as found.
Worked example: a half ramp
Let \(f(x) = 0\) for \(-\pi \le x < 0\) and \(f(x) = x\) for \(0 \le x \le \pi\). It is neither even nor odd. 1. \(a_0 = \frac{1}{\pi}\int_0^\pi x\,dx = \frac{\pi}{2}\), so the constant term is \(\frac{\pi}{4}\). 2. By parts,
which is \(-\frac{2}{\pi n^2}\) for odd \(n\) and 0 for even \(n\). 3. By parts,
4. So
5. Check at \(x = 0\), where every sine vanishes: the constant and three cosine terms give about 0.05, close to \(f(0) = 0\).
One function, several series
A function known only on \([0, L]\) has no single Fourier series: it depends on how the function is extended. Take \(f(x) = x\) on \([0, L]\). Its sine series represents the odd extension, which is \(x\) itself on \([-L, L]\). Its cosine series represents the even extension \(|x|\). Setting it to 0 on \([-L, 0)\), as in the half-ramp example, gives a full series with both kinds of term. All three agree with \(x\) on \(0 < x < L\), but they disagree outside it: at \(x = -\frac{L}{2}\) they give \(-\frac{L}{2}\), \(\frac{L}{2}\) and 0. Choose the extension that matches the problem's boundary conditions.
The series is periodic
Every term has period \(2L\), so the full Fourier series is a \(2L\)-periodic function, even though \(f\) was only given on \([-L, L]\). It represents the periodic extension, which copies the graph on \([-L, L]\) to \([L, 3L]\), \([-3L, -L]\) and so on. Where the copies meet, a jump appears unless \(f(-L) = f(L)\). The half ramp, for instance, has \(f(-\pi) = 0\) but \(f(\pi) = \pi\), so its periodic extension jumps at every odd multiple of \(\pi\). What the series does at such jumps is settled in "Convergence of Fourier series".
Applied example: a square wave signal
An ideal square-wave voltage switches instantly between 0 V and 2 V, spending half of each period at each level. With time scaled so that one period is \(2\pi\), it is the step of the first worked example, repeated. Its Fourier series says the signal is a steady 1 V level, the average, plus sine waves at the odd harmonics \(1, 3, 5, \dots\) times the basic frequency, with amplitudes \(\frac{4}{n\pi}\) V. The third harmonic has amplitude \(\frac{4}{3\pi} \approx 0.42\) V, one third of the fundamental's \(\frac{4}{\pi} \approx 1.27\) V, and there are no even harmonics. A spectrum analyser shows peaks at these odd harmonics in these proportions.
Common mistakes to avoid
First, using \(\frac{2}{L}\) with integrals over the whole interval \([-L, L]\); the full series uses \(\frac{1}{L}\). Second, forgetting to halve \(a_0\). Third, integrating a piecewise function over the whole interval with one formula instead of piece by piece. Fourth, assuming even terms vanish in every series; in the half ramp, \(b_2 = -\frac{1}{2}\). Fifth, claiming the Fourier series of a function given on \([0, L]\) without saying which extension is meant.
Key takeaways
On \([-L, L]\), the full Fourier series is the constant \(\frac{a_0}{2}\) plus a sum of terms \(a_n\cos\frac{n\pi x}{L}\) and \(b_n\sin\frac{n\pi x}{L}\), with \(a_n = \frac{1}{L}\int_{-L}^{L} f\cos\frac{n\pi x}{L}\,dx\) and \(b_n = \frac{1}{L}\int_{-L}^{L} f\sin\frac{n\pi x}{L}\,dx\). Even functions give cosine series and odd functions give sine series; in general, the even part makes the cosines and the odd part the sines. The constant term is the average. The series is \(2L\)-periodic and represents the periodic extension of \(f\), which can jump at \(x = \pm L\).
Flashcards
Flashcard
a₀/2 + Σ (aₙ cos(nπx/L) + bₙ sin(nπx/L)) on [−L, L]
Test your understanding
Question 1 of 5
What is the constant term a₀/2 of the Fourier series of f(x) = x² on [−π, π]?
Question 2 of 5
If f is odd on [−L, L], which Fourier coefficients must be zero?
Question 3 of 5
For f(x) = 0 on [−π, 0) and f(x) = x on [0, π], what is b₂?
Question 4 of 5
A square wave switches between 0 V and 2 V with period 2π. What is the amplitude of its sin 3x term?
Question 5 of 5
At x = −L/2, what values do the sine series and the cosine series of f(x) = x on [0, L] give?
