Section 6.4

The Wave Equation

Second-order in time • Two initial conditions • Oscillating solutions

1. Physical Setup and Governing Equation

The 1-D Wave Equation

Consider a taut string of length $L$ fixed at both ends, lying along the $x$-axis. Let $u(x,t)$ denote the vertical displacement of the string at position $x$ and time $t$. Under small-amplitude assumptions, $u$ satisfies

$$\frac{\partial^2 u}{\partial t^2} = a^2\,\frac{\partial^2 u}{\partial x^2},\qquad 0 < x < L,\; t > 0.$$

Here $a > 0$ is the wave speed, determined by the string's tension $T$ and density $\rho$ as $a = \sqrt{T/\rho}$.

Initial and Boundary Conditions

Why TWO Initial Conditions?

The wave equation is second-order in time, unlike the heat equation which is first-order. This means we must specify both

  • the initial displacement: $u(x,0) = f(x)$, and
  • the initial velocity: $\dfrac{\partial u}{\partial t}(x,0) = g(x)$.

Compare with mechanics: to predict a ball's trajectory, you need both its initial position and initial velocity — not just one. The wave equation is simply Newton's second law for a string.

Full Problem Statement (Dirichlet BCs) $$\begin{cases} u_{tt} = a^2\,u_{xx},\qquad 0 < x < L,\; t > 0 \\[4pt] u(0,t) = u(L,t) = 0 \qquad \text{(fixed ends)} \\[4pt] u(x,0) = f(x),\quad u_t(x,0) = g(x) \qquad \text{(initial state)} \end{cases}$$

2. Separation of Variables

Assume $u(x,t) = P(x)Q(t)$. Compute the partial derivatives:

$$\frac{\partial^2 u}{\partial t^2} = P(x)Q''(t), \qquad \frac{\partial^2 u}{\partial x^2} = P''(x)Q(t).$$

Substitute into $u_{tt} = a^2 u_{xx}$:

$$P(x)Q''(t) = a^2\,P''(x)Q(t).$$
Separate the Variables

Divide both sides by $a^2\,P(x)\,Q(t)$:

$$\frac{Q''(t)}{a^2 Q(t)} = \frac{P''(x)}{P(x)} = -\lambda.$$

Same separation constant trick as in the heat equation.

The Two ODEs

We obtain two ordinary differential equations:

Spatial ODE (same as heat equation) $$P''(x) + \lambda P(x) = 0, \qquad P(0) = P(L) = 0.$$
Temporal ODE (now SECOND-order) $$Q''(t) + a^2\lambda\, Q(t) = 0.$$
Observation

The spatial problem is identical to the one we solved for the heat equation. Therefore the spatial three-case analysis gives the same eigenvalues and eigenfunctions:

$$\lambda_m = \left(\frac{m\pi}{L}\right)^2, \qquad P_m(x) = \sin\!\left(\frac{m\pi x}{L}\right), \quad m = 1,2,3,\ldots$$

Only the temporal behaviour differs.

3. Spatial Three-Case Analysis (Review)

We briefly recapitulate the three-case analysis for completeness, since the same spatial problem appears:

Case I: $\lambda < 0$

$P(x) = A\cosh(\alpha x) + B\sinh(\alpha x)$. BCs $P(0)=P(L)=0$ force $A = B = 0$. Trivial.

Case II: $\lambda = 0$

$P(x) = C_1 x + C_2$. BCs force $C_1 = C_2 = 0$. Trivial.

Case III: $\lambda > 0$ — NON-TRIVIAL

$P(x) = A\cos(\alpha x) + B\sin(\alpha x)$. $P(0) = 0 \Rightarrow A = 0$. $P(L) = B\sin(\alpha L) = 0$ with $B \neq 0$ gives

$$\alpha_m = \frac{m\pi}{L}, \qquad \lambda_m = \left(\frac{m\pi}{L}\right)^2, \qquad P_m(x) = \sin\!\left(\frac{m\pi x}{L}\right).$$

4. Solving the Temporal ODE

With $\lambda = \lambda_m = (m\pi/L)^2$, the temporal ODE reads

$$Q_m''(t) + a^2\lambda_m\,Q_m(t) = 0 \implies Q_m''(t) + \left(\frac{m\pi a}{L}\right)^2 Q_m(t) = 0.$$

This is a simple harmonic oscillator with angular frequency

$$\omega_m = \frac{m\pi a}{L}.$$

Its general solution contains both a cosine and a sine term (because of the two arbitrary constants that come with any second-order ODE):

$$Q_m(t) = A_m\,\cos\!\left(\frac{m\pi a}{L}\,t\right) + B_m\,\sin\!\left(\frac{m\pi a}{L}\,t\right).$$
Contrast with the Heat Equation

Heat: $Q' + K\lambda Q = 0 \Rightarrow Q(t) = C\,e^{-K\lambda t}$ (exponential decay).

Wave: $Q'' + a^2\lambda Q = 0 \Rightarrow Q(t) = A\cos(\omega t) + B\sin(\omega t)$ (pure oscillation, no decay).

This is why the wave equation conserves energy while the heat equation dissipates it.

5. General Solution of the Wave Equation

Each product solution $u_m(x,t) = P_m(x)Q_m(t)$ is called a mode or normal mode. By linearity we can superpose:

General Solution — Wave Equation (Fixed Ends) $$\boxed{\;u(x,t) = \sum_{m=1}^{\infty}\!\left[A_m\,\cos\!\left(\frac{m\pi a}{L}\,t\right) + B_m\,\sin\!\left(\frac{m\pi a}{L}\,t\right)\right]\!\sin\!\left(\frac{m\pi x}{L}\right)\;}$$

We must determine both the $A_m$ and the $B_m$ to match the two initial conditions.

Determining the $A_m$ from $u(x,0) = f(x)$

Setting $t = 0$ in the general solution (note $\sin(0) = 0$, $\cos(0) = 1$):

$$u(x,0) = \sum_{m=1}^{\infty} A_m\,\sin\!\left(\frac{m\pi x}{L}\right) = f(x).$$

This is the Fourier sine series of $f(x)$, so

$$\boxed{\;A_m = \frac{2}{L}\int_0^L f(x)\,\sin\!\left(\frac{m\pi x}{L}\right)dx.\;}$$

Determining the $B_m$ from $u_t(x,0) = g(x)$

Differentiate the general solution term-by-term with respect to $t$:

$$u_t(x,t) = \sum_{m=1}^{\infty}\!\left[-A_m\frac{m\pi a}{L}\sin\!\left(\frac{m\pi a}{L}t\right) + B_m\frac{m\pi a}{L}\cos\!\left(\frac{m\pi a}{L}t\right)\right]\!\sin\!\left(\frac{m\pi x}{L}\right).$$

Set $t = 0$:

$$u_t(x,0) = \sum_{m=1}^{\infty} B_m\,\frac{m\pi a}{L}\,\sin\!\left(\frac{m\pi x}{L}\right) = g(x).$$

This is the Fourier sine series of $g(x)$, with coefficients $B_m(m\pi a/L)$. Solving for $B_m$:

$$\boxed{\;B_m = \frac{2}{m\pi a}\int_0^L g(x)\,\sin\!\left(\frac{m\pi x}{L}\right)dx.\;}$$
Two ICs ⇒ Two Coefficients per Mode

For each mode $m$, the displacement IC $f$ gives $A_m$ and the velocity IC $g$ gives $B_m$. Two scalar pieces of data per mode to fix two unknown amplitudes — perfectly balanced.

6. Method Summary

7. Worked Examples

Example 1: $a^2 = 9$, $L=4$, $f(x) = x-1$, $g(x) = x$ — both ICs non-trivial
Problem $$\begin{cases} u_{tt} = 9\,u_{xx},\quad 0 < x < 4,\; t > 0 \\[4pt] u(0,t) = u(4,t) = 0 \\[4pt] u(x,0) = x - 1,\quad u_t(x,0) = x \end{cases}$$

Step 1 — Parameters. $a = 3$, $L = 4$, $\omega_m = 3m\pi/4$.

Step 2 — General form.

$$u(x,t) = \sum_{m=1}^{\infty}\!\left[A_m\cos\!\left(\frac{3m\pi t}{4}\right) + B_m\sin\!\left(\frac{3m\pi t}{4}\right)\right]\!\sin\!\left(\frac{m\pi x}{4}\right).$$

Step 3 — Compute $A_m$ from $f(x) = x - 1$. This is the same computation as Example 3 on page 6.2:

$$A_m = \frac{2}{4}\int_0^4 (x-1)\sin\!\left(\frac{m\pi x}{4}\right)dx = -\frac{2}{m\pi}\bigl[1 + 3(-1)^m\bigr].$$

Step 4 — Compute $B_m$ from $g(x) = x$. We need

$$B_m = \frac{2}{m\pi \cdot 3}\int_0^4 x\sin\!\left(\frac{m\pi x}{4}\right)dx.$$

Integration by parts with $u = x$, $dv = \sin(m\pi x/4)dx$, so $du = dx$, $v = -\dfrac{4}{m\pi}\cos(m\pi x/4)$:

$$\int_0^4 x\sin\!\left(\frac{m\pi x}{4}\right)dx = \left[-\frac{4x}{m\pi}\cos\!\left(\frac{m\pi x}{4}\right)\right]_0^4 + \frac{4}{m\pi}\int_0^4 \cos\!\left(\frac{m\pi x}{4}\right)dx.$$

The remaining integral is zero (as in earlier examples). Evaluating the boundary term:

$$-\frac{16}{m\pi}\cos(m\pi) - 0 = -\frac{16(-1)^m}{m\pi}.$$

Therefore

$$B_m = \frac{2}{3m\pi}\cdot\left(-\frac{16(-1)^m}{m\pi}\right) = -\frac{32(-1)^m}{3 m^2 \pi^2}.$$
Final Answer $$u(x,t) = \sum_{m=1}^{\infty}\!\left[-\frac{2(1+3(-1)^m)}{m\pi}\cos\!\frac{3m\pi t}{4} - \frac{32(-1)^m}{3m^2\pi^2}\sin\!\frac{3m\pi t}{4}\right]\!\sin\!\frac{m\pi x}{4}.$$

Physical check: Energy does not decay — oscillations persist forever. The displacement is an infinite superposition of standing-wave modes, each oscillating at its own frequency $\omega_m = 3m\pi/4$.

Example 2: Plucked string — $f(x) = \sin(\pi x/L)$, $g(x) = 0$
Problem $$\begin{cases} u_{tt} = a^2\,u_{xx} \\[4pt] u(0,t) = u(L,t) = 0 \\[4pt] u(x,0) = \sin(\pi x/L),\quad u_t(x,0) = 0 \end{cases}$$

Step 1 — $A_m$ by comparison. $f(x) = \sin(\pi x/L)$ is exactly the $m=1$ eigenfunction, so $A_1 = 1$ and all other $A_m = 0$.

Step 2 — $B_m$. Since $g(x) \equiv 0$, all $B_m = 0$.

Final Answer $$u(x,t) = \cos\!\left(\frac{\pi a}{L}\,t\right)\sin\!\left(\frac{\pi x}{L}\right).$$

Physical meaning: A pure sinusoidal standing wave. Every point on the string oscillates at frequency $\omega_1 = \pi a/L$, with amplitude $\sin(\pi x/L)$ depending on position. The endpoints $x=0, L$ are nodes (fixed); the midpoint $x = L/2$ is an antinode. This is the fundamental mode of the string — the lowest musical pitch it can produce.

Example 3: Struck string — $f(x) = 0$, $g(x) = \sin(2\pi x/L)$
Problem $$\begin{cases} u_{tt} = a^2\,u_{xx} \\[4pt] u(0,t) = u(L,t) = 0 \\[4pt] u(x,0) = 0,\quad u_t(x,0) = \sin(2\pi x/L) \end{cases}$$

Step 1 — $A_m$: Since $f \equiv 0$, all $A_m = 0$.

Step 2 — $B_m$: The velocity matches the $m = 2$ eigenfunction. In the Fourier-sine expansion $g(x) = \sum B_m(m\pi a/L)\sin(m\pi x/L)$ we match mode by mode:

$$B_2\,\frac{2\pi a}{L} = 1 \implies B_2 = \frac{L}{2\pi a},$$

and all other $B_m = 0$.

Final Answer $$u(x,t) = \frac{L}{2\pi a}\,\sin\!\left(\frac{2\pi a}{L}\,t\right)\sin\!\left(\frac{2\pi x}{L}\right).$$

Physical meaning: No initial displacement, but an initial velocity kick. The string responds by oscillating in the second mode (two half-wavelengths fit in $L$). The $\sin$ in time means the displacement starts at zero and grows sinusoidally — exactly what you'd expect from an initial "kick".

8. Note: The d'Alembert Form

Alternative Representation

On the infinite line (no boundaries), the wave equation also admits the closed-form d'Alembert solution

$$u(x,t) = \frac{1}{2}\bigl[f(x + at) + f(x - at)\bigr] + \frac{1}{2a}\int_{x - at}^{x + at} g(s)\,ds.$$

This makes explicit that the wave equation propagates disturbances at speed $a$ in both directions, without distortion. For the finite string with Dirichlet BCs, the Fourier-series solution above is equivalent to the d'Alembert form extended by periodic/odd reflection.