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

For problem set #2 Newton's Method, I'm confused about two things: 1. After the initial guess does the step size increase by epsilon? 2. If I wanted to use a bisection search algorithm to speed up the program I don't know how to determine the upper bound of the search space. Thanks

OpenStudy (anonymous):

In reply to question 1, after your initial guess, you need to calculate a new guess based on "Newton's Method." Or \[x_{1}=x_{0} - (f(x_{0}) \div f \prime(x_{0}))\] Then you check the new \[x_{n}\] to see if it's within some epsilon of zero. If it isn't, calculate it again, check again, etc. I just got mine to work about an hour ago. As for question #2, I don't know. I thought about trying to optimize my code, but then got caught up in this hangman game.....

OpenStudy (anonymous):

I guess to clarify, you need to check your initial guess first to see if it's within some epsilon of zero, then calculate the new \[x_{1}\]...

OpenStudy (anonymous):

Newtons Method of successive approximation is an optimization. Binomial search may not work for finding the root of a polynomial - the search space isn't bounded - you'ld have to start making guesses then decide if the guess could be used as an upper or lower bound then you'ld have to find an opposite bound.

OpenStudy (anonymous):

Thanks to you both. I was able to get the code to run correctly.

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!
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!