Fi nd polynom roots using Newton-Raphson method

Hi all

I try to devellop an algorithm to find roots of any polynom using the Newton Raphson method

x = x - fx/f'x

for ex f(x) = x^5 -3^2 + 4

x = x - (x^5 -3^2 + 4) / (5*x^4 -6*x)

and repeat for each result of x until you get f(x) = 0

the problem is the method get only one solution according to the first x we choose

questions

which x to choose for xo ?

and how to know if the are another solution ?

Thanks in advance

Re: Fi nd polynom roots using Newton-Raphson method

I would probably begin here:

Descartes' rule of signs - Wikipedia, the free encyclopedia

The article gives links to other methods as well.

Re: Fi nd polynom roots using Newton-Raphson method

Usually, start by sketching a graph or, often better, graphs.

For this example, you could start by splitting into where and The graphs of and are both easy to sketch and the x coordinates of their points of intersection will be the the values of x for which (If you don't like this, your alternative is to sketch the graph of and look for intersections with the x-axis.)

A further point is that complex roots occur as conjugate pairs. That means that a fifth order equation like this will have either 1,3 or 5 real roots to go with either 4,2 or zero complex roots.

The graphs should show you that there is a single intersection to the left of the origin. You might have some doubt as to intersections to the right of the origin but substituting x = 1 and 2 should convince you that there aren't any.

Next is to try to come up with a suitable first approximation. Do this by substituting some (negative in this case) values for x and look for a pair of values for x where and cross over each other, or, oops in this case, they are equal to each other. Newton -Raphson is not needed for this example !