Homework Help: Newton method

1. Dec 19, 2009

sara_87

1. The problem statement, all variables and given/known data

I read that the newton method for finding roots of an equation doesnt always work.
How do I know whether it works or not for a given equation?

2. Relevant equations

3. The attempt at a solution
For an example, consider:

f(x) = 1/(x2-1)+1/(x2-4) - x-1

When I try to solve this using programming, I get 2.9642 for some initial guesses but if I put the initial guess as, say, 5 I get that the root is -inf

I dont understand why.
And also for other examples I either get x=0 after 0 steps (in the newton method) or I get x=inf.

Thank you

2. Dec 19, 2009

Integral

Staff Emeritus
You need to have

$$\abs {f'(x)} <= 1$$ in the neighborhood of your guess and the solution. A local extreme between the 2 could also cause troubles.

3. Dec 20, 2009

sara_87

I don't understand. What do you mean 'A local extreme between the 2 could also cause troubles' ?

Thank you

4. Dec 20, 2009

HallsofIvy

At a local extremum (maximum or minimum) the derivative is 0. Since Newton's method involves dividing by 0, it one of your iterations happens to give you that value, there's an obvious problem!

5. Dec 20, 2009

sara_87

Oh so if the value gives infinity, this means that there is a problem. How do I avoid this problem.
In general, for a given function, how do I know whether I can implement the Newton Method?

6. Dec 20, 2009

HallsofIvy

As integral said, you need to know that f'(x)< 1 in some neighborhood of of the root, that f'(x) is NOT 0 in that neighborhood, and that your starting value is inside that neighborhood. Frankly, most of the time, the best thing to do is to "try and see what happens".

7. Dec 20, 2009

Bohrok

You would have to look at a graph of the function to see where your initial guess will take you with Newton's Method. In your case, at your initial guess x1=5, the slope of the tangent line of your function is -13/352800 and just below the x-axis. This will make x2 far to the left in negative x values and each subsequent approximation will further diverge to negative infinity.

http://en.wikipedia.org/wiki/Newton%27s_method" [Broken] might help you out with some good examples of where you can run into trouble with Newton's Method.

Last edited by a moderator: May 4, 2017