Round-off error arises from representing numbers and carrying out arithmetic at finite precision: storing or subtracting nearly equal numbers can lose information even when the mathematical algorithm is exact. Truncation error arises from replacing a continuous or infinite mathematical operation by a finite approximation, such as discarding higher Taylor series terms in a finite difference. Refining a grid usually reduces truncation error but may increase accumulated round-off error; the two have different origins.
Write , and . Insert a smooth exact heat equation solution into the Crank-Nicolson method. Expanding about the midpoint gives
Thus the residual, defined as left side minus right side, is
Since implies ,
This proves second-order numerical consistency in both space and time. About the old time level, uncombined Taylor remainders can include ; the midpoint expression displays the symmetric leading errors most cleanly. Multiplying by gives the one-step defect . Stable evolution with suitable initial and boundary data then gives global error ; consistency alone does not prove global convergence.
For balanced global error , a method second order in both variables can take and . With work per time step in one spatial dimension, its cost scales as . A method second order in space but first order in time instead needs , so its cost is under the same per-step cost assumption. Equivalently at fixed , using rather than needs about more steps. A restrictive stability condition or different linear-solver cost can dominate these accuracy-based estimates.
Use a smooth exact solution such as on a domain with matching boundary conditions, and compare numerical and exact values at a fixed physical time. To measure spatial order, halve while making temporal error negligible; the error norm should fall by a factor of four. To measure temporal order, halve on a sufficiently fine fixed spatial grid and again expect a factor of four. Report observed order and use several refinements to identify the asymptotic regime.
Check more than one smooth mode, boundary implementation and expected conservation or decay properties. A manufactured solution with an added known source can test nontrivial boundaries and forcing. Repeat in maximum and root-mean-square norms, stop before finite-precision or solver tolerances dominate, and separate stability failures from errors in convergence order. A single small error or a single visually smooth solution does not establish accuracy.
Let the step be . Forward Euler method gives , . Applying the same map with gives , which generally differs from . It is therefore not its own inverse under time reversal.
A kick–drift–kick leapfrog integrator instead has
The step first recovers , then , then , so . This assumes a position-dependent force and the same fixed step. Newtonian mechanics is reversible; respecting that structure helps avoid artificial directional bias and often improves long-term qualitative behaviour. The usual leapfrog also has a structure preserving symplectic geometry, which supports bounded oscillatory energy error, but reversibility by itself does not imply exact conservation of energy. Adaptive stepping requires special care to preserve these properties.
For a second-order scalar partial differential equation, classification refers to its principal second-derivative form. An elliptic partial differential equation has a definite principal form, exemplified by Poisson's equation; it typically determines a spatial field from boundary data. A parabolic partial differential equation has a distinguished first-order evolution direction and diffusive second spatial derivatives, exemplified by . Its initial data relax or spread with time. Thus the pseudo-time equation is parabolic, while its steady-state spatial equation is elliptic.
At a steady state in pseudo-time, and the evolution becomes , the desired Poisson equation. Deviations from a steady solution obey a diffusion equation, so nonconstant error modes decay. This turns an elliptic boundary-value solve into repeated relaxation steps using familiar time-evolution methods. Boundary data and source compatibility still matter; pseudo-time does not remove a nonexistent steady solution.
A backward Euler method with spatial second-order central differences gives
The source is fixed in pseudo-time; if it were evolving, its evaluation would also need specifying. Each pseudo-time step therefore requires a linear system solve rather than a purely local explicit update.
Let and impose periodic indices modulo . With , the linear system is
where shifts one grid cell cyclically. For , has diagonal , adjacent and corner entries , and all other entries zero. It is a cyclic tridiagonal matrix, rather than a nonperiodic tridiagonal one.
The periodic Laplacian annihilates the constant vector, so its steady equation requires . A strictly positive gravitational density violates this condition: summing the update gives , an indefinitely drifting mean. Periodic gravitational calculations normally solve for and fix the arbitrary mean gravitational potential. The per-step matrix itself remains invertible; the issue is existence of a periodic steady solution of Poisson's equation.
For an error Fourier mode , the periodic discrete Laplacian has eigenvalue . The Backward Euler method therefore has amplification factor
von Neumann stability analysis thus imposes no upper limit on positive . The constant mode has and is not damped; compatible forcing and a gauge condition remain necessary as discussed in part (e). Large steps can accelerate relaxation of nonconstant modes, but require a suitably accurate linear solver and can worsen its conditioning. Unconditional linear stability is not a statement about time accuracy or cost.
Put and . Then
The second row is the original damped harmonic oscillator equation and the first row defines the auxiliary velocity. This converts a second-order ordinary differential equation into two first-order equations without changing the required two initial values.
A numerical evolution has numerical stability if small perturbations in initial data, forcing or arithmetic are not amplified without control over the time interval of interest. For this constant-coefficient decaying linear system, an absolute-stability test requires the homogeneous numerical amplification factors to have magnitude at most one, with no growing Jordan-block contribution on the unit circle. Stability is distinct from accuracy: a strongly overdamped numerical solution can be stable while representing the physical oscillation poorly.
The characteristic polynomial is . Since ,
Forward Euler method has amplification eigenvalues . Their squared modulus is
Thus
Strict inequality gives numerical damping; at the upper boundary the amplitude is constant despite physical decay, so that boundary is a poor accuracy choice. In the undamped limit , for every : forward Euler method is unstable for any nonzero step on an undamped harmonic oscillator.
Backward Euler method has update and amplification eigenvalues . Hence
for every . It is therefore unconditionally stable for this linear system. Even with , it damps every nonzero numerical mode: stability is obtained at the cost of artificial damping and phase error. Large does not accurately resolve the oscillation period.
An explicit numerical method normally has a simple, inexpensive step and needs no simultaneous solve, but stability can force very small steps, especially for stiff differential equations. An implicit numerical method requires a linear or nonlinear solve, storage and suitable solver tolerances; its larger stability region can permit larger steps when stability is the main restriction. Accuracy, phase fidelity and preservation of physical structure still constrain the step. For this oscillator, backward Euler method is stable but dissipative, while forward Euler method is cheap but unstable without damping. Neither statement makes all implicit methods superior to all explicit ones; method order, problem structure and total cost determine the useful choice.

Articles by others on the same topic (0)

There are currently no matching articles.