# Newton-Raphson Method

just want somebody to help me verify if I'm doing using Newton-Raphson method correctly by checking the result of an equation.

$f(x) = e^{x-1} + x^2 - 7$

I'm trying to find the zero of f(x) with initial guess $x_0 = 1.5$, and by applying the method TWICE, I got result 2.0466.

• I’d run the process once more to see if the new value of $f(x)$ is really tiny, as it should be. – Lubin Sep 16 '13 at 18:45
• I agree, but did you get 2.0466 after 2 iterations as well? – Vol_Smile Sep 16 '13 at 18:46
• @Stefan4024: Thanks for the beautification:) – Vol_Smile Sep 16 '13 at 18:49
• Sorry, I just substituted into $f$ to see that the value was moderately small. I did not run the process (too lazy!). – Lubin Sep 16 '13 at 18:51
• No worries, point taken! – Vol_Smile Sep 16 '13 at 19:02

Your answer is almost correct. You have a rounding error. Try not to round the previous approximations. Use the "answer-key" on your calculator to store the exact answer. Only round at the very end. The correct answer is $2.0467$ to three decimal places.

The recurrence relation is given by $$x_{n+1} = x_n - \frac{\operatorname{f}(x_n)}{\operatorname{f}'(x_n)}$$ In your case $\operatorname{f}'(x) = \operatorname{e}^{x-1}+2x$ and so $$x_{n+1} = x_n - \frac{\operatorname{e}^{x_n-1}+x_n^2-7}{\operatorname{e}^{x_n-1}+2x_n}$$

If $x_0 = 1.5$ then

$$x_1 = 1.5 - \frac{\operatorname{e}^{0.5}+1.5^2-7}{\operatorname{e}^{0.5}+3} \approx 2.167$$

If $x_1 = 2.167...$ then

$$x_2 = 2.167... - \frac{\operatorname{e}^{1.167...}+(2.167...)^2-7}{\operatorname{e}^{1.167...}+3} \approx 2.0466567$$

• great, that's exactly what I have on my board,thanks a lot! – Vol_Smile Sep 16 '13 at 18:51
• @Vol_Smile No worries. I'm glad I could help. – Fly by Night Sep 16 '13 at 18:54