The question is for a Matlab course and it is the following:
Study the order of convergence of Newton's method on the function $ g(x) = xe ^{x/2} -1 -x $ . Find the solution of accurate within $10^{-5}$, starting from $x_0 = 2.5$. Is it quadratic?
So I wrote a Matlab program for Newton's method. And it gave me an approximate root $x^*$ and the estimated error.
I'm having trouble understanding and applying the quadratic convergence definition.
My idea is to check $|x_{i-1}-x^*| / |x_{i}-x^*|^2$ in each step and see if its converging. Is that correct?
Yes that is correct and should result in
for the iteration formula in the title ($g(x)=...+x$) and
for the iteration as formulated in the text ($g(x)=...-x$).
Both nicely show quadratic convergence until the number of available digits runs out.