An approximation is useful when its supported accuracy matches the question. Estimating a slope, replacing a function by a Taylor polynomial and advancing a differential-equation solution introduce different errors. Extra digits in a display do not establish that those errors are small.
Error analysis identifies the target, assumptions and remaining discrepancy. It also explains why making every numerical step smaller is not always beneficial.
On this page
Define the comparison
Let be the exact mathematical target and its approximation. Signed error is and absolute error is . For , relative error is
If and , absolute error is and relative error is , or . Near a zero target, relative error can be large or undefined even when the absolute difference is small.
The exact target belongs to a mathematical model. A perfectly evaluated model may still describe reality poorly. Numerical and model error need different evidence.
Separate error sources
Truncation or discretization error comes from replacing a limiting process with a finite calculation. Roundoff comes from finite-precision representation and arithmetic. Data error comes from uncertain inputs. Model error comes from an imperfect description of the underlying process.
These contributions interact. Numerical differentiation amplifies sample errors by dividing a difference by a small step. A stable algebraic reformulation can reduce roundoff without changing the target.
Distinguish a proven bound under assumptions, a heuristic estimate and an observed error against a trusted reference. They do not warrant the same claims.
Bound a tangent-line approximation
For , the tangent line at four is
At , it gives . Since , its magnitude on is at most . Taylor’s bound yields
The exact value is approximately , so the observed error is about , below the bound. Concavity explains why the tangent approximation is high; a magnitude bound alone does not give its direction.
Include a Taylor remainder
The degree- Taylor polynomial about is
If the derivative of order is continuous on the interval joining and , with magnitude at most , then
The Taylor remainder reference states the theorem. The interval and derivative bound are part of the calculation.
For ,
The error is at most . Its observed value, approximately , is smaller. To guarantee correct rounding, check whether the entire certified interval rounds to the same value. A small tolerance does not settle rounding when that interval straddles a rounding boundary.
Balance step-size effects
For a central difference, suppose truncation error is bounded by and each sample has absolute error at most . A combined bound is
The first term decreases with a smaller step; the second increases. For positive and ,
With and , the bound-minimising step is approximately . This minimises the stipulated envelope, not necessarily the unknown actual error. Available sample positions, units and the assumptions behind still matter.
A smaller step eventually increases the total bound
Diagram explanation and exact data
The envelope h²+δ/h has its minimum at h=(δ/2)^(1/3), about 0.007937.
| h | truncation bound | data bound | sum |
|---|---|---|---|
| 0.001 | 0.000001 | 0.001 | 0.001001 |
| 0.01 | 0.0001 | 0.0001 | 0.0002 |
| 0.1 | 0.01 | 0.00001 | 0.01001 |
Remove a leading term by extrapolation
Suppose a valid error expansion is
Then , giving
For central differences of at two, and . The extrapolation equals twelve exactly because this cubic has no higher surviving error term.
Richardson extrapolation needs the assumed expansion and consistently computed values. Two meshes can miss the same feature, and extrapolation can amplify uncertain inputs. Without remainder control, identify a leading-order estimate as an estimate rather than a rigorous bound.
Avoid cancellation with equivalent algebra
For small , subtracts nearly equal values. Rationalisation gives
The second expression avoids that subtraction. For , cancellation yields only when . The latter expression additionally defines a continuous extension at zero with value .
Stable algebra does not silently change a domain. Distinguish equality on the original domain from an explicitly defined extension. It also does not remove uncertainty in the input or shortcomings in the model.
A residual is not a solution error
For , the exact solution is . At , the residual is
while the solution error is . Converting residual to solution error multiplies it by in this scale.
Conditioning concerns sensitivity of the mathematical problem to data changes. Stability concerns the numerical algorithm’s handling of those changes and roundoff. A stable algorithm cannot make an inherently sensitive problem insensitive.
Residuals are useful diagnostics, but their size must be interpreted through the problem’s scaling. A small residual alone is not a complete accuracy certificate.
Report what the calculation supports
Name the target, method, interval, step and assumptions behind any bound. Retain units and round once at the end. Distinguish an exact reference from another approximation.
When no rigorous bound is available, report refinement behaviour and supporting checks honestly. More elaborate computation does not justify stronger certainty by itself. The goal is to understand what the approximation supports, not to avoid approximation altogether.
Practice questions
- An exact value is two and an approximation is . Find absolute and relative errors.
- If a valid leading error is proportional to , what happens when is halved?
- Does a small equation residual alone guarantee a small solution error?
Check your answers
- Absolute error is ; relative error is , or .
- That leading contribution becomes one quarter as large. Data and roundoff contributions need not decrease.
- No. Conditioning and scale determine the relationship. The lesson’s equation has solution error one thousand times its residual.
Related topics
Numerical Differentiation and Numerical Integration supply finite formulas. Initial-Value Problems examines sensitivity, while Partial Derivatives extends local approximation to combined input changes.
