Modes on a String¶
McEwen, © 2025 | All Rights Reserved | Distribution Prohibited¶
version 1.0, 2025¶
Please alert the author to any errors. This is an early version.
These notes and exercises cover the basics of waves on a string. They are not a substitute for your textbook, but rather provide a summary of key concepts along with exercises to prepare you for more challenging homework problems.
We will consider the wave pattern formed by a vibrating string that is fixed at both ends. We will find that there is a pattern to the allowed vibration frequencies. Each allowed frequency is called a mode or harmonic. These harmonics are related to one another as $f_n = n f_1$, where $n = 1, 2, 3, \ldots$ is an integer labeling the $n$-th harmonic, and $f_1$ is called the fundamental frequency (also called the first harmonic, $n=1$).
One should not take this lesson as a standalone phenomenon applied to a single case. This is an example of a phenomenon that applies to many cases and leads to some very important mathematics.
Standing Waves¶
A standing wave is a wave that does not appear to have a direction of propagation; rather it is a wave that stays in place. For a standing wave on a string or rope, the wave does not propagate parallel to the string but does vibrate in place, perpendicular to the string.
Standing waves on a string are a consequence of the interference between two waves moving in opposite directions. Let's consider just such interference. Consider two waves moving in opposite directions as \begin{equation} y(x,t) = y_1(x,t) + y_2(x,t) = A\sin(kx - \omega t) + A\sin(kx + \omega t). \end{equation}
Problem 1
Which wave is moving to the right and which is moving to the left? Show this mathematically.
Hint
Track a constant $y$ value on the wave. Often one chooses a crest or a trough, but you may choose any point you like. The constant $y$ value corresponds to a constant phase. When tracking this point, does the $x$ in the phase increase (moving right) or decrease (moving left)?
Solution
For a wave of the form $y(x,t) = A\sin(kx - \omega t + \phi)$, the phase is constant along features of the wave. Setting the phase equal to a constant $C$ gives \begin{equation} kx - \omega t + \phi = C. \end{equation}
Solving for $x$ as a function of time gives \begin{equation} x = \frac{C - \phi + \omega t}{k} = \frac{C - \phi}{k} + \frac{\omega}{k}t. \end{equation}
Since $\omega > 0$ and $k > 0$, we have $dx/dt = \omega/k > 0$, so $x$ increases with time. The wave moves to the right (positive $x$ direction).
First wave: $y_1(x,t) = A\sin(kx - \omega t)$
This has the form above with $\phi = 0$, so it moves to the right.
Second wave: $y_2(x,t) = A\sin(kx + \omega t)$
We can rewrite this as \begin{equation} y_2(x,t) = A\sin(-(- kx - \omega t)) = -A\sin(-kx - \omega t). \end{equation}
For constant phase, we have \begin{equation} -kx - \omega t = C. \end{equation}
Solving for $x$ gives \begin{equation} x = \frac{-C - \omega t}{k} = -\frac{C}{k} - \frac{\omega}{k}t. \end{equation}
Now $dx/dt = -\omega/k < 0$, so $x$ decreases with time. The wave moves to the left (negative $x$ direction).
Answer: $y_1(x,t) = A\sin(kx - \omega t)$ moves to the right, and $y_2(x,t) = A\sin(kx + \omega t)$ moves to the left.
The animation below shows the standing wave phenomenon. One wave moves to the right, while the second wave moves to the left. The composite wave moves up and down.
import numpy as np
%matplotlib inline
import matplotlib.pyplot as plt
from matplotlib import animation
from IPython.display import HTML
%load_ext jsxgraph-magic
from numpy import pi, sin, cos
from traveling_wave_funcs import plot_traveling_wave, traveling_wave, animate_wave, plot_super
from superposition_animations import animate_super, animate_interference
from beats import beat_plot
from ModePlots import plot_string_modes
# standing wave example
phi1=0
phi2=0
lam1=1
lam2=1
k1=2*np.pi/lam1
k2=2*np.pi/lam2
w1=5
w2=-5
a1=10
a2=10
anim=animate_super(a1,a2,k1,k2,w1,w2,phi1,phi2)
HTML(anim.to_html5_video())
The jsxgraph-magic extension is already loaded. To reload it, use: %reload_ext jsxgraph-magic
Let's continue the mathematics. Using the trig identity $\sin \alpha + \sin \beta = 2 \sin\left(\frac{\alpha+\beta}{2}\right)\cos\left(\frac{\alpha-\beta}{2}\right)$, we have \begin{equation} \begin{split} y(x,t) & = A\sin(kx - \omega t) + A\sin(kx + \omega t) \\ & = 2A\sin\left(\frac{(kx - \omega t) + (kx + \omega t)}{2}\right)\cos\left(\frac{(kx - \omega t) - (kx + \omega t)}{2}\right) \\ & = 2A\sin\left(\frac{2kx}{2}\right)\cos\left(\frac{-2\omega t}{2}\right) \\ & = 2A\sin(kx)\cos(-\omega t) \\ & = 2A\sin(kx)\cos(\omega t). \end{split} \end{equation}
This shows that the resultant wave has split the spatial and temporal oscillation into the product of two oscillating components. We see that there are particular spatial locations where the wave always has zero amplitude. These locations are called nodes. Likewise there are particular locations where the wave always has maximum displacement. These are called antinodes. The location of the nodes and antinodes is fixed in space.
Problem 2 Determine the location of the nodes and antinodes.
Hint
Nodes occur where the amplitude is always zero, regardless of time. Antinodes occur where the amplitude is maximum. Look at the spatial part of the standing wave: $\sin(kx)$. Where does sine equal zero? Where does it equal $\pm 1$?Solution
The standing wave has the form \begin{equation} y(x,t) = 2A\sin(kx)\cos(\omega t). \end{equation}
Nodes:
For the wave to have zero amplitude at all times, we need the spatial factor to be zero: \begin{equation} \sin(kx) = 0. \end{equation}
Sine equals zero when its argument is an integer multiple of $\pi$, so \begin{equation} kx = 0, \pi, 2\pi, 3\pi, \ldots = n\pi, \quad n = 0, 1, 2, 3, \ldots \end{equation}
Solving for $x$ and using $k = 2\pi/\lambda$, we get \begin{equation} x_{\text{node}} = \frac{n\pi}{k} = \frac{n\pi \cdot \lambda}{2\pi} = n\frac{\lambda}{2}, \quad n = 0, 1, 2, 3, \ldots \end{equation}
This can be written as \begin{equation} x_{\text{node}} = 0, \frac{\lambda}{2}, \lambda, \frac{3\lambda}{2}, 2\lambda, \ldots \end{equation}
Nodes occur at integer multiples of $\lambda/2$, spaced $\lambda/2$ apart.
Antinodes:
For maximum amplitude, we need $|\sin(kx)| = 1$, which occurs when \begin{equation} \sin(kx) = \pm 1. \end{equation}
This happens when \begin{equation} kx = \frac{\pi}{2}, \frac{3\pi}{2}, \frac{5\pi}{2}, \ldots = (2n+1)\frac{\pi}{2}, \quad n = 0, 1, 2, 3, \ldots \end{equation}
Solving for $x$ and using $k = 2\pi/\lambda$, we get \begin{equation} x_{\text{antinode}} = \frac{(2n+1)\pi}{2k} = \frac{(2n+1)\pi}{2} \cdot \frac{\lambda}{2\pi} = (2n+1)\frac{\lambda}{4}, \quad n = 0, 1, 2, 3, \ldots \end{equation}
Alternatively, this can be written as \begin{equation} x_{\text{antinode}} = \frac{\lambda}{4}, \frac{3\lambda}{4}, \frac{5\lambda}{4}, \frac{7\lambda}{4}, \ldots \end{equation}
Antinodes occur at odd multiples of $\lambda/4$, spaced $\lambda/2$ apart.
Summary: Nodes and antinodes alternate, each separated by $\lambda/4$.
from IPython.display import Image, display
display(Image(filename='mode_experiment.png', width=600))
print("Image taken from OpenStax University Physics")
Image taken from OpenStax University Physics
Physics Lab Experiment¶
All across the nation, physics departments in high schools, colleges, and universities have some version of this experiment. One end of a string is connected to an oscillator, the string is stretched horizontally, and then hangs over a frictionless pulley (well, approximately frictionless) and is connected to a hanging mass. The figure above demonstrates this experiment. The figure is taken from the OpenStax University Physics textbook.
The oscillator vibrates the string at a user-controlled frequency $f$. The string has a total length that we call $L_{\text{total}}$. The distance from the oscillator to the pulley is $L$. The string has a mass $m$. The hanging mass accounts for the tension in the string and has a mass $M$. (Note the bad form of the openstax image; mixing $m$ for the haning mass and mass of the string. This is why I switched the notation.)
As the oscillator vibrates, initially a wave is sent down the string, which is then reflected back off the boundary formed by contact with the pulley. The pulley can be approximately taken as rigid, forming an approximately hard boundary. Very quickly two waves moving in opposite directions form a standing wave on the string.
Boundary conditions are important. The standing wave must have nodes at the two boundaries. Therefore the largest wavelength that could possibly form on the string is $\lambda = 2L$, or $L = \frac{1}{2}\lambda$. The speed of the wave is determined by the tension and linear mass density as $v = \sqrt{T_F/\mu} = \sqrt{Mg/\mu}$. We can then state the lowest frequency, $f_1$, that will produce a standing wave as \begin{equation} \begin{split} \lambda &= 2L \\ \frac{v}{f_1} &= 2L\\ f_1 &= \frac{v}{2L} . \end{split} \end{equation}
The next largest wavelength that can fit is $\lambda = L$. We can repeat the analysis to find the next frequency $f_2$ as \begin{equation} \begin{split} \lambda &= L \\ \frac{v}{f_2} &= L\\ f_2 &= \frac{v}{L} = \frac{2v}{2L} = 2f_1. \end{split} \end{equation}
The next wavelength that can fit is $\lambda = \frac{2L}{3}$, giving the third frequency $f_3$ as \begin{equation} \begin{split} \lambda &= \frac{2L}{3} \\ \frac{v}{f_3} &= \frac{2L}{3}\\ f_3 &= \frac{3v}{2L} = 3f_1. \end{split} \end{equation}
We see a pattern emerging. The allowed wavelengths are $\lambda_n = \frac{2L}{n}$ where $n = 1, 2, 3, \ldots$, and the corresponding frequencies are \begin{equation} f_n = \frac{v}{\lambda_n} = \frac{nv}{2L} = nf_1, \quad n = 1, 2, 3, \ldots \end{equation}
The allowed frequencies are integer multiples of the fundamental frequency $f_1$. We also index the angular frequency and wave number. The angular frequency for mode $n$ is $\omega_n = 2\pi f_n$. The wave number for mode $n$ is $k_n = \frac{2\pi}{\lambda_n}$, where $\lambda_1 = 2L$, $\lambda_2 = L$, $\lambda_3 = \frac{2L}{3}$, and in general $\lambda_n = \frac{2L}{n}$.
The figure below illustrates the first four modes on a string. Note that for mode $n$, the number of nodes is $n+1$ and the number of antinodes is $n$.
plot_string_modes()
Here is an interactive for normal modes on a string. Please ignore the jsxgrpah code.
%%jsxgraph -w 700 -h 600 string_modes
var board = JXG.JSXGraph.initBoard('string_modes', {
boundingbox: [-0.5, 1.5, 10.5, -1.5],
axis: true,
showNavigation: false,
showCopyright: false
});
var L = 10;
var A = 1.0;
var t = 0;
var n = 1;
// X-axis label
board.create('text', [L/2, -1.3, 'Position x'], {fontSize: 16, fixed: true});
board.create('text', [-0.3, 0, 'y'], {fontSize: 16, fixed: true});
// Standing wave
var standing = board.create('functiongraph', [
function(x) {
return A * Math.sin(n * Math.PI * x / L) * Math.cos(2 * Math.PI * t);
},
0, L
], {strokeColor: 'blue', strokeWidth: 3});
// Nodes (red dots)
var nodes = [];
function updateNodes() {
for (var i = 0; i < nodes.length; i++) {
board.removeObject(nodes[i]);
}
nodes = [];
for (var i = 0; i <= n; i++) {
var xNode = i * L / n;
var node = board.create('point', [xNode, 0], {
name: '',
size: 4,
fillColor: 'red',
strokeColor: 'red',
fixed: true
});
nodes.push(node);
}
}
// Antinodes (green dots)
var antinodes = [];
function updateAntinodes() {
for (var i = 0; i < antinodes.length; i++) {
board.removeObject(antinodes[i]);
}
antinodes = [];
for (var i = 0; i < n; i++) {
var xAnti = (2*i + 1) * L / (2*n);
(function(i_val) {
var antinode = board.create('point', [
xAnti,
function() {
var x = (2*i_val + 1) * L / (2*n);
return A * Math.sin(n * Math.PI * x / L) * Math.cos(2 * Math.PI * t);
}
], {
name: '',
size: 4,
fillColor: 'green',
strokeColor: 'green'
});
antinodes.push(antinode);
})(i);
}
}
// Mode display text
var modeText = board.create('text', [3, 1.2, function() {
return 'Mode n = ' + n;
}], {fontSize: 18, fixed: true});
// Info text
var infoText = board.create('text', [5, 1.0, function() {
var lambda = (2 * L / n).toFixed(2);
return 'f = ' + n + 'f₁, λ = ' + lambda;
}], {fontSize: 16, fixed: true});
// Down button (decrease n)
var downButton = board.create('text', [1, 1.2, '◄'], {
fontSize: 24,
fixed: true,
highlight: true
});
downButton.on('down', function() {
if (n > 1) {
n = n - 1;
updateNodes();
updateAntinodes();
board.update();
}
});
// Up button (increase n)
var upButton = board.create('text', [2, 1.2, '►'], {
fontSize: 24,
fixed: true,
highlight: true
});
upButton.on('down', function() {
if (n < 6) {
n = n + 1;
updateNodes();
updateAntinodes();
board.update();
}
});
// Initialize
updateNodes();
updateAntinodes();
// Animation loop
setInterval(function() {
t += 0.02;
board.update();
}, 50);
Recap Questions¶
Question 1
How is the $n$-th harmonic related to the fundamental frequency?
Solution
The $n$-th harmonic is given by $f_n = nf_1$, where $f_1$ is the fundamental frequency. Each harmonic is an integer multiple of the fundamental.
Question 2
If the hanging mass is increased by a factor of 2, how does the wave velocity change?
Solution
The wave velocity is $v = \sqrt{Mg/\mu}$. If $M$ increases by a factor of 2, then $v$ increases by a factor of $\sqrt{2} \approx 1.41$.
Question 3
If the total length of the string is increased by a factor of 2, how does the wave velocity change? (Assume you have not changed the type of rope)
Solution
The wave velocity $v = \sqrt{Mg/\mu}$ does not depend on the length of the string. The velocity remains unchanged.
Question 4
How many nodes are in the 4th mode?
Solution
The $n$-th mode has $n+1$ nodes. The 4th mode has $4+1 = 5$ nodes.
Question 5
How many antinodes are in the 5th mode?
Solution
The $n$-th mode has $n$ antinodes. The 5th mode has 5 antinodes.
Question 6
How are standing waves generated?
Solution
Standing waves are generated by the interference of two waves with the same frequency and amplitude traveling in opposite directions. In the string experiment, a wave travels down the string and reflects off the boundary at the pulley, creating the two counter-propagating waves.
Question 7
What is a standing wave?
Solution
A standing wave is a wave pattern that does not appear to propagate. Instead, it oscillates in place with fixed nodes (points of zero displacement) and antinodes (points of maximum displacement). The wave has separated spatial and temporal oscillations: $y(x,t) = A(x)\cos(\omega t)$.
Challenge Problem
Consider the standing wave experiment with the string of length $L$, linear mass density $\mu$, and tension $T_F = Mg$.
(a) Derive an expression for the total energy (kinetic + potential) stored in the string for the $n$-th mode with amplitude $A$.
(b) Does the total energy depend on the harmonic number $n$? Explain physically why or why not.
You should follow a procedure similar to what we did for a wave on a string.
Hint
The standing wave for mode $n$ is $y(x,t) = A\sin\left(\frac{n\pi x}{L}\right)\cos(\omega_n t)$ where $\omega_n = n\omega_1$.
- Kinetic energy: $KE = \frac{1}{2}\int_0^L \mu \left(\frac{\partial y}{\partial t}\right)^2 dx$
- Potential energy (elastic): $PE = \frac{1}{2}\int_0^L T_F \left(\frac{\partial y}{\partial x}\right)^2 dx$
The total energy oscillates between kinetic and potential. Find the maximum of each, or use the time-averaged energy.
Solution
The standing wave for mode $n$ is \begin{equation} y(x,t) = A\sin\left(\frac{n\pi x}{L}\right)\cos(\omega_n t). \end{equation}
Kinetic Energy:
The velocity is \begin{equation} \frac{\partial y}{\partial t} = -A\omega_n\sin\left(\frac{n\pi x}{L}\right)\sin(\omega_n t). \end{equation}
The kinetic energy is \begin{equation} KE = \frac{1}{2}\int_0^L \mu \left(\frac{\partial y}{\partial t}\right)^2 dx = \frac{1}{2}\mu A^2\omega_n^2\sin^2(\omega_n t)\int_0^L \sin^2\left(\frac{n\pi x}{L}\right) dx. \end{equation}
Using $\int_0^L \sin^2\left(\frac{n\pi x}{L}\right) dx = \frac{L}{2}$, we get \begin{equation} KE = \frac{1}{4}\mu L A^2\omega_n^2\sin^2(\omega_n t). \end{equation}
Potential Energy:
The spatial derivative is \begin{equation} \frac{\partial y}{\partial x} = A\frac{n\pi}{L}\cos\left(\frac{n\pi x}{L}\right)\cos(\omega_n t). \end{equation}
The potential energy is \begin{equation} PE = \frac{1}{2}\int_0^L T_F \left(\frac{\partial y}{\partial x}\right)^2 dx = \frac{1}{2}T_F A^2\left(\frac{n\pi}{L}\right)^2\cos^2(\omega_n t)\int_0^L \cos^2\left(\frac{n\pi x}{L}\right) dx. \end{equation}
Using $\int_0^L \cos^2\left(\frac{n\pi x}{L}\right) dx = \frac{L}{2}$, we get \begin{equation} PE = \frac{1}{4}T_F A^2\left(\frac{n\pi}{L}\right)^2 L\cos^2(\omega_n t) = \frac{1}{4}T_F A^2\frac{n^2\pi^2}{L}\cos^2(\omega_n t). \end{equation}
Total Energy:
Using the dispersion relation $\omega_n = \frac{n\pi v}{L}$ and $v = \sqrt{T_F/\mu}$, we have $\omega_n^2 = \frac{n^2\pi^2 T_F}{\mu L^2}$.
Substituting: \begin{equation} KE = \frac{1}{4}\mu L A^2\frac{n^2\pi^2 T_F}{\mu L^2}\sin^2(\omega_n t) = \frac{1}{4}T_F A^2\frac{n^2\pi^2}{L}\sin^2(\omega_n t). \end{equation}
The total energy is \begin{equation} E = KE + PE = \frac{1}{4}T_F A^2\frac{n^2\pi^2}{L}\left[\sin^2(\omega_n t) + \cos^2(\omega_n t)\right] = \frac{1}{4}T_F A^2\frac{n^2\pi^2}{L}. \end{equation}
Alternatively, using $v^2 = T_F/\mu$: \begin{equation} E = \frac{1}{4}\mu L A^2\omega_n^2 = \frac{1}{4}\mu L A^2 n^2\omega_1^2. \end{equation}
(b) Yes, the energy depends on $n^2$. Higher harmonics have more energy for the same amplitude because they oscillate faster (higher $\omega_n$) and have steeper spatial gradients. Physically, packing more wavelengths into the same string length requires more energy.