Boundary conditions for the wave equation describe the behavior of solutions at certain points in space. For instance, the strings of a harp are fixed on both ends to the frame of the harp. If the string is plucked, it oscillates according to a solution of the wave equation, where the boundary conditions are that the endpoints of the string have zero displacement at all times.
In general, there are two major types of boundary conditions: fixed-endpoint or Dirichlet boundary conditions, and free-endpoint or Neumann boundary conditions, corresponding to holding the end of a string or allowing it to freely oscillate, respectively. Both types of boundary conditions can lead to standing waves, where certain points called nodes have zero displacement at all times and the maximum amplitude of the wave at all points does not change in time.
The wave equation is a partial differential equation which is second order in both time and space which models small oscillations in some quantity :
where is the velocity of the wave. Depending on the medium in which the wave travels, the velocity can take several different forms:
Strings: where is the tension of the string and is the mass density per unit length of the string.
Sound/Pressure waves: where is the density of the gas through which the sound travels and is the elastic bulk modulus given by , where is the pressure of the gas and is the adiabatic index of the gas (equal to for a monatomic ideal gas).
Light: Light waves are the propagation of oscillations in the electromagnetic field, which travel at the speed of light .
Sound waves propagate in a room filled with a monatomic ideal gas. Suppose more gas is flooded into the room, so that the new density of gas in the room is twice what it was previously. The room is climate-controlled so that the temperature stays fixed. By what factor does the speed of the sound waves change?
Any solution of the wave equation can be expressed as the sum of left-traveling and right-traveling waves, which can be any functions of the form and .
Show that any solution to the wave equation can be expressed as a sum of left-traveling and right-traveling waves and .
The two (left-traveling and right-traveling) solutions can be verified by direct substitution. For the left-traveling solution:
Therefore, , so solves the wave equation. Substituting the right-traveling waves gets the identical result. Since the left-traveling and right-traveling waves are linearly independent, any solution of the wave equation can be expressed as a linear combination of them.
If the wave is traveling in some one-dimensional region where both endpoints are fixed, the simplest examples of solutions are sinusoids:
where is the amplitude of the wave. Using trigonometric identities, this solution may be expanded:
This solution has constant amplitude and the spatial part has no time dependence. This is the mathematical description of a standing wave, visualized below.
Solutions to the wave equation can also be written in the form ) rather than , where is the wave number and is the frequency, using the fact that for non-dispersive waves. In this form, the solution for the amplitude of harmonic (sinusoidal) standing waves on a string fixed at both ends described above is:
Since the amplitude must vanish at the endpoints for standing waves at all times , the allowed values of are highly constrained. Suppose the string is length , and label the endpoints of the string as the coordinates and . Plugging in above, since , regardless of time . However, at the endpoint at , if and only if:
for any integer. The wave number is thus constrained to the set of values:
Using the fact that the wave number is related to the wavelength by:
the possible allowed wavelengths are similarly discrete:
as are the frequencies:
The allowed frequencies of standing waves (and in general, the allowed frequencies of any oscillatory system) are typically called normal modes, with the frequency called the fundamental frequency and frequencies corresponding to higher called harmonics, where the th harmonic corresponds to the integer .
To find the allowed wave numbers or frequencies, it is typically useful to first draw some cases of allowed wave patterns, from which the wavelength can be extracted first, as illustrated in the diagram below:
This analysis applies not only to transverse waves on a string but in fact generic sinusoidal solutions to the wave equation. Another common example concerns longitudinal pressure/sound waves traveling in pipes. A pipe closed at both ends represents Dirichlet boundary conditions for the sound waves in the pipe, since the longitudinal displacement at the ends of the pipe must be zero. If one end of the pipe is opened, the boundary condition becomes Neumann: the pressure at the end should be atmospheric pressure, so there is no change in pressure as waves leave the pipe, and the slope of the longitudinal displacement is flat.
What are the allowed frequencies of longitudinal pressure waves in a half-open pipe of length ?
First, analyze the three longest allowed wavelengths to identify a pattern. The longitudinal displacement over the length of the pipe is illustrated in the following diagram:
The lowest-frequency harmonic completes a quarter wavelength in length . The next highest harmonic completes three-quarters of a wavelength, and the harmonic after that completes five-fourths of a wavelength. Observing the pattern, the allowed wavelengths must be:
The corresponding frequencies are found from the relation , which yields:
where is the velocity of the pressure waves, and .
 Image from https://upload.wikimedia.org/wikipedia/commons/5/5c/Standing_waves_on_a_string.gif under Creative Commons licensing for reuse and modification.
 Image from https://upload.wikimedia.org/wikipedia/commons/7/7d/Standing_wave_2.gif under Creative Commons licensing for reuse and modification.
 Image from lecture notes from San Francisco State University, August 2015. Accessed February 10, 2016. http://www.physics.sfsu.edu/~bland/courses/385/downloads/vector/ch8.pdf