4.7 One Dimensional Wave Equation
Imagine we have a tensioned guitar string of length . Suppose we only consider vibrations in one direction. That is, let denote the position along the string, let denote time, and let denote the displacement of the string from the rest position. See Figure .

The equation that governs this setup is the so-called one-dimensional wave equation:
for some constant . The intuition is similar to the heat equation, replacing velocity with acceleration: the acceleration at a specific point is proportional to the second derivative of the shape of the string. In other words when the string is concave down then is negative and the string wants to accelerate downwards, so should be negative. And vice versa. The wave equation is an example of a hyperbolic PDE.
Assume that the ends of the string are fixed in place:
Note that we have two conditions along the axis as there are two derivatives in the direction.
There are also two derivatives along the direction and hence we need two further conditions here. We need to know the initial position and the initial velocity of the string. That is, for some known functions and , we impose
As the equation is again linear, superposition works just as it did for the heat equation. And again we will use separation of variables to find enough building-block solutions to get the overall solution. There is one change however. It will be easier to solve two separate problems and add their solutions.
The two problems we will solve are
The principle of superposition implies that solves the wave equation and furthermore and . Hence, is a solution to
The reason for all this complexity is that superposition only works for homogeneous conditions such as , , or . Therefore, we will be able to use the idea of separation of variables to find many building-block solutions solving all the homogeneous conditions. We can then use them to construct a solution solving the remaining nonhomogeneous condition.
Let us start with (4.7.1). We try a solution of the form again. We plug into the wave equation to obtain
Rewriting we get
Again, left hand side depends only on and the right hand side depends only on . Therefore, both equal a constant, which we will denote by .
We solve to get two ordinary differential equations
The conditions implies and implies that . Therefore, the only nontrivial solutions for the first equation are when and they are
The general solution for for this particular is
We also have the condition that or . This implies that , which in turn forces . It is convenient to pick (you will see why in a moment) and hence
Our building-block solutions are
We differentiate in , that is
Hence,
We expand in terms of these sines as
Using superposition we can just write down the solution to (4.7.1) as a series
Similarly we proceed to solve (4.7.2). We again try . The procedure works exactly the same at first. We obtain
and the conditions , . So again and
This time the condition on is . Thus we get that and we take
Our building-block solution will be
As , we expand in terms of these sines as
And we write down the solution to (4.7.2) as a series
Putting these two solutions together, let us state the result as a theorem.
One thing to take away from all this is how a guitar sounds. Notice that the (angular) frequencies that come up in the solution are . That is, there is a certain base fundamental frequency , and then we also get all the multiples of this frequency, which in music are called the overtones. Which overtones appear and with what amplitude is what musicians call the timbre of the note. Mathematicians usually call this the spectrum. Because all the frequencies are multiples of one frequency (the fundamental) we get a nice pleasing sound.
The fundamental frequency increases as we decrease length . That is, if we place a finger on the fingerboard and then pluck a string we get a higher note. The constant is given by
where is tension and is the linear density of the string. Tightening the string (turning the tuning peg on a guitar) increases and hence produces a higher fundamental frequency (a higher note). On the other hand using a heavier string reduces and produces a lower fundamental frequency (a lower note). A bass guitar has longer thicker strings, while a ukulele has short strings made of lighter material.Something rather interesting is the almost symmetry between space and time. In its simplest form we see this symmetry in the solutions
Except for the , time and space are just the same.In general, the solution for a fixed is a Fourier series in , for a fixed it is a Fourier series in , and the coefficients are related. If the shape or the initial velocity have lots of corners, then the sound wave will have lots of corners. That is because the Fourier coefficients of the initial shape decay to zero (as ) at the same rate as the Fourier coefficients of the wave in time (for some fixed ). So if you use a sharp object to pick the string, you get a sharper sound with lots of high frequency components, while if you use your thumb, you get a softer sound without so many high overtones. Similarly if you pluck close to the bridge, you are getting a pluck that looks more like the sawtooth, and you get an even sharper sound.
In fact, if you look at the formula for the solution, you see that for any fixed we get an almost arbitrary Fourier series in , everything except the constant term. You can essentially obtain any sound you want by plucking the string in just the right way. Of course we are considering an ideal string of no stiffness and no air resistance. Those variables clearly impact the sound as well.
Adapted from Differential Equations for Engineers by Jiří Lebl (Oklahoma State University), hosted on LibreTexts (math.libretexts.org) and licensed under CC BY-SA 4.0. Changes were made. License: CC-BY-SA-4.0.