# The Wave Equation for Ideal Strings

One of the most important equations in physics is the wave equation.

In this post, we will derive the wave equation for the case of a transverse wave on a string. We’ll also find this speed as a function of tension and linear density. Let’s get started.

Consider an infinitesimal rope element at a horizontal distance $x$ from the origin of our coordinate system. As time passes, it oscillates vertically but stays still horizontally. Notice this means that the rope element stretches and relaxes as a function of time. Let the height of the wave as a function of position $x$ and time $t$ be $\psi(x, t)$. If you’ve never seen a multivariable function before, this just means that at a given time $t$, the height of the string at the point $x$ is $\psi(x, t)$. Let’s assume that there are no external forces on the string (like gravity).

From the figure above, we see that

$\displaystyle \tan{\theta} = \partial \psi / \partial x$

The weird curly derivative above is just the rate of change of $\psi$ with respect to $x$ at a particular instant in time. In the same way, $\partial \psi/\partial t$ is the velocity of the rope at a certain point on the $x$ axis.

Let the tension as a function of position and time be $T(x, t)$.

Notice that we’re assuming tension always points along the rope (this would not be true for a steel bar for example, but it’s true for ideal ropes).

Since we’re doing physics and not math, we can only find the wave equation by applying Newton’s laws. We’re assuming that mass elements move only up and down, so all horizontal forces must cancel out. This means that the horizontal tension must be constant along the rope at any given time! We express this mathematically using derivatives.

$\displaystyle \frac{\partial} { \partial x} (T(x, t) \cos{\theta(x, t)}) = 0$

Using the chain rule (notice that this applies to partial derivatives because at any specific point in time, $\psi(x, t)$ is a function of $x$ alone).

$\displaystyle \frac{\partial T(x, t)}{\partial x} \cos{\theta(x, t)} - T(x, t) \sin{\theta{(x, t)}} \frac{\partial \theta(x, t)}{\partial x} = 0$

Let’s move on to the vertical direction. Notice that as the rope oscillates, the mass between $x$ and $x+dx$ is a constant, although the density per length along the rope changes because the rope stretches a little bit. We don’t need to worry about it at all. Let’s define $\rho(x)$ to be the density along the $x$ axis as a function of position. In other words, $\rho(x)$ is the mass of the small rope element at a position $x$ divided by $dx$.

So the mass of the small rope element is

$\displaystyle dm = \rho(x) \, dx$

What’s the acceleration? This is super easy. Since the height as a function of time and space is $\psi(x, t)$, the acceleration of the particle at $x$ is just

$\displaystyle a = \frac{\partial^{2} \psi}{ \partial t^{2}}$

Finally, what’s the vertical component of the force? At the position $x+dx$, the force is $T(x+dx, t) \sin{\theta(x+dx, t)}$ and at the position $x$, the force is $-T(x, t) \sin{\theta(x, t)}$.

So the vertical force is

$\displaystyle F_v = \frac{T(x+dx, t) \sin{\theta(x+dx, t)} - T(x, t) \sin{\theta(x, t)}}{dx} \, dx$

Notice the first term is just the definition of the partial derivative with respect to $x$ for the function $T(x, t) \sin{\theta(x, t)}!$

$\displaystyle F_v = \frac{ \partial }{\partial x} (T(x, t) \sin{ \theta(x, t) } )\, dx$

According to Newton

$\displaystyle F_v = dm \, a$

$\displaystyle \Rightarrow \frac{ \partial }{\partial x} (T(x, t) \sin{ \theta(x, t) } ) \, dx = \rho(x) \, dx \frac{\partial^{2} \psi}{ \partial t^{2}}$

Dividing by $dx$, we get

$\displaystyle \frac{ \partial }{\partial x} (T(x, t) \sin{ \theta(x, t) } ) = \rho(x) \frac{\partial^{2} \psi}{ \partial^{2} t}$

Using the chain rule, we can rewrite the left hand side as

$\displaystyle \frac{ \partial }{\partial x} (T(x, t) \sin{ \theta(x, t) } ) = \frac{\partial T(x, t)}{\partial x} \sin{\theta(x, t)} +T(x, t) \cos{\theta{(x, t)}} \frac{\partial \theta(x, t)}{\partial x}$

Unfortunately, we need to make an approximation in order to get the wave equation. We assume that the oscillations in the vertical direction are small, so that we can use the small angle approximation on $\theta$. Therefore, in radians

$\displaystyle \theta \approx \sin{\theta} \approx \tan{\theta} = \frac{\partial \psi}{\partial x}$

and

$\displaystyle \cos{\theta} \approx 1$

Plugging these in, we get

$\displaystyle \frac{ \partial }{\partial x} (T(x, t) \sin{ \theta(x, t) } ) \approx \frac{\partial T(x, t)}{\partial x} \frac{\partial \psi}{\partial x} +T(x, t) \frac{\partial \theta(x, t) }{\partial x}$

We can also rewrite the horizontal tension equation as

$\displaystyle \frac{\partial T(x, t)}{\partial x} - T(x, t) \frac{\partial \psi}{\partial x} \frac{\partial \theta(x, t)}{\partial x} = 0$

Notice that this implies $\frac{\partial T(x, t)}{\partial x}$ is second order in $\theta$ because
$\displaystyle \frac{\partial \psi}{\partial x} = \theta$
and
$\displaystyle \frac{\partial \theta(x, t)}{\partial x}$
is first order in $\theta$

Therefore the tension is approximately constant along the rope at any given time, like you would intuitively expect.

Substituting from this equation to the previous one, we get

$\displaystyle \displaystyle \frac{ \partial }{\partial x} (T(x, t) \sin{ \theta(x, t) } ) = T(x, t) (\frac{\partial \psi}{\partial x})^{2} \frac{\partial \theta(x, t)}{\partial x} + T(x, t) \frac{\partial \theta(x, t) }{\partial x}$

The first term is second order in $\frac{\partial \psi}{\partial x} = \theta$ so we neglect it. Therefore

$\displaystyle \displaystyle \frac{ \partial }{\partial x} (T(x, t) \sin{ \theta(x, t) } ) = T(x, t) \frac{\partial \theta(x, t) }{\partial x}$

But since

$\displaystyle \theta(x, t) = \frac{\partial \psi}{\partial x}$

this becomes

$\displaystyle \frac{ \partial } { \partial x} (T(x, t) \sin{\theta(x, t) } ) = T(x, t) \frac{ \partial^{2} \psi(x, t) }{ \partial x^{2} }$

Substituting back into

$\displaystyle \frac{ \partial }{\partial x} (T(x, t) \sin{ \theta(x, t) } ) = \rho(x) \frac{\partial^{2} \psi}{ \partial^{2} t}$

we get

$\displaystyle T(x, t) \frac { \partial^{2} \psi(x, t) } { \partial x^{2} } = \rho(x) \frac{ \partial^{2} \psi (x, t) } { \partial^{2} t}$

But since tension is approximately constant along the rope at any given time, tension is approximately a function of time alone. Assuming that you give the rope a constant tension $T$ throughout (i.e., you don’t increase or decrease how hard you’re pulling the ends of the rope), $T$ is a constant. If we further assume that density $\rho(x)$ is a constant $\rho$, we get

$\displaystyle \Rightarrow \frac{ \partial^{2} \psi (x, t) } { \partial^{2} t} = v^{2} \frac { \partial^{2} \psi(x, t) } { \partial x^{2} }$
where
$\displaystyle v = \sqrt{\frac{T}{\rho}}$

This is the famous wave equation. The constant $v$ is called the “phase speed” of the wave.

The most general solution to the wave equation is
$\displaystyle \psi(x, t) = f(x-vt) + g(x+vt)$
This can be proven rigorously using math without too much difficulty, but it has a very obvious physical meaning!
$f(x-vt)$ is the wave travelling to the right, because if you want to fix the argument of $f$, then $x$ must increase at a speed of $v$. Similarly, $g(x+vt)$ is the wave travelling to the left, because to keep the argument the same, $x$ must now decrease. This shape could be anything! For example, this is a valid wave, as long as the pulse is moving to the right at a constant speed!

There’s a very common misconception that all waves have to be sines or cosines, but this is not true! However, all waves can be written as the superposition of sines and cosines. This is a very important fact called the Fourier Theorem.

If you liked this post, please subscribe to my mailing list. It’s free!