Choosing an Initial Term for the Newton-Raphson Method: Tips and Tricks

  • Thread starter Thread starter Schrodinger's Dog
  • Start date Start date
  • Tags Tags
    Method
Schrodinger's Dog
Messages
835
Reaction score
7

Homework Statement



Using the Newton Raphson formula to calculate a solution for

x^2-8cos(x)

Homework Equations



x_n+1=x_n-\frac{f(x_n)}{f'(x_n)}(n=0,1,2,3)

The Attempt at a Solution



I get

x_n-\frac{x^2-8cos(x)}{2x+8sin(x)}

Fine but how do I chose an initial term x_0=? 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 :rolleyes:
 
Last edited:
Physics news on Phys.org
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 x^2 and 8\cos(x)

Graphs are also good to see if a solution exists!
 
Last edited:
I would just pick a number between 0 and 2\pi.

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.
 
Schrodinger's Dog said:

Homework Statement



Using the Newton Raphson formula to calculate a solution for

x^2-8cos(x)

Homework Equations



x_n+1=x_n-\frac{f(x_n)}{f'(x_n)}(n=0,1,2,3)


The Attempt at a Solution



I get

\frac{x^2-8cos(x)}{2x+8sin(x)}

Fine but how do I chose an initial term x_0=? 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 :rolleyes:


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.
 
Wow that was a quick answer, thanks. :smile: I don't know how your supposed to just divine that at random; sometimes I wish textbooks 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:

Integral said:
I would just pick a number between 0 and 2\pi.

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

Ill try \pi see what I get.

EDIT.

I used 2 and got the answer 2.0859345838069 after 5 iterations. Thanks guys, this agrees with the answer I expected :smile:
 
Last edited:
Schrodinger's Dog said:
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

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.

I used 2 and got the answer 2.0859345838069 after 5 iterations. Thanks guys, this agrees with the answer I expected

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

--
Chusslove Illich (Часлав Илић)
 
caslav.ilic said:
Hm, if the function is as stated orginally, x^2 - 8\cos x, then the solution near to 2 should be about 1.343.

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.
 
Back
Top