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

  • Thread starter Schrodinger's Dog
  • Start date
  • Tags
    Method
In summary, the Newton Raphson equation can be used to calculate a solution to a problem, but the method can be circumvented if the first derivative of the function is positive and monotonically decreasing all the way between the initial guess and the solution.
  • #1
Schrodinger's Dog
835
7

Homework Statement



Using the Newton Raphson formula to calculate a solution for

[tex]x^2-8cos(x)[/tex]

Homework Equations



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

The Attempt at a Solution



I get

[tex]x_n-\frac{x^2-8cos(x)}{2x+8sin(x)}[/tex]

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:
Physics news on Phys.org
  • #2
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:
  • #3
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.
 
  • #4
Schrodinger's Dog said:

Homework Statement



Using the Newton Raphson formula to calculate a solution for

[tex]x^2-8cos(x)[/tex]

Homework Equations



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


The Attempt at a Solution



I get

[tex]\frac{x^2-8cos(x)}{2x+8sin(x)}[/tex]

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:


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.
 
  • #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 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[itex] \pi [/itex].

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

Ill try [itex]\pi[/itex] 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:
  • #6
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, [tex]x^2 - 8\cos x[/tex], then the solution near to 2 should be about 1.343.

--
Chusslove Illich (Часлав Илић)
 
  • #7
caslav.ilic said:
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.

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.
 

What is the Newton-Raphson method?

The Newton-Raphson method is a numerical algorithm used to find the root of a differentiable function. It is also known as the Newton's method or the Newton's iterative method.

How does the Newton-Raphson method work?

The method works by making an initial guess for the root and then using the derivative of the function to iteratively refine the guess until it converges to the actual root. It uses the tangent line of the function at the current guess to make a better approximation of the root.

What are the advantages of using the Newton-Raphson method?

One of the main advantages of this method is that it is very efficient and can converge to the root quickly, especially for functions with a single root. It also has a high order of convergence, meaning that the number of correct digits is approximately doubled in each iteration.

What are the limitations of the Newton-Raphson method?

The method can fail to converge or converge to the wrong root if the initial guess is not close enough to the actual root or if the function has multiple roots. It also requires the function to be differentiable, which may not always be the case.

How is the Newton-Raphson method used in science?

The method is commonly used in fields such as engineering, physics, and economics to solve complex mathematical equations and find the roots of functions. It is also used in optimization problems to find the minimum or maximum of a function.

Similar threads

  • Calculus and Beyond Homework Help
Replies
6
Views
4K
  • Calculus
Replies
13
Views
1K
  • General Math
Replies
9
Views
1K
Replies
1
Views
9K
Replies
7
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
2K
  • Calculus and Beyond Homework Help
Replies
18
Views
3K
  • Calculus
Replies
5
Views
4K
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Calculus
Replies
8
Views
2K
Back
Top