Skip to main content
Physics LibreTexts

6.2: Fourier Series

  • Page ID
    34380
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    String with Fixed Ends

    If we stretch our continuous string between fixed walls so that \(\psi(0)=\psi(\ell)=0\), the modes are given by (5.33) and (5.34), just as for the discrete system. The only difference is that now n runs from 1 to \(\infty\), or at least to such large \(n\) that the wavelength \(2 \pi / k=2 \ell / n\) is so small that the continuum approximation breaks down. This follows from (5.28), which because \(k\) is real here becomes \[-\frac{\pi}{a}<k \leq \frac{\pi}{a} .\]

    As \(a \rightarrow 0\) the allowed range of \(k\) increases to infinity.

    These standing wave modes are animated in program 6-1 on the program disk, assuming the dispersion relation, (6.5). We can now discuss the physical basis of the Fourier series. In (3.77) in chapter 3, we showed that the normal modes for a discrete system are linearly independent and complete. That means that any displacement of the discrete system can be written as a unique linear combination of the normal modes. Physically, this must be so to allow us to solve the initial value problem. Our picture of the continuous string is a limit of the beaded string in which the number of beads, \(N\), goes to infinity and the beads get infinitely close together. For each \(N\), the most general displacement of the system can be expanded as a linear combination of the \(N\) normal modes. If the limit \(N \rightarrow \infty\) is reasonably well behaved, we might expect that the most general displacement of the limiting continuous string could be expanded in terms of the infinite number of normal modes of the continuous system. This expansion is a Fourier series. The displacement of the continuous system is described by a function of the position X along the string. If the function is not too discontinuous, the expansion in normal modes works fine.

    Consider the continuous string, stretched between fixed walls at \(x = 0\) and \(x = \ell\). The transverse displacement of this system at any time is described by a continuous function of \(x\), \(\psi(x)\) with \[\psi(0)=\psi(\ell)=0 .\]

    Thus we expect from the argument above that we can express any function that is not too discontinuous and satisfies (6.7) as a sum of the normal modes given by (5.33) and (5.34), \[\psi(x)=\sum_{n=1}^{m} c_{n} \sin \frac{n \pi x}{\ell} .\]

    The constants, \(c_{n}\), are called the “Fourier coefficients.” They can be found using the following identity: \[\int_{0}^{\ell} d x \sin \frac{n \pi x}{\ell} \sin \frac{n^{\prime} \pi x}{\ell}=\left\{\begin{array}{c}
    \ell / 2 \text { if } n=n^{\prime} \\
    0 \text { if } n \neq n^{\prime}
    \end{array}\right.\]

    This is just the method of normal coordinates adapted to the continuous situation.

    Free Ends

    Equation (6.8) is called the Fourier series for a function satisfying (6.7). Other boundary conditions yield different series. For example, consider a string with the \(x = 0\) end fixed at

    clipboard_eb79f99020141fc62e62a83cf38881cf7.png

    Figure \( 6.1\)S: A continuous string with one end free to oscillate in the transverse direction.

    \(z = 0\). Suppose that the other end, at \(x = \ell\) is attached to a massless ring that is free to slide along a frictionless rod in the \(z\) direction, as shown in Figure \( 6.1\). We say that this system has one “free end” because the end at \(x = \ell\) is free to slide in the transverse direction, even though it is fixed in the \(x\) direction.

    Because the rod is frictionless, the force on the ring due to the rod must have no component in the \(z\) direction. But because the ring is massless, the total force on the ring must vanish. Therefore, the force on the ring due to the string must have no component in the \(z\) direction. That implies that the string is horizontal at \(x = \ell\). But the shape of the string at any given time is given by the graph of the transverse displacement, \(\psi(x,t)\) versus \(x^{2}\). Thus the slope of \(\psi(x,t)\) at \(x = \ell\) must vanish. Therefore, the appropriate boundary conditions for the displacement is \[\psi(0, t)=0,\left.\quad \frac{\partial}{\partial x} \psi(x, t)\right|_{x=\bar{\ell}}=0 .\]

    This implies that the normal modes also satisfy similar boundary conditions: \[A_{n}(0)=0, \quad A_{n}^{\prime}(\ell)=0 .\]

    The first condition implies that the solution must have the form \[A_{n}(x) \propto \sin k_{n} x\]

    for some \(k_{n}\). The second condition determines the possible values of \(k_{n}\). It implies that \(\sin k_{n}x\) must have a maximum or minimum at \(x = \ell\) which, in turn, implies that \[k_{n} \ell=\frac{\pi}{2}+n \pi\]

    where \(n\) is a nonnegative integer (nonnegative because we can choose all the \(k_{n} > 0\) in (6.13) — negative values just change the sign of \(A_{n}(x)\) and do not lead to new solutions). The solutions have the form \[\sin \left(\frac{(2 n+1) \pi x}{2 \ell}\right) \quad \text { for } n=0 \text { to } \infty .\]

    These normal modes are animated in program 6-2. With these normal modes, we can describe an arbitrary function, \(\psi(x)\), satisfying the boundary conditions for this system, (6.11). \[\psi(0)=0, \quad \psi^{\prime}(\ell)=0 .\]

    Thus for such a function, we can write \[\psi(x)=\sum_{n=1}^{\infty} c_{n} \sin \left(\frac{(2 n+1) \pi x}{2 \ell}\right)\]

    where \[c_{n}=\frac{2}{\ell} \int_{0}^{\ell} d x \sin \left(\frac{(2 n+1) \pi x}{2 \ell}\right) \psi(x) .\]

    Examples of Fourier Series

    Let us find the Fourier coefficients for the following function, defined in the interval [0,1]:

    \[\psi(x)=\left\{\begin{array}{cc}
    x & \text { for } x \leq w, \\
    \frac{w(1-x)}{1-w} & \text { for } x>w .
    \end{array}\right.\]

    For definiteness, we will take \(w = 0.75\), so the function \(\psi(x)\) has the form shown in Figure \( 6.2\).

    We compute the Fourier coefficients using (6.10). Because \(\ell = 1\), this has the following form (see problem (6.2)):

    \[\begin{align*}
    c_{n} &=\int_{0}^{1} d x \sin n \pi x \psi(x) \\
    &=\int_{0}^{w} d x x \sin n \pi x+\frac{w}{1-w} \int_{w}^{1} d x(1-x) \sin n \pi x \\
    &=\frac{\sin n \pi w}{(1-w) n^{2} \pi^{2}} .
    \end{align*}\]

    clipboard_ed6ce394dc0714e3b288e7224e794c6ea.png

    Figure \( 6.2\): The function \(\psi(x)\) for \(w = 0.75\).

    clipboard_eb477af756e4713984436eb17e36c4097.png

    Figure \( 6.3\): The first term in the Fourier series for \(\psi(x)\). The dotted line is \(\psi(x)\).

    We can reconstruct the function, \(\psi(x)\), as a sum over the normal modes of the string. Let us look at the first few terms in the series to get a feeling for how this works. The first term in the sum, for \(w = 0.75\), is shown in Figure \( 6.3\). This is a lousy approximation, necessarily, because the function is not symmetrical about \(x = 1 / 2\), while the first term in the sum is symmetrical. The first two terms are shown in Figure \( 6.4\). This looks much better.

    clipboard_ec57e04db948dc4c6cc0009da218fc5db.png

    Figure \( 6.4\): The sum of the first two terms in the Fourier series for \(\psi(x)\). The dotted line is \(\psi(x)\).

    The first six terms are shown in Figure \( 6.5\). This is now a pretty good approximation except where the function has a kink.

    clipboard_eaa7e2b61dae815cefe1b70096fc0a3a2.png

    Figure \( 6.5\): The sum of the first six terms in the Fourier series for \(\psi(x)\). The dotted line is \(\psi(x)\).

    What is going on here is that if we include terms in the Fourier series only up to \(n = N\), the truncated Fourier series \[\psi(x)=\sum_{n=1}^{N} c_{n} \sin n \pi x\]

    does not include any modes with very small wavelengths. The smallest wavelength that appears (for the highest angular wave number) is \(2 / N\) (no dimensions here because we took \(a = 1\)). Thus while the Fourier series can describe any features of the shape of the function that are larger than \(2 / N\), there is no way that it can pick up features that are much smaller. In this example, because the function has an infinitely sharp kink, the Fourier series never gets very good near \(x = w\). However, eventually the discrepancy is squeezed into such a small region around the kink that the result will look OK to the naked eye.

    clipboard_e0e7470d0e0722dac2e7428a8176e12b7.png

    Figure \( 6.6\): The first two terms in the Fourier series for \(\psi(x)\) and their sum.

    You can see how this works in more detail by studying Figure \( 6.6\). The curve of long dashes is the first term in the Fourier series. Evidently, it is less than the function, \(\psi(x)\) (the dotted triangle), for large \(x\) and greater than \(\psi(x)\) for small \(x\). The sign and magnitude of the second term in the Fourier series, the curve of short dashes in Figure \( 6.6\), is chosen to make up for this discrepancy, so that the sum (the solid curve) is much closer to the actual function. The same process is repeated over and over again as you go to higher order in the truncated Fourier series.

    You can play with the truncated Fourier series for the function \(\psi(x)\) in program 6-3. This program allows you to vary the parameter \(w\), and also the number of terms in the Fourier series. You should look at what happens near \(w = 1\). You might think that this would cause problems for the Fourier series because the (\(1 − w\)) in the denominator of (6.20) goes to zero. However, the limit is actually well behaved because \(sin n \pi \omega\) also goes to zero as \(w \rightarrow 0\). Nevertheless, the Fourier series has to work hard for \(w = 1\) to reproduce a function that does not go to zero for \(x = 1\) as a sum of sine functions, each of which do vanish at \(x = 1\). This difficulty is reflected in the wiggles near \(x = 1\) for any reasonable number of terms in the Fourier series.

    Plucking a String

    Let us now use this mathematics to solve a physics problem. We will solve the initial value problem for the string with fixed end for a particular initial shape. The initial value problem here is almost exactly like that discussed in chapter 3, (3.98)-(3.100), for a system with a finite number of degrees of freedom. The only difference is that now, because the number of degrees of freedom is infinite, the sum over modes runs to infinity. You shouldn’t worry about the fact that the number of modes is infinite. What that “infinity” really means is “larger than any number we are going to care about.” In practice, as we saw in the examples above, the higher modes eventually don’t make much difference. They are associated with smaller and smaller features of the shape. When we say that the system is continuous and that it has an infinite number of degrees of freedom, we are actually assuming that the smallest features that we care about in the waves are still much larger than the distance between pieces of the system, so that we can truncate our Fourier series far below the limit and still have a good approximate description of the motion.

    Suppose we pluck the string. Specifically, suppose that the string has linear mass density \(\rho_{L}\), tension \(T\), and fixed ends at \(x = 0\) and \(\ell\). Suppose further that at time \(t = 0\) the string is at rest, but pulled out of its equilibrium position into the shape, \(\psi(x)\), given by (6.19). If the string is then released at \(t = 0\), we can find the subsequent motion by summing over all the normal modes with fixed coefficients multiplied by \(\cos \omega_{n} t\) and/or \(\sin \omega_{n} t\), where \(\omega_{n}\) is the frequency of the mode \(\sin \frac{n \pi x}{\ell}\) with \(k=\frac{n \pi}{\ell}\) (the frequency is given by (6.5)) \[\omega_{n}=\sqrt{\frac{T}{\rho_{L}}} k_{n}=\sqrt{\frac{T}{\rho_{L}}} \frac{n \pi}{\ell} .\]

    In this case, only the \(\cos \omega_{n} t\) terms appear, because the velocity is zero at \(t = 0\). Thus we can write \[\psi(x, t)=\sum_{n=1}^{\infty} c_{n} \sin \frac{n \pi x}{\ell} \cos \omega_{n} t .\]

    This satisfies the boundary conditions at \(t = 0\), by virtue of the Fourier series, (6.8). The disadvantage of (6.23) is that we are left with an infinite sum. For the simple dispersion relation, (6.5), there are other ways to solve this problem that we will discuss later when we learn about traveling waves. However, the advantage of the solution (6.23) is that it does not depend on the dispersion relation.

    We can solve the problem approximately using (6.23) by adding up only the first few terms of the series. The computer can do this quickly. In program 6-4, the first twenty terms of the series are shown for \(w = 1 / 2\) (and the dispersion relation still given by (6.5)). The result is amazingly simple. Check it out! Program 6-5 is the same idea, but allows you to vary \(w\) and the number of terms in the Fourier series. Try out \(w = 0.75\) and compare with \(Figures \text { } 6.3 \text {-} 6.5\).

    _____________________
    2This is why transverse oscillations are easier to visualize than longitudinal oscillations — compare with (7.5).


    This page titled 6.2: Fourier Series is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Howard Georgi via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.