the modified equation
You wrote a scheme to solve one PDE, but because of truncation error the scheme actually solves a slightly different PDE — more faithfully than it solves the one you wanted. The modified equation is that 'PDE the scheme is really solving': the original equation plus extra terms that capture exactly how the discretization distorts things. It is the single most illuminating diagnostic for understanding a scheme's character.
Here is the construction. Take your difference scheme and Taylor-expand every term about a single point, keeping not just the leading error but the next term or two. Then systematically use the equation itself to convert any leftover time derivatives into space derivatives (since, e.g., u_tt can be re-expressed via the PDE). What remains is the original PDE with appended derivative terms: u_t + a u_x = b2 u_xx + b3 u_xxx + b4 u_xxxx + ..., where the coefficients b depend on dt, h, and the wave speed. Now read off the personality: an even-derivative term like b2 u_xx (with b2 > 0) is dissipation — it smooths and is numerical diffusion; an odd-derivative term like b3 u_xxx is dispersion — it makes different wavelengths travel at different speeds, producing trailing oscillations. The sign and size of the leading b tell you instantly whether a scheme will smear, oscillate, or (if b2 < 0) be unstable.
This is why the modified equation is so prized: it explains, in the honest language of PDEs, why low-order upwind schemes are diffusive, why Lax–Wendroff (whose leading error is third-order) is dispersive and rings near shocks, and why a scheme with a negative even-derivative coefficient blows up — anti-diffusion is instability. It connects the discrete world back to a continuous one you already understand. The caveat: it is a formal asymptotic tool (an expansion valid as the mesh is refined), not a rigorous proof of behaviour, and the series should not be pushed too far.
First-order upwind for u_t + a u_x = 0 has modified equation u_t + a u_x = (a h/2)(1 - c) u_xx + ... — a pure even-derivative term, so it is diffusive. Lax–Wendroff instead has leading error proportional to u_xxx — an odd-derivative term, so it is dispersive and produces trailing wiggles behind a sharp front.
Even-derivative error means diffusion; odd-derivative error means dispersion.
If the leading even-derivative coefficient comes out NEGATIVE, the modified equation is a backward diffusion — ill-posed and explosively unstable. A negative b2 is a red flag that the scheme is unstable, matching what von Neumann analysis says.