Introduction to Numerical Methods

Numerical methods are algorithms that produce approximate numerical solutions to mathematical problems, used when an exact analytical solution doesn’t exist or is too costly to compute.

Sources of Error

Round-Off Error

The error from representing real numbers with finite precision on a computer.

Arises because most real numbers can’t be stored exactly in a fixed number of digits, so every arithmetic operation carries a small representation error.

Truncation Error

The error from approximating an infinite or continuous process with a finite one.

Arises when a method replaces an exact mathematical operation, such as a limit, an infinite series, or a derivative, with a finite approximation.

Worked Example

Approximate e0.5e^{0.5} using the first 3 terms of its Maclaurin series. Then find the round-off error from storing 2\sqrt{2} with 4 significant digits.

Solution Reveal Hide

Truncation error

e0.5≈1+0.5+0.522!=1.625e^{0.5} \approx 1 + 0.5 + \frac{0.5^2}{2!} = 1.625

The exact value is e0.5=1.64872e^{0.5} = 1.64872, so

Etrunc=1.64872−1.625=0.02372E_{\text{trunc}} = 1.64872 - 1.625 = 0.02372

Adding the next term 0.533!=0.02083\dfrac{0.5^3}{3!} = 0.02083 shrinks the error to 0.002890.00289.

Round-off error

2=1.41421…\sqrt{2} = 1.41421\ldots is stored as 1.4141.414.

Eround=∣2−1.414∣=0.00021E_{\text{round}} = |\sqrt{2} - 1.414| = 0.00021

Squaring the stored value gives

1.4142=1.9993961.414^2 = 1.999396

so the representation error of 0.000210.00021 becomes an error of 6.04×10−46.04 \times 10^{-4} in the result.

Wolfram Mathematica notebook

The summary notebook defines every function used in this module, with documentation and no examples, as a starting point for your own problems.

Written by October 20, 2026 1 min read
Was this helpful?