Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Newton-Raphson method

  1. Jul 11, 2007 #1
    1. The problem statement, all variables and given/known data

    Using the Newton Raphson formula to calculate a solution for


    2. Relevant equations


    3. The attempt at a solution

    I get


    Fine but how do I chose an initial term [itex]x_0=?[/itex] the book does not tell me why it has chosen the initial term in its singular example, and since it appears to be random or arbitrary :uhh:
    Last edited: Jul 11, 2007
  2. jcsd
  3. Jul 11, 2007 #2


    User Avatar

    I think the initial guess is just that... a guess.

    However, it can be an educated guess -- eg. from a previously computed value if a parameter is allowed to vary, or in your case from looking at the intersection of the graphs [tex]x^2[/tex] and [tex]8\cos(x)[/tex]

    Graphs are also good to see if a solution exists!
    Last edited: Jul 11, 2007
  4. Jul 11, 2007 #3


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    I would just pick a number between 0 and 2[itex] \pi [/itex].

    Or you could try graphing the original function, use the graph to find some approximate roots.

    Newtons method is pretty robust, in can bring in a wild guess quickly.
  5. Jul 11, 2007 #4

    Plot y=f(x) on a graph, and pick an integer starting point near to the root. The method will then usually converge, but it doesn't always work, eg, when it crosses asymptotes etc.
  6. Jul 11, 2007 #5
    Wow that was a quick answer, thanks. :smile: I don't know how your supposed to just divine that at random; sometimes I wish text books would actually show what they have done in detail, after all I bloody have to or they dock marks :biggrin: generally the course material is excellent but every now and again they expect you to be psychic :rolleyes:

    I suppose it would logically make sense the answer would be between this range.

    Ill try [itex]\pi[/itex] see what I get.


    I used 2 and got the answer 2.0859345838069 after 5 iterations. Thanks guys, this agrees with the answer I expected :smile:
    Last edited: Jul 11, 2007
  7. Jul 11, 2007 #6
    It doesn't tell because it can't -- choosing the initial point is the sore spot of Newton's method, giving rise to many other methods which precisely try to circumvent that problem.

    For the Newton method to provably converge to a solution, the first derivative of the function has to be positive (or negative) and monotonically decreasing (or increasing) all the way between the initial guess and that solution.

    So, one way to choose initial point is to look at the graph and pick a point from which the function "nicely" slopes down to zero.

    Hm, if the function is as stated orginally, [tex]x^2 - 8\cos x[/tex], then the solution near to 2 should be about 1.343.

    Chusslove Illich (Часлав Илић)
  8. Jul 11, 2007 #7
    Don't worry about it I was doing a different question there, and you weren't to know that :smile: yes for the original problem I get that also.

    to be honest they don't even give any pointers as you have just done ie looking for a value that slopes to zero from the graph, so your pretty much in the dark, obviously people are expected to know what they are looking for, but I didn't.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook