Differential Equations › Section H · Boundary value problems and Fourier series › Topic H.3

Periodic and orthogonal functions

Before a function can be written as a sum of sines and cosines, three tools are needed: periodicity, the symmetry of even and odd functions, and orthogonality. Together they turn the hardest part of Fourier series, finding the coefficients, into a single integral each.

Why these three ideas

The eigenvalue problems of "Eigenvalues and eigenfunctions" produced families such as \(\sin\frac{n\pi x}{L}\) and \(\cos\frac{n\pi x}{L}\). The next topics write a given function as an infinite sum of these. Three facts make that possible. The family members all repeat with a common period, so their sums do too. Symmetry tells us in advance which terms can appear and halves many integrals. And orthogonality, the function version of perpendicular vectors, lets us pick out each coefficient on its own instead of solving an infinite system of equations.

Periodic functions

A function \(f\) is periodic with period \(T > 0\) if \(f(x + T) = f(x)\) for every \(x\). The smallest such \(T\) is the fundamental period. For \(\omega > 0\), both \(\sin\omega x\) and \(\cos\omega x\) have fundamental period \(\frac{2\pi}{\omega}\). So \(\sin\frac{n\pi x}{L}\) has period \(\frac{2L}{n}\), and because \(2L\) is a whole number of those periods, every member of the family also repeats every \(2L\). If \(f\) and \(g\) both have period \(T\), then so do \(f + g\), \(cf\) and \(fg\). That is why a sum of these sines and cosines has period \(2L\).

Even and odd functions

A function is even if \(f(-x) = f(x)\), so its graph is mirror-symmetric about the \(y\)-axis; \(x^2\), \(|x|\) and \(\cos x\) are even. It is odd if \(f(-x) = -f(x)\), so its graph is unchanged by a half-turn about the origin; \(x\), \(x^3\) and \(\sin x\) are odd. Products follow sign rules: even times even and odd times odd are even, while even times odd is odd. Most functions are neither, but each one splits into an even part \(\frac{f(x) + f(-x)}{2}\) and an odd part \(\frac{f(x) - f(-x)}{2}\). For example, \(e^x\) splits into \(\cosh x\) and \(\sinh x\).

Integrals over symmetric intervals

Symmetry saves work on any interval \([-L, L]\). If \(f\) is even, the two halves contribute equally:

\int_{-L}^{L} f(x)\,dx = 2\int_0^L f(x)\,dx

If \(f\) is odd, the halves cancel exactly and the integral is 0. For example, \(x^3\cos x\) is odd times even, which is odd, so \(\int_{-2}^{2} x^3\cos x\,dx = 0\) with no integration at all. Similarly, \(\int_{-1}^{1} (x^3 + 2)\,dx = 0 + 2 \cdot 2 = 4\), because the odd part integrates to 0 and the constant contributes its full width.

Orthogonal functions

On \([a, b]\), define the inner product of two functions by

\langle f, g \rangle = \int_a^b f(x)g(x)\,dx

which is the integral inner product of "Inner product spaces" in linear algebra. Two nonzero functions are orthogonal on \([a, b]\) if \(\langle f, g \rangle = 0\). A set of nonzero functions is mutually orthogonal, or simply an orthogonal set, if every pair of different members is orthogonal. The squared norm \(\|f\|^2 = \langle f, f \rangle = \int_a^b f^2\,dx\) plays the role of a squared length. Orthogonality always depends on the interval: the same two functions can be orthogonal on one interval and not on another.

Worked example: sines on [0, L]

Show that \(\sin\frac{m\pi x}{L}\) and \(\sin\frac{n\pi x}{L}\) are orthogonal on \([0, L]\) for positive integers \(m \ne n\). 1. Use the identity \(\sin A\sin B = \frac{1}{2}[\cos(A - B) - \cos(A + B)]\). 2. The integrand becomes \(\frac{1}{2}\cos\frac{(m - n)\pi x}{L} - \frac{1}{2}\cos\frac{(m + n)\pi x}{L}\). 3. For a nonzero integer \(k\),

\int_0^L \cos\frac{k\pi x}{L}\,dx = \frac{L}{k\pi}\sin\frac{k\pi x}{L}\Big|_0^L = 0

since \(\sin k\pi = 0\). 4. Both \(m - n\) and \(m + n\) are nonzero, so the whole integral is 0. 5. When \(m = n\), step 2 becomes \(\frac{1}{2} - \frac{1}{2}\cos\frac{2n\pi x}{L}\), which integrates to \(\frac{L}{2}\): the squared norm.

Worked example: when orthogonality fails

Mixing sines with cosines on a half interval can break orthogonality. Compute \(\int_0^\pi \sin x\cos 2x\,dx\). 1. Use \(\sin A\cos B = \frac{1}{2}[\sin(A + B) + \sin(A - B)]\), giving \(\frac{1}{2}(\sin 3x - \sin x)\). 2. Antiderivative: \(\frac{1}{2}(-\frac{1}{3}\cos 3x + \cos x)\). 3. At \(\pi\): \(\frac{1}{2}(\frac{1}{3} - 1) = -\frac{1}{3}\). At 0: \(\frac{1}{2}(-\frac{1}{3} + 1) = \frac{1}{3}\). 4. Result: \(-\frac{2}{3}\), not zero. On \([-\pi, \pi]\), though, \(\sin x\cos 2x\) is odd, so its integral there is 0. The symmetric interval is what makes the full family orthogonal.

The three orthogonal families

The same method proves three facts used throughout the rest of this section. First, \(\{\cos\frac{n\pi x}{L}\}\) for \(n = 0, 1, 2, \dots\) is orthogonal on \([-L, L]\) and on \([0, L]\); the \(n = 0\) member is the constant 1. Second, \(\{\sin\frac{n\pi x}{L}\}\) for \(n = 1, 2, 3, \dots\) is orthogonal on both intervals too. Third, the combined set of 1, the cosines and the sines is orthogonal on \([-L, L]\). The squared norms on \([-L, L]\) are \(\langle 1, 1 \rangle = 2L\) and \(L\) for every \(\cos\) or \(\sin\) with \(n \ge 1\). On \([0, L]\) they are \(L\) for the constant and \(\frac{L}{2}\) for the rest.

Why orthogonality pays off

Suppose \(f = \sum c_n\varphi_n\) for an orthogonal set \(\{\varphi_n\}\). Take the inner product of both sides with one member \(\varphi_m\): every term with \(n \ne m\) vanishes, leaving \(\langle f, \varphi_m \rangle = c_m\langle \varphi_m, \varphi_m \rangle\), so

c_m = \frac{\langle f, \varphi_m \rangle}{\langle \varphi_m, \varphi_m \rangle}

For \(f = 3\sin x - 2\sin 4x\) on \([0, \pi]\), \(\langle f, \sin 4x \rangle = -2 \cdot \frac{\pi}{2} = -\pi\), and dividing by \(\frac{\pi}{2}\) recovers \(-2\). This is the projection formula of "Applications of inner product spaces", and each Fourier coefficient formula ahead is this one with the right norm.

Eigenfunctions are orthogonal

These families are no accident. Each one is the set of eigenfunctions of a problem from the previous topic: sines from fixed ends, cosines from insulated ends, and the combined set from periodic conditions. Sturm-Liouville theory explains why: eigenfunctions belonging to different eigenvalues of such a problem are always orthogonal, using the weighted inner product \(\int_a^b f g\,w\,dx\) when the equation carries a weight \(w(x)\). For \(y'' + \lambda y = 0\) the weight is 1. So every boundary value problem of this type comes with its own orthogonal family, ready for expansions.

Common mistakes to avoid

First, writing the period of \(\sin\omega x\) as \(\omega\) or \(\frac{\omega}{2\pi}\) instead of \(\frac{2\pi}{\omega}\). Second, assuming an odd integrand gives 0 on an interval that is not symmetric, such as \([0, \pi]\). Third, claiming sines and cosines together are orthogonal on \([0, L]\); that holds only on \([-L, L]\). Fourth, using the squared norm \(L\) when the interval is \([0, L]\), where it is \(\frac{L}{2}\), or forgetting that the constant 1 has a different norm from the rest. Fifth, treating the zero function as a member of an orthogonal set.

Key takeaways

A function with \(f(x + T) = f(x)\) is periodic, and \(\sin\omega x\) and \(\cos\omega x\) have period \(\frac{2\pi}{\omega}\). Even functions integrate to twice their half, odd ones to 0, over \([-L, L]\). With \(\langle f, g \rangle = \int_a^b fg\,dx\), functions are orthogonal when the inner product is 0. Cosines and sines are each orthogonal on \([0, L]\) and \([-L, L]\), and together on \([-L, L]\), with squared norms \(L\) or \(\frac{L}{2}\), and \(2L\) or \(L\) for the constant. Orthogonality gives each coefficient as \(\frac{\langle f, \varphi_m \rangle}{\langle \varphi_m, \varphi_m \rangle}\).

Flashcards

Flashcard

Periodic function

f(x + T) = f(x) for every x

T > 0 is a period; the smallest is the fundamental period.

Test your understanding

Question 1 of 5

What is the fundamental period of cos(3πx/2)?

Question 2 of 5

What is the value of the integral of (x³ + 2) from −1 to 1?

Question 3 of 5

Which pair of functions is orthogonal on [0, π]?

Question 4 of 5

For n ≥ 1, what is the integral of cos²(nπx/L) from −L to L?

Question 5 of 5

On [0, π], f = 4 sin x + 7 sin 2x − sin 5x. What is ⟨f, sin 2x⟩?

← Previous topicNext topic →