My question is: How I can get the formula?
From the definition, the only thing I obtained was that $q \approx \frac{\log |\frac{x_{k+1}- L}{x_k-L}|}{\log |\frac{x_{k}-L}{x_{k-1}-L}|}$. How I can continue from here?
Edit:
A more concise explanation of what I've done:
So. Let $\{x_n\}_{n\geq1} \subset \mathbb{R}$ an approximation sequence for $x^*\in\mathbb{R}, x_n \xrightarrow{n \to \infty} x^*$. If $\exists c > 0 $ such that $\lim\limits_{n \to \infty} \frac{|x^* - x_n|}{|x^* - x_{n-1}|^r}= c \,\,(1) \implies$ order of convergence is $r$ and rate of convergence is $c$.
Let $e_n := x_n - x^*$. Because $x_n \xrightarrow{n\to\infty} x^* \implies e_n \xrightarrow{n\to\infty} 0 \implies (1)$ is equivalent to $\exists c > 0$ such that $\lim\limits_{n \to \infty} \frac{|e_n|}{|e_{n-1}|^r}= c$.
When $n \to \infty$ we have $|e_n| \approx c |e_{n-1}|^r$ and $|e_{n-1}| \approx c |e_{n-2}|^r$, so when $n \to \infty$ we have $|\frac{e_n}{e_{n-1}}| \approx |\frac{e_{n-1}}{e_{n-2}}|^r \implies r \approx \frac{\log{|\frac{e_n}{e_{n-1}}}|}{\log{|\frac{e_{n-1}}{e_{n-2}}}|} \implies r \approx \frac{\log{|\frac{x^* - x_n}{x^*-x_{n-1}}}|}{\log{|\frac{x*-x_{n-1}}{x^*-x_{n-2}}}|}$
But, when $n \to \infty$ we have that $|x^* - x_n| \approx |x_{n+1}-x_{n}|$ (because from $x_n \xrightarrow{n \to \infty} x^*$ we have that $\forall \epsilon > 0 \exists n_\epsilon \in \mathbb{N}$ such that $\forall n \in \mathbb{N}, n \geq n_\epsilon : |x_n - x^*| < \epsilon \implies \forall \epsilon > 0 $ we have $||x^* - x_n| - |x_{n+1} - x_n|| \leq |x^* - x_n - x_{n+1} + x_n| = |x^* - x_{n+1}| < \epsilon$).
This implies $r \approx \frac{\log{|\frac{x_{n+1} - x_n}{x_n-x_{n-1}}}|}{\log{|\frac{x_n-x_{n-1}}{x_{n-1}-x_{n-2}}}|}$ and $c \approx \frac{|x_{n+1} - x_n|}{|x_n - x{n-1}|^r}$.
Is something good here or it's messed up totally?

doubleorfloat64the Newton method usually has 3-5 iterates in the quadratic mode before no further advances are made. Use multi-precision – Lutz Lehmann Oct 09 '23 at 18:04