# Fi nd polynom roots using Newton-Raphson method

• Dec 7th 2012, 12:21 AM
shayw
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 ?
• Dec 7th 2012, 12:56 AM
MarkFL
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.
• Dec 7th 2012, 03:32 AM
BobP
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 $f(x)=x^{5}-3x^{2}+4$ into $f(x)=g(x)-h(x),$ where $g(x)=x^{5}$ and $h(x)=3x^{2}-4.$ The graphs of $y=g(x)$ and $y=h(x)$ are both easy to sketch and the x coordinates of their points of intersection will be the the values of x for which $f(x)=0.$ (If you don't like this, your alternative is to sketch the graph of $y=f(x)$ 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 $g(x)$ and $h(x)$ cross over each other, or, oops in this case, they are equal to each other. Newton -Raphson is not needed for this example !