Differential Equations › Section H · Boundary value problems and Fourier series › Topic H.4
Fourier sine series
The eigenfunctions of a problem with both ends fixed are sines, so it is natural to ask whether an arbitrary function on an interval can be built from them. It can, and orthogonality hands us every coefficient with one integral.
Why build functions from sines
Picture a rod of length \(L\) whose ends are held at 0 °C, starting from some temperature profile \(f(x)\). Separating variables, as "Separation of variables" will show, produces solutions of the form \(\sin\frac{n\pi x}{L}\) times a decaying exponential in time, one for each eigenvalue of the fixed-ends problem. To match the starting profile we need
Joseph Fourier made this bold claim in work on heat that he presented in 1807, and it reshaped analysis. This topic shows how to find the numbers \(b_n\).
The coefficient formula
Assume the expansion holds and that we may integrate the series term by term. Multiply both sides by \(\sin\frac{m\pi x}{L}\) and integrate over \([0, L]\). By orthogonality, every term with \(n \ne m\) gives 0, and the \(n = m\) term gives \(b_m\) times the squared norm \(\frac{L}{2}\). Solving for the coefficient:
The resulting sum is the Fourier sine series of \(f\) on \([0, L]\). The factor \(\frac{2}{L}\) is simply one over the squared norm, the projection formula from "Periodic and orthogonal functions".
Odd functions and the odd extension
Every \(\sin\frac{n\pi x}{L}\) is odd and has period \(2L\), so any sine series is an odd, \(2L\)-periodic function. If \(f\) is already odd on \([-L, L]\), its sine series there uses the same \(b_n\), since the odd integrand gives \(\frac{1}{L}\int_{-L}^{L} = \frac{2}{L}\int_0^L\). For an \(f\) given only on \([0, L]\), the series quietly builds the odd extension:
and then repeats it every \(2L\). The series always equals 0 at \(x = 0\) and \(x = L\), whatever \(f\) does there.
Worked example: a constant
Find the sine series of \(f(x) = 1\) on \([0, L]\). 1. \(b_n = \frac{2}{L}\int_0^L \sin\frac{n\pi x}{L}\,dx\). 2. The antiderivative is \(-\frac{L}{n\pi}\cos\frac{n\pi x}{L}\), and \(\cos n\pi = (-1)^n\). 3. So \(b_n = \frac{2}{n\pi}(1 - (-1)^n)\). 4. For even \(n\) this is 0; for odd \(n\) it is \(\frac{4}{n\pi}\). 5. The series is
for \(0 < x < L\). The odd extension is a square wave jumping between \(-1\) and 1, and at \(x = 0\) and \(x = L\) every term is 0, so the series gives 0 there, not 1.
Worked example: a parabola
Find the sine series of \(f(x) = x(\pi - x)\) on \([0, \pi]\), so \(L = \pi\). 1. \(b_n = \frac{2}{\pi}\int_0^\pi (\pi x - x^2)\sin nx\,dx\). 2. Integration by parts gives \(\int_0^\pi x\sin nx\,dx = \frac{\pi(-1)^{n+1}}{n}\). 3. Twice by parts,
4. Subtracting, the \(\frac{1}{n}\) terms cancel: \(b_n = \frac{4(1 - (-1)^n)}{\pi n^3}\), which is \(\frac{8}{\pi n^3}\) for odd \(n\) and 0 for even \(n\). 5. Check at \(x = \frac{\pi}{2}\): \(f = \frac{\pi^2}{4} \approx 2.467\), and three terms give \(\frac{8}{\pi}(1 - \frac{1}{27} + \frac{1}{125}) \approx 2.473\).
Worked example: a ramp
Find the sine series of \(f(x) = x\) on \([0, L]\). 1. \(b_n = \frac{2}{L}\int_0^L x\sin\frac{n\pi x}{L}\,dx\). 2. By parts, with \(u = x\):
since the leftover integral of cosine vanishes. 3. So \(b_n = \frac{2L(-1)^{n+1}}{n\pi}\), and
for \(0 \le x < L\). 4. Because \(x\) is odd, this is also its series on \(-L < x < L\). At \(x = L\) the series gives 0, not \(L\).
How fast the coefficients shrink
Compare the last two examples. For \(x(\pi - x)\), the coefficients fall like \(\frac{1}{n^3}\), and three terms were already accurate to about 0.005. For \(x\) on \([0, L]\), they fall only like \(\frac{1}{n}\). The difference is the odd extension. Since \(x(\pi - x)\) is 0 at both ends, its odd extension is continuous with no corners at the joins. The ramp is not 0 at \(x = L\), so its odd extension jumps from \(L\) to \(-L\) there, and a jump needs many high-frequency sines to imitate. Smoother extensions mean faster-shrinking coefficients and fewer terms needed, a theme of "Convergence of Fourier series".
Applied example: a cooling rod
A rod of length \(\pi\) has its ends held at 0 °C and starts with temperature \(u(x, 0) = x(\pi - x)\). Assume no heat source, insulated sides and a constant diffusivity \(k\), so \(u_t = ku_{xx}\). Each sine mode \(\sin nx\) decays like \(e^{-kn^2t}\), so the parabola's sine series gives
Higher modes die out fastest, since \(e^{-9kt}\) shrinks far faster than \(e^{-kt}\), so the profile soon looks like a single sine arch. On a rod of length \(L\), mode \(n\) decays like \(e^{-k(n\pi/L)^2t}\). "Solving the heat equation" works this method out in full.
Common mistakes to avoid
First, using \(\frac{1}{L}\) instead of \(\frac{2}{L}\) in front of the integral on \([0, L]\). Second, writing \(\cos n\pi = 1\) instead of \((-1)^n\), which wrongly kills or doubles terms. Third, starting the sum at \(n = 0\); the \(n = 0\) sine is identically 0. Fourth, expecting the sine series to equal \(f\) at \(x = 0\) or \(x = L\) when \(f\) is not 0 there. Fifth, forgetting that a function given only on \([0, L]\) is represented by its odd extension outside that interval, so the series of 1 equals \(-1\) on \((-L, 0)\).
Key takeaways
A Fourier sine series writes \(f\) on \([0, L]\) as \(\sum b_n\sin\frac{n\pi x}{L}\) with \(b_n = \frac{2}{L}\int_0^L f(x)\sin\frac{n\pi x}{L}\,dx\), a formula that comes from orthogonality and the squared norm \(\frac{L}{2}\). The series represents the odd \(2L\)-periodic extension of \(f\), so it is 0 at both ends. Constants give \(\frac{4}{n\pi}\) on odd \(n\), the ramp \(x\) gives \(\frac{2L(-1)^{n+1}}{n\pi}\), and \(x(\pi - x)\) gives \(\frac{8}{\pi n^3}\) on odd \(n\). Smoother odd extensions mean faster decay.
Flashcards
Flashcard
f(x) = Σ bₙ sin(nπx/L), n = 1, 2, 3, … on [0, L]
Test your understanding
Question 1 of 5
In the Fourier sine series of f(x) = 1 on [0, π], what is b₁?
Question 2 of 5
In the Fourier sine series of f(x) = x on [0, π], what is b₂?
Question 3 of 5
f(x) = 0 for 0 ≤ x < π/2 and f(x) = 1 for π/2 ≤ x ≤ π. What is b₁ in its sine series on [0, π]?
Question 4 of 5
The sine series of f(x) = x² on [0, L] represents which function at x = −L/2?
Question 5 of 5
What value does the sine series of f(x) = 1 on [0, L] give at x = 0?
