Newton's Method

sh8485

New member
Joined
Apr 13, 2009
Messages
5
Use Newton's Method to find a zero of the polynomial f(x)= x^5-x+1 to three decimal places. Explain the choice for the starting value.

First of all,
f'(x)= 5x^4- 1


I did the graph and the point is -1.169

so -1.169 should be my x1.

-1.169- ( (-1.169)^5-(-1.169)+1/5(-1.169^4) -1 = -1.16730822

x2 should be -1.1673
-1.1673 - ((-1.1673)^5-(-1.1673)+1/ 5(-1.1673^4) -1 = -1.6729

x3 should be -1.16729

Am I doing it right?

Thanks
 
sh8485 said:
… Explain the choice for the starting value …

… I did the graph and the point is -1.169 so -1.169 should be my [starting value] …


That's not much of an explanation. :wink:

I'm wondering how you arrived at a starting value to the nearest thousandth of a unit.

I'm not sure what you viewed on your graph(s) of function f, but I re-plotted the function with a restricted domain of [-2, 0], after I saw what looked like an x-intercept between -2 and 0.

With the restricted domain, it's clear from my graph that the root is between -1.4 and -1.0, so I would have chosen either of these values for x1.

Choosing to start with -1.169 is certainly okay.

Overall, your work looks like you're applying Newton's Method correctly. I'll make some comments.

'
sh8485 said:
… -1.169- ( (-1.169)^5-(-1.169)+1/5(-1.169^4) -1 = -1.16730822 …


At this point, I would like to make a comment about the proper way to type mathematical expressions -- especially ratios where there's multiple terms and/or factors in either the numerator or denominator.

Use grouping symbols! (It appears that you might have started using the required parentheses, but got side-tracked.)

The following notation is unambiguous because it clearly shows what's in the numerator and what's in the denominator of the algebraic ratio.

-1.169 - [(-1.169)^5 - (-1.169) + 1]/[5(-1.169)^4 - 1]

Next, my result for this expression does not match yours.

You posted -1.16730822, and I get -1.167309482. (Since we're rounding, I'm thinking that this discrepancy doesn't really matter, but it's hard for me to ignore discrepancies because they indicate that something went wrong somewhere -- either with you or with me.)

We need to continue these iterations until the first three decimal places (rounded) stabilize, so I would feel more confident that round-off error will not affect results by carrying five decimal places (versus four) from iteration to iteration -- especially since we're rounding intermediate results.

'
sh8485 said:
… x2 should be -1.1673

-1.1673 - ((-1.1673)^5-(-1.1673)+1/ 5(-1.1673^4) -1 = -1.6729

x3 should be -1.16729 …


Properly typed, this is:

x3 = -1.1673 - [(-1.1673)^5 - (-1.1673) + 1]/[5(-1.1673)^4 - 1]

I'm going to assume that -1.6729 is a typographical error, since your next line reads -1.16729.

Again, I get a different result for x3, using -1.1673 for x2. I get -1.167303978.

Well, now look what's happened. The first three decimal places have stabilized from x1 to x3. So, we're done with only two iterations!

x = -1.167

Now, the reason we only needed two iterations to confirm the root to three decimal places is that you picked a very precise starting value. Again, I'm not sure how you picked a value so close to the actual x-intercept. (Perhaps, you zoomed in on your graph of f.)

Newton's Method is used to move from a "rough-guess" to an approximation accurate to however many decimal places we desire. If we begin by working hard to find a starting value that's very close to the actual root, then this work sort of defeats the purpose of using Newton's Method.

Maybe you're just savvy enough to avoid more iterations than absolutely necessary because you find the math tedious. :wink:

Since this method is review, for me, I'm going to show my work using my starting value of -1.4.

x1 = -1.4

x2 = -1.4 - [(-1.4)^5 + 1.4 + 1]/[5(-1.4)^4 - 1] = -1.23643

x3 = -1.23643 - [(-1.23643)^5 + 1.23643 + 1]/[5(-1.23643)^4 - 1] = -1.17530

x4 = -1.17530 - [(-1.17530)^5 + 1.17530 + 1]/[5(-1.17530)^4 - 1] = -1.16742

x5 = -1.16742 - [(-1.16742)^5 + 1.16742 + 1]/[5(-1.16742)^4 - 1] = -1.16730

That was fun. It only took an additional two iterations to confirm your result, after starting with a rough-guess of -1.4 versus a very good guess of -1.169.

The beauty of Newton's Method is that these iterations are so mechanical they make it easy to program computers to do the grunt work (several dozen iterations, if necessary, to obtain the desired precision).

The ugliness of Newton's Method is that it doesn't always work.

Cheers 8-)

 
sh8485 said:
Use Newton's Method to find a zero of the polynomial f(x)= x^5-x+1 to three decimal places. Explain the choice for the starting value.

First of all,
f'(x)= 5x^4- 1


I did the graph and the point is -1.169

so -1.169 should be my x1.

-1.169- ( (-1.169)^5-(-1.169)+1/5(-1.169^4) -1 = -1.16730822

x2 should be -1.1673
-1.1673 - ((-1.1673)^5-(-1.1673)+1/ 5(-1.1673^4) -1 = -1.6729

x3 should be -1.16729

Am I doing it right?

Thanks

The point of choosing starting point is that you need to avoid f'(x) = 0

and then bound your zero. Let's see

f(0) = 1

f(-1) = 1 <<<< sign of f(x) does not change

f(1) = 1<<<< sign of f(x) still does not change

f(-2) = - 29 <<<< did it

so we know f(x) = 0 happens somewhere between (-1) and (-2) - could have estimated that just by plotting. In case graphing is complicated or it is a multi-dimensional function - this is the way to estimete the starting point.In Newton method, convergence can become slow - so we start somewhere around the expected root.

Generally, rest of it I do it through excel (or some such spreadsheet program)

x1 = - 1.5 <<< we know that f'(x) does not become zero between f(-1) and f(-2)

x[sub:ky78xwah]1[/sub:ky78xwah] = -1.5 -------------------------- f(x1[sub:ky78xwah][/sub:ky78xwah]) =

Code:
xo	         f(xo)	           f'(xo)         xn = xo - f(xo)/f'(xo)
-1.5	         -5.09375	     24.3125	    -1.290488432
-1.290488432	-1.288584754	12.86712619	-1.190342934
-1.190342934	-0.199451206	9.038259024	-1.168275498
-1.168275498	-0.008062486	8.314318361	-1.167305787
-1.167305787	-1.49817E-05	8.283431955	-1.167303978
-1.167303978	-5.20297E-11	8.283374419	-1.167303978
-1.167303978	0	          8.283374419	-1.167303978
 
Top