15.6 Error and Uncertainty Estimation in Numerical Root Finding#
We have alluded to ways of estimating the error of the root finding methods when discussing the precision of the results in {doc}’01-bisection’, {doc}’02-secant’ and {doc}’03-newton’. Note that here error (\(\epsilon\)) is defined as the difference between the numerical result and the actual value it is estimating and the absolute error is the absolute value of this. For these root finding methods the magnitude of the error is largely in our control by setting a tolerance, though there is a lower limit to this (either due to floating point precision or error / dispersion in the function being solved).
Estimating Error of the Bisection Method#
For the bisection method the final root estimate (\(x\)) is the midpoint of the final interval \([x_l, x_r]\) that is smaller than a given tolerance. Note that we know that the actual value of the root is contained in this final interval. The absolute error of the bisection method can be estimated as the half-width of the final interval:
which lets us re-define the interval as \([x - \epsilon, x + \epsilon]\).
Estimating Error of the Secant and Newton-Raphson Method#
The secant and Newton-Raphson methods make use of a recursion relation to produce the final root estimate (\(x_n\)) such that the difference between the final two root estimates (\(|x_n - x_{n-1}|\)) are less than the given tolerance. The absolute error for these methods can be estimated as:
Without further evaluations, we don’t know if the actual value of the root is less than or greater than the root estimate \(x_n\), so for general cases we can assume that the actual value of the root is contained within the interval \([x_n - \epsilon, x_n + \epsilon]\).
Estimating the Uncertainty of the Root Finding Methods#
We can use the error estimations discussed above to estimate the standard uncertainty of the (best approximation) of the root using a Type B evaluation. In each case we have constructed an error interval centered on the best approximation (\([x - \eplsilon, x + \epsilon]\)) in which we assume the actual root can be found. In general we don’t have enough insights to produce a probability distribution function for the actual root value in the error interval, so we can use a uniform / rectangular distribution. Thus, the standard uncertainty of the best-approximation of the root can be estimated as
using a rectangular probability distribution function.