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 using the first 3 terms of its Maclaurin series. Then find the round-off error from storing with 4 significant digits.
Solution Reveal Hide
Truncation error
The exact value is , so
Adding the next term shrinks the error to .
Round-off error
is stored as .
Squaring the stored value gives
so the representation error of becomes an error of in the result.