Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 8 Online
OpenStudy (anonymous):

I am doing the newton's method homework. are we supposed to be able to find non-real roots?

OpenStudy (anonymous):

Newton's method won't find complex roots, unless by some strange coincidence. Think about it this way, the derivative of a polynomial is a polynomial. There is no way for a polynomial divided by a polynomial to return a complex number.

OpenStudy (anonymous):

Thanks. I am just checking. Just spent an hour trying to figure out why my code wouldn't find the roots when I realized there were no real ones (I put in x^2+2x+3).

OpenStudy (anonymous):

I'm guessing you will have a max number of iterations to prevent infinite loops.

OpenStudy (anonymous):

I tried a few iterations and it looked like it was doing what it was supposed to. Then I put a while f(x)>epsilon loop that kept going so I tried to trouble shoot with a for loop with ever growing repetitions (first 10 then 100 then 1000 and so on) but it never seemed to getting closer to one value. I did some research and most 2 degree polynomials got a close root in less than 10 iterations. Oh well...

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
Arriyanalol: i need help
2 days ago 7 Replies 1 Medal
Arriyanalol: CONGRATS to me
2 days ago 8 Replies 2 Medals
Legomaster346: What colleges are good that are near Arab Alabama?
1 week ago 5 Replies 0 Medals
Arriyanalol: i need help
1 week ago 6 Replies 2 Medals
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!