# How to select convergence criterion in numerical analysis?

When doing old exams in basic numerical analysis, I encountered this problem:

Solution proposal from lecturer:

My idea was to select $|f(x)| \le 0.5 \times 10^{-5}$ as the convergence criterion. With this criterion, $x=0.652910$ would have been accepted as a root. When looking at the solution, it seems like the convergence criterion is way smaller.

What is the correct way of selecting convergence criterion using the Bisection, Newton-Raphson or Fixed-Point Iterative method for the given problem?

• If you want to prove that you have the root to $n$ digits I would choose bisection as it's very easy to know exactly when to stop. The usual stopping criterions for Newtons method ($|f(x_n)| < \epsilon$ or $|x_{n} - x_{n-1}| < \epsilon$ etc.) does not really give any precise information about the actual error (and there is not a general relation between $\epsilon$ and the number of digits). – Winther Feb 19 '18 at 14:30
• You error bound would be correct for 5 digits, to get certainty in the 6th digit you want 0.5e-6, to round correctly you also need the 7th digit relatively correct. – LutzL Feb 19 '18 at 15:22

You are asked to find $r$ to 6 decimals, but your proposal only ensures that $f(r)$ is correct to 6 decimals. You are calculating successive approximations to $r$ ($x_0,x_1,\cdots$). Plot $x_i$ vs. $i$: you should be able to see it converge, and identify a point beyond which you are confident that you have approximated the limit value to 6 decimal points.
I don't know why you select function-value as a criterion, it's quite obvious the output is root. So, we iterate with criterion for roots, x, because the output values have fluctuating roots. Therefore, we need to use absolute error or relative error for root. $$\text{Abs. Error : }|x_{i+1}-x_i|$$ $$\text{Rel. Error : }\left|\frac{x_{i+1}-x_i}{x_i}\right|$$ Moreover, the problem requires 10^-6 tolerance, it means Abs. Error has the value less than 10^-6.