Learning Objectives
By the end of this section, you will be able to:
- Derive the one-dimensional wave equation from Newton's second law applied to an infinitesimal element of a stretched string.
- Explain why the second spatial derivative (curvature) is the natural restoring force in a continuous medium.
- Justify the small-angle approximation that lets the derivation work, and identify the regime where it fails.
- Show that the wave speed emerges from dimensional analysis alone — no equation solving required.
- Verify the derivation numerically with a hand-traced example, then with Python, then with PyTorch.
- Run a finite-difference time stepper for the wave equation and connect each line of code to a line in the derivation.
The Big Picture
"Calculus is the mathematics of change. The wave equation is what change looks like when memory has inertia."
A pebble drops into a pond. A ring of ripples races outward. A guitar string is plucked; a clean musical note rings out. A pulse travels down a long rope when one end is shaken. In each case the same striking thing happens: a local disturbance copies itself across a medium, propagating outward, almost unchanged, at a definite speed.
We want to know the law that produces this behaviour. Not a description, not a metaphor — an equation, derived from Newton's second law applied to a tiny piece of the medium, that pins down exactly how the displacement at one point depends on its neighbours and on time.
The answer is one of the most consequential equations in physics:
Every term in this equation has a precise physical meaning. The left side is the acceleration of a piece of the string. The right side is the force per unit mass pulling that piece back toward equilibrium. The fact that the restoring force is proportional to the second derivative of the displacement — the curvature — is the key insight. Our job in this section is to make this fact feel inevitable.
The intuition in one sentence
A piece of the string accelerates downward only when its neighbours on the left and on the right pull it in slightly different directions — and the size of that mismatch is exactly .
The Physical Setup
Imagine a long, perfectly flexible string of uniform thickness, lying along the x-axis under constant tension . The string has linear mass density (mass per unit length, units kg/m). When at rest, every point of the string sits at .
Now we pluck the string. Each point develops a small vertical displacement — a function of where you are along the string and what time it is. The string still has the same tension everywhere (we will argue why later), but it is no longer flat. Our question is:
What differential equation does u(x, t) satisfy?
The big idea. We will look at a tiny piece of the string between and , write down Newton's second law for that piece, and watch the wave equation crystallize out of the algebra.
Why a string?
A stretched string is the simplest possible system that exhibits wave motion. Everything we derive — the role of curvature, the wave speed formula, the second-order time derivative — carries over to sound, to light, to seismic waves, to the quantum-mechanical wave function, and to neural activations. Start simple, generalise later.
Newton's Second Law on a Tiny String Element
Zoom in on the segment between and . It is a tiny chunk of string with mass
Its vertical acceleration is the second time-derivative of its displacement, . Newton's second law for the vertical direction is therefore:
Everything to come is one long computation of . Once we have it, we divide by and the wave equation pops out.
Why only the vertical force?
For small transverse displacements the horizontal forces on the element nearly cancel and the element does not move horizontally to first order. Only the vertical mismatch matters. We are treating the string as a one-dimensional medium where every point moves only up and down.
Decomposing the Tension at the Two Endpoints
Two forces act on our element: the tension pulling at the LEFT endpoint (back along the string toward smaller ) and the tension pulling at the RIGHT endpoint (forward toward larger ).
Because the string is curved, these two pulls do not lie on the same line. Let be the angle the string makes with the x-axis at the left endpoint, and the angle at the right endpoint.
Vertical components
- Right endpoint: vertical pull is (toward if the string slopes up to the right).
- Left endpoint: vertical pull is (the tension at the left pulls back along the local tangent, so its y-component flips sign relative to ).
Net vertical force
So far this is exact. No approximations. The wave equation has not appeared yet — we just have an angle difference. The next step turns that angle difference into something differentiable.
The Small-Angle Approximation
For a guitar string vibrating with a maximum displacement of a couple of millimetres over a span of half a metre, the slope is at most a few thousandths. The angle the string makes with the x-axis is therefore always tiny.
For small angles, the three following quantities are all indistinguishable:
The middle equality matters most for us: because is rise-over-run, which is literally the slope of the string. So in the small-angle regime:
Substituting these into the force balance:
That bracket should look familiar. It is a difference of the same function (the slope) evaluated at two nearby points. As , dividing by turns it into a derivative — the derivative of the slope. The derivative of the slope is the second derivative.
Where small-angle breaks
If the displacement is large enough that the slope exceeds, say, 0.2, the approximations and the assumption of constant tension both start to fail. The resulting equation is no longer linear: it becomes the nonlinear wave equation, in which large pulses can steepen, break, and produce shocks. That regime governs tsunamis near the shore and sonic booms.
A tiny note on tension
We assumed is the same everywhere along the string. For a slightly deformed string the actual arclength differs from by a factor of , which is 1 + (slope)²/2 + … . For tiny slopes the correction is quadratically small and we can drop it. This is the precise sense in which the wave equation is a linearised model.
From a Slope Difference to the Second Derivative
Look at . By the definition of the derivative:
In words: the change in slope over the tiny interval, divided by the interval's length, equals the curvature. So for small :
Plugging this back into the force expression:
Geometric intuition for curvature as a force
When the string is straight, the two tensions point in exactly opposite directions — they cancel completely and the element feels no net force. The instant the string curves, the two tensions tilt relative to each other. The amount of that tilt over a tiny interval is the second derivative. The curvature literally measures the geometric mismatch that produces the restoring force.
The Wave Equation Emerges
Put Newton's second law back together:
The appears on both sides and cancels. Divide by :
Defining the constant gives the canonical form of the one-dimensional wave equation:
Two competing tendencies in one line
Left side: the string's inertia — how strongly it resists changes in motion. Right side: the elastic restoring force, proportional to curvature, that pulls each point back toward the local average of its neighbours. The wave equation says the acceleration of every point is exactly the curvature there, scaled by .
What Is c, Really?
We never solved for . It dropped out of the algebra as the only combination of and with units of speed:
Taking the square root gives metres per second — a speed. We will see in the next section (d'Alembert's solution) that any disturbance on the string actually does travel at this exact speed, in both directions, without distortion.
| Quantity | Symbol | Units | Physical role |
|---|---|---|---|
| Tension | T | N | Stiffness — bigger T = faster restoration |
| Linear mass density | μ | kg/m | Inertia — bigger μ = slower response |
| Wave speed | c = √(T/μ) | m/s | Speed at which any pulse travels |
| Squared speed | c² = T/μ | m²/s² | The coefficient in u_tt = c² u_xx |
Compare to other waves
Light in vacuum: (electromagnetic stiffness divided by inertia). Sound in air: (pressure stiffness over density). Every wave speed in physics has the same structure: square root of a stiffness divided by an inertia. Once you have seen it on a string, you have seen it everywhere.
Interactive: Tension on a String Element
Drag the segment along the string. Change the shape, the amplitude, the segment width, the tension. The two orange arrows show the tension vectors at the endpoints. The green arrow is the net vertical force . The diagnostic box compares the measured with the prediction . The two values agree across every shape and position — exactly because the derivation we just did is correct.
Things to try
- Set amplitude to 0 — the string is flat, curvature is 0, the green arrow vanishes.
- Pick the "double" shape and slide the segment from left to right. Watch the green force arrow flip direction exactly where the curvature changes sign — that is the inflection point.
- Crank the tension up. The arrow magnitudes grow but the curvature does not — that linear scaling in is visible right in the readout.
Interactive: The Speed Lab
The wave speed is not a free parameter — it is fixed by the material properties of the string. Slide the tension and the density and watch the pulse race or crawl across the string. The badge reports the current and the round-trip time. Notice the square-root scaling: doubling does not double — it multiplies it by .
Worked Numerical Example
Let us check the derivation with concrete numbers we can do by hand. Open the collapsible box below and work through it line by line — pen on paper.
Worked example: a Gaussian bump on a steel-like string
Setup. A string with linear density is held at tension . We displace it into the shape
(a small Gaussian bump centred at 0.5 m). We focus on the segment between and .
Step 1 — wave speed
Step 2 — slope at the two endpoints
.
At : . At : .
Step 3 — net vertical force
Negative because the bump is to the right of our segment, so the string pulls our element downward (toward equilibrium).
Step 4 — second derivative check
. At this evaluates to about .
Prediction:
Match: measured −0.509 N vs predicted −0.508 N. Differs by less than 0.2% — the discrepancy is the truncation error from using a non-infinitesimal . The derivation works.
Step 5 — vertical acceleration
By Newton: .
By the wave equation: .
Same number, two ways. The wave equation is simply Newton's second law for the string, rewritten in local-derivative form.
Python: Verifying the Derivation Numerically
The same chain of reasoning, in code. Read the explanations on the right side — each annotation maps to one line of the derivation we just did on paper.
Expected output
slope at left endpoint = +0.77880 slope at right endpoint = +0.67756 net vertical force = -0.506200 N T * u''(x) * dx = -0.507876 N u''(x) = -10.1575 1/m dm = 0.00020 kg u_tt from Newton's law = -2539.382 m/s^2 u_tt from wave equation = -2539.382 m/s^2 c = sqrt(T/mu) = 15.811 m/s
PyTorch: The Wave Equation as a Tensor Update
Now that the derivation is verified, we can discretise the entire spatial domain on a grid and march the equation forward in time. The update rule comes directly from replacing both second derivatives in the wave equation with central finite differences:
This is one of the most heavily used update formulas in scientific computing. Each interior grid point is updated using only its immediate neighbours — a manifestly local rule that mirrors the finite propagation speed of the continuum equation.
Interactive: Live String Simulation
The simulator below runs exactly the update rule above in your browser. Pick an initial condition, change the wave speed , watch the energy bounce back and forth between the fixed endpoints. The triangular "pluck" preset gives you a beautiful preview of d'Alembert's solution: the initial shape splits cleanly into two half-amplitude copies travelling outward.
What to look for
- With the triangular pluck, the apex of the triangle splits into two smaller apexes that race in opposite directions.
- With the Gaussian, the bump splits into two half-amplitude bumps — the textbook d'Alembert result.
- With the wavepacket, the carrier wave moves at speed , the envelope at the SAME speed — because this medium is non-dispersive.
- Change live during the simulation: the wave instantly speeds up or slows down — there is no inertia for the speed itself.
Common Pitfalls
- Confusing with . The wave equation has the square. The wave speed is the square root of the coefficient on the right side. Get this wrong and your simulation runs at the wrong tempo.
- Forgetting the small-angle approximation. Large amplitudes break linearity: tension is no longer constant, slopes are no longer small, and the nonlinear correction matters.
- Mixing up the sign of and the force. A concave-up region (positive ) pulls the element upward if it is below equilibrium — so the "sign" only makes sense once you fix a sign convention for .
- Picking too large in the simulation. The CFL condition is not optional — violate it and the time-stepper diverges within a few iterations.
- Treating the wave equation as first-order in time. It needs TWO initial conditions (displacement AND velocity ) because it is , not .
Summary
We zoomed in on a tiny piece of a stretched string and wrote down Newton's second law for it. The two tension forces at its endpoints pulled along the local tangent of the string and almost cancelled — except for a tiny vertical mismatch proportional to the difference of the slopes at the endpoints. That slope difference is the second derivative of the displacement times the segment length. Putting it all together:
The wave speed emerged for free from dimensional analysis. We verified the derivation with a hand-traced Gaussian-bump example, then with Python that matched the prediction to four decimal places, then with PyTorch that integrated the equation forward in time on a 256-point grid. Finally, the live simulator showed the d'Alembert splitting we will derive analytically in the next section.
In Section 27.2 we will solve the wave equation — not numerically, but in closed form, using d'Alembert's characteristic coordinates. The clean splitting you just saw in the simulator will become a precise mathematical statement.