I was asked to calculate the relative and absolute precision of my implementation of Newton's method and I wanted to make sure I understand it correctly.
According to the method:
$$x_{n+1} = x_n - \frac{f(x_n)}{f'(x_n)}$$
So if I understand correctly:
- Absolute error is $\frac{|f(x_n)|}{|f'(x_n)|}$
- Relative error is $\frac{|x_{n+1}|}{|x_n|}$
Is that correct?
If:
$x_{\infty}$ is precise value you want to find
$x_{n+1}$ your best approximation
then absolute error $\epsilon$ will be :
$$\epsilon = | x_{\infty} - x_{n+1}|$$
and relative error $\eta$ will be:
$$ \eta = \frac{\epsilon}{|x_{\infty}|}$$