Errors
Numerical answers are approximate. If the exact value is x and the approximation is x̄, the absolute error is |x − x̄| and the relative error is |x − x̄| ÷ |x|. Round-off error arises from using a limited number of digits, and truncation error arises from cutting short a process such as a series.
The secant and Newton–Raphson methods
To solve f(x) = 0 when no formula is available, we start from a guess and improve it. The Newton–Raphson method uses the tangent at the guess:
Use Newton–Raphson on f(x) = x² − 2 with x₀ = 1.5.
- The iteration simplifies to xₙ₊₁ = (xₙ + 2/xₙ)/2.
- Next.
Answer: The root is 1.4142 after two steps; the value of √2 is 1.41421.
Choose a starting guess. Three Newton–Raphson steps are shown.
Numerical integration
When an integral cannot be found by formula, estimate the area under the curve with strips of width h. The trapezoidal rule uses trapeziums and Simpson’s rule uses parabolas (an even number of strips).
Estimate ∫₀¹ x² dx using 4 strips.
- h = 0.25; the y values are 0, 0.0625, 0.25, 0.5625, 1.
- Evaluate.
Answer: The estimate is 0.344; the exact value is 0.333. Simpson’s rule gives exactly 0.3333.
Key terms
- Absolute error
- The size of the difference from the exact value.
- Iteration
- Repeating a step to improve an estimate.
- Newton–Raphson
- A tangent-based root-finding method.
- Trapezoidal rule
- Area estimation using trapeziums.
Summary
- Errors can be absolute or relative.
- Newton–Raphson: xₙ₊₁ = xₙ − f/f′; the secant method needs no derivative.
- The trapezoidal rule and Simpson’s rule estimate integrals.
- Check by a second method or a smaller step.