Newton's Method for Root Finding - Infinite Loop

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
8 replies · 6K views
Scootertaj
Messages
97
Reaction score
0
1. Construct a function f (x) so that Newton's method gets 'hanging' in an infinite cycle xn = (-1)n x0 , no matter how the
start value x0 is chosen.




2. Homework Equations :
xn+1 = xn - f(xn) / f'(xn)



The Attempt at a Solution


xn+1 = xn - f(xn) / f'(xn) = (-1)n+1x0 = (-1)nx0 - f(xn) / f'(xn) [itex]\Rightarrow[/itex] f(xn) / f'(xn) = 2(-1)nx0
But, I don't know if that's what I want to do or what to do with it.

Any ideas?
 
Physics news on Phys.org
Ah, so you would get f(x) / f'(x) = 1/2x [itex]\Rightarrow[/itex] f'(x) = 1/2x * f(x) [itex]\Rightarrow[/itex] f(x) = e[itex]\int[/itex] 1/2x[itex]\Rightarrow[/itex] f(x) = [itex]\sqrt{x}[/itex] ?
 
Last edited:
Dick, you're right that worked perfectly. I had it wrong at first since I had f(x) = e-[itex]\int 1/2x[/itex] but we get the double negative and thus get f(x) = e[itex]\int 1/2x[/itex]

Thank you!
 
Scootertaj said:
Dick, you're right that worked perfectly. I had it wrong at first since I had f(x) = e-[itex]\int 1/2x[/itex] but we get the double negative and thus get f(x) = e[itex]\int 1/2x[/itex]

Thank you!

Good! You'll also need to think a little about how to define f(x) for x<0. But drawing a picture should make that pretty clear.
 
Would sqrt(|x|) work?
 
Hmm, if you don't mind, what were you thinking of?
 
Scootertaj said:
Hmm, if you don't mind, what were you thinking of?

sqrt(x) for x>=0, -sqrt(-x) for x<0. The graph looks a little 'smoother'. But I don't think there's anything wrong with sqrt(|x|) either.