Newton's Raphson method - Absolute error

1.2k Views Asked by At

Can someone explain to me how the '$e_k$' section is evaluated? I know that the absolute error is $|x - x_n|$ but I can't understand how this values came up.

enter image description here

1

There are 1 best solutions below

2
On BEST ANSWER

Yes, that is strange, especially as that presumed error does not go to zero while the iteration visibly converges. In general when the Newton iteration is in its quadratically convergent phase, the step length $|x_{n+1}-x_n|$ is a good proxy for for the error $e_n=|x_n-x_*|$. Using that for a reconstruction of the table via a script

f=lambda x: x**3-3*x+2
df=lambda x: 3*(x**2-1)
x=0; e=1;
for k in range(20):
    x0, x = x, x-f(x)/df(x);
    e0, e = e, abs(x-x0);
    print("%3d & %.15f & %.6e & %.6e & %.6f \\\\"%(k, x0, f(x0), e, e/e0))

gives as output

\begin{array}{lllll} \hline k&x_k&f(x_k)&e_k&e_k/e_{k-1}^1\\ \hline 0 & 0.000000000000000 & 2.000000e+00 & 6.666667e-01 & 0.666667 \\ 1 & 0.666666666666667 & 2.962963e-01 & 1.777778e-01 & 0.266667 \\ 2 & 0.844444444444444 & 6.882853e-02 & 7.996430e-02 & 0.449799 \\ 3 & 0.924408746095493 & 1.671018e-02 & 3.829050e-02 & 0.478845 \\ 4 & 0.962699246921644 & 4.122140e-03 & 1.876853e-02 & 0.490161 \\ 5 & 0.981467772499906 & 1.023966e-03 & 9.295002e-03 & 0.495244 \\ 6 & 0.990762774217152 & 2.551908e-04 & 4.625756e-03 & 0.497661 \\ 7 & 0.995388530630080 & 6.369888e-05 & 2.307511e-03 & 0.498840 \\ 8 & 0.997696041548041 & 1.591244e-05 & 1.152422e-03 & 0.499422 \\ 9 & 0.998848463636218 & 3.976581e-06 & 5.758787e-04 & 0.499712 \\ 10 & 0.999424342384743 & 9.939543e-07 & 2.878564e-04 & 0.499856 \\ 11 & 0.999712198815501 & 2.484647e-07 & 1.439075e-04 & 0.499928 \\ 12 & 0.999856106311234 & 6.211320e-08 & 7.194857e-05 & 0.499964 \\ 13 & 0.999928054881270 & 1.552793e-08 & 3.597299e-05 & 0.499982 \\ 14 & 0.999964027872790 & 3.881935e-09 & 1.798617e-05 & 0.499991 \\ 15 & 0.999982014044032 & 9.704779e-10 & 8.993004e-06 & 0.499995 \\ 16 & 0.999991007048069 & 2.426188e-10 & 4.496482e-06 & 0.499998 \\ 17 & 0.999995503530551 & 6.065481e-11 & 2.248244e-06 & 0.500001 \\ 18 & 0.999997751774110 & 1.516343e-11 & 1.124104e-06 & 0.499992 \\ 19 & 0.999998875878467 & 3.790968e-12 & 5.620640e-07 & 0.500011 \\ \hline \end{array}

This is the typical behavior at a root of multiplicity $2$.