1
$\begingroup$

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.

Could somebody please help me verify my answer is correct?

Thanks in advance.

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

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$$

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.