Feynman’s second-order accurate method
One of the quiet pleasures of the Feynman Lectures on Physics is discovering just how modern many of Feynman’s instincts were. Long before “computational physics” became a standard course title, Feynman was already teaching students how to think like numerical analysts - cautiously, pragmatically, and with a healthy suspicion of algebraic perfection.
Chapter 9-6 is a beautiful example of this mindset in action. Here, Feynman sets aside exact solutions and instead rolls up his sleeves to actually solve a differential equation step by step, using numbers. The problem itself is simple: a particle subject to a restoring force proportional to displacement,
a(t) = -x(t),
the equation of motion for a simple harmonic oscillator. But the point of the chapter is not the oscillator - it is the method.
Feynman begins with the most straightforward numerical idea imaginable: break time into small chunks and march forward.
He chooses a time step
ε = 0.10 sec,
and starts from the initial conditions
• x(0) = 1.00
• v(0) = 0.00
At first, nothing moves. The position at t = 0.1 seconds is simply
x(0.1) = x(0) + ε v(0) = 1.00,
because the velocity is initially zero. But the velocity does change, because acceleration depends on position:
a(0) = -x(0) = -1.00.
So after one time step,
v(0.1) = 0.00 - 0.10 x 1.00 = -0.10.
This is classic forward Euler integration: new position from old velocity, new velocity from old acceleration. Continuing one more step,
x(0.2) = 1.00 - 0.10 x 0.10 = 0.99,
v(0.2) = -0.10 - 0.10 x 1.00 = -0.20.
And so on, “on and on and on,” as Feynman cheerfully puts it.
But then comes the crucial moment of honesty. Feynman does not pretend this method is good enough. With a time step of 0.10 seconds, the calculation is crude. To improve accuracy by brute force would require shrinking ε to something like 0.01 seconds - and that would mean ten times as many calculations for the same physical time span.
This is where Feynman’s instincts as a physicist shine. Instead of asking “How do we calculate more?”he asks “How do we calculate more intelligently?”
The problem with the naïve method is subtle but fundamental. When we write
x(t+ ε) = x(t) + ε v,
which velocity should we use?
• The velocity at the start of the interval?
• The velocity at the end?
• Or something in between?
Since the velocity is changing continuously, using either endpoint is guaranteed to be slightly wrong. The natural compromise - and Feynman’s “subtle improvement” - is to use the velocity halfway through the interval.
The same logic applies to acceleration when updating velocity.
This leads to the revised scheme:
x(t+ ε) = x(t) + ε, v(t+ε/2),
v(t+ε/2) = v(t-ε/2) + ε , a(t),
a(t) = -x(t).
What Feynman has quietly introduced here is a second-order accurate method, closely related to what is now called the leapfrog or midpoint integration scheme. Without naming it, he is teaching students one of the most important ideas in numerical dynamics: centre your approximations where the physics actually happens.
There is one remaining technical snag: the method requires velocities at half-time steps, but we are only given v(0).
Feynman’s fix is simple and physically motivated:
v(ε/2) = v(0) + (ε/2)a(0).
This is just a half-step update using the known initial acceleration. With this, the calculation can proceed cleanly.
Rather than emphasising equations, Feynman encourages organising the work into a table: time, position, acceleration, and velocities staggered between rows. The mathematics fades into the background; the motion itself becomes visible.
Once the table is filled in, Feynman does something characteristic: he interprets it.
The particle:
• starts from rest,
• accelerates towards the origin,
• gains speed rapidly at first,
• then more slowly as acceleration decreases,
• crosses x = 0 at about t = 1.5 seconds,
• overshoots, slows, and turns around.
Without ever solving the differential equation analytically, the essential physics of simple harmonic motion emerges directly from arithmetic.
Only afterwards does Feynman reveal the punchline: the exact solution is
x(t) = cos t.
When the numerical results are compared with cos t, the agreement is good to three significant figures - astonishingly accurate given the coarse time step of 0.10 seconds.
What makes this section so powerful is not the specific algorithm but the attitude it teaches:
1. Start with a simple method, even if it’s crude.
2. Diagnose where the error comes from, physically.
3. Improve the method without unnecessary complication.
4. Let the numbers tell the story of the motion.
5. Check against exact solutions when available, but don’t depend on them.
Feynman treats numerical analysis not as a branch of mathematics but as an extension of physical reasoning. Accuracy is not a matter of formalism alone; it comes from respecting how quantities change in time.
Today, computers perform billions of such steps per second, and sophisticated integrators are built into every simulation package. But Chapter 9-6 remains relevant because it teaches judgement. Feynman shows that numerical methods are not magic - they are approximations whose success depends on how thoughtfully they are constructed.
That such a modest calculation reproduces cos t so well is not just impressive. It is a quiet reminder that physics, done carefully, does not always need elegance to achieve truth - sometimes it just needs good timing.

Comments
Post a Comment