• Support PF! Buy your school textbooks, materials and every day products Here!

Double root of equation with Newton Raphson

  • #1
1,007
76

Homework Statement


Find a double root of the equation ## f(x)= x^3+15.87x+24.34 ## correct to 3 decimal places.

Homework Equations


By Newton Raphson's Formula,
## x_{n+1}=x_n + \frac{f(x_n)}{f'(x_n)} ##
##f'(x)=3x^2+15.87 ##

The Attempt at a Solution


Does a double root means to find two roots or a root which is repeated two times?
I checked analytically with my calculator and this equation has 1 real root and 2 complex roots.
So how to proceed?
 

Answers and Replies

  • #2
S.G. Janssens
Science Advisor
Education Advisor
893
664
Does a double root means to find two roots or a root which is repeated two times?
The latter. More generally, if ##f: \mathbb{R} \to \mathbb{R}## is not a polynomial but still a smooth function, then ##x_0## is called a root of order ##n \ge 1## if all coefficients of orders strictly smaller than ##n## vanish in a Taylor expansion of ##f## around ##x_0## while the ##n##th order coefficient itself is non-zero.
I checked analytically with my calculator and this equation has 1 real root and 2 complex roots.
So how to proceed?
I agree with you and don't see any double roots here.
 
  • Like
Likes Raghav Gupta
  • #3
1,007
76
The latter. More generally, if ##f: \mathbb{R} \to \mathbb{R}## is not a polynomial but still a smooth function, then ##x_0## is called a root of order ##n \ge 1## if all coefficients of orders strictly smaller than ##n## vanish in a Taylor expansion of ##f## around ##x_0## while the ##n##th order coefficient itself is non-zero.

I agree with you and don't see any double roots here.
But suppose we don't know analytically before and we apply this formula,
## x_{n+1}=x_n +2 \frac{f(x_n)}{f'(x_n)} ##
Since multiplicity is 2.
What we can infer from that?
Eventually it will also give a root.
How many iterations to do and what initial guess value to take?
 
  • #4
S.G. Janssens
Science Advisor
Education Advisor
893
664
But suppose we don't know analytically before and we apply this formula,
##x_{n+1}=x_n +2 \frac{f(x_n)}{f'(x_n)}##
Since multiplicity is 2.
What we can infer from that?
Eventually it will also give a root.
How many iterations to do and what initial guess value to take
When you start "Newton" close to a root that is not simple, you are going to run into trouble because ##f'(x_0) = 0##. I don't understand why you would put a "2" in front of the quotient, this is not going to help. "Newton" can only be used when ##f## is regular at ##x_0##. Incidentally, you got a sign incorrect, it should be
$$
x_{n+1}=x_n - \frac{f(x_n)}{f'(x_n)}
$$
But in any case, for your function there are no double roots and using Newton you will only be able to find the one real root.
 
  • #5
Ray Vickson
Science Advisor
Homework Helper
Dearly Missed
10,706
1,728
But suppose we don't know analytically before and we apply this formula,
## x_{n+1}=x_n +2 \frac{f(x_n)}{f'(x_n)} ##
Since multiplicity is 2.
What we can infer from that?
Eventually it will also give a root.
How many iterations to do and what initial guess value to take?
NO! You cannot just modify Newton-Raphson like you have done. The fact is that Newton-Raphson will fail in the case of a root of multiplicity > 1 (double root, triple root, etc). Because of roundoff errors and other finite-wordlength arithmetical errors, it will also be unreliable (or fail) if the root is not double, but if there are two separate roots "very close together". Good numerical schemes must build in safeguards against such difficulties.

Anyway, Newton-Raphson works perfectly well in this example, because there are no double roots.
 
Last edited:
  • #6
SammyS
Staff Emeritus
Science Advisor
Homework Helper
Gold Member
11,315
1,006

Homework Statement


Find a double root of the equation ## f(x)= x^3+15.87x+24.34 ## correct to 3 decimal places.

Homework Equations


By Newton Raphson's Formula,
## x_{n+1}=x_n + \frac{f(x_n)}{f'(x_n)} ##
##f'(x)=3x^2+15.87 ##

The Attempt at a Solution


Does a double root means to find two roots or a root which is repeated two times?
I checked analytically with my calculator and this equation has 1 real root and 2 complex roots.
So how to proceed?
I used Wolfram Alpha to graph the function.

Clearly there is only one real root. Of course this is apparent if one considers the first derivative, which is positive definite.

Changing the sign of the linear term gives ##\ x^3-15.87x+24.34 \ ##, which still has only one real root, but does have a minimum of ≈ 0.006 .

Finally, subtracting 0.006 gives the function ##\ g(x)=x^3-15.87x+24.334 \ ##. It appears that g(x) has two roots, one of which is a double root.

Maybe there are two typos in the posted problem.

Added in Edit:

(Ray makes a good point in the following post.)
 
Last edited:
  • #7
Ray Vickson
Science Advisor
Homework Helper
Dearly Missed
10,706
1,728
I used Wolfram Alpha to graph the function.

Clearly there is only one real root. Of course this is apparent if one considers the first derivative, which is positive definite.

Changing the sign of the linear term gives ##\ x^3-15.87x+24.34 \ ##, which still has only one real root, but does have a minimum of ≈ 0.006 .

Finally, subtracting 0.006 gives the function ##\ g(x)=x^3-15.87x+24.334 \ ##. It appears that g(x) has two roots, one of which is a double root.

Maybe there are two typos in the posted problem.
This root-counting is apparent even without plotting. For x > 0 there are no roots of p(x) (as you have pointed out) because all terms are > 0. For x < 0 there is a single root (as determined, for example, by Descarte's Rule of signs, applied to q(x) = p(-x).
 
  • Like
Likes SammyS

Related Threads on Double root of equation with Newton Raphson

  • Last Post
Replies
1
Views
1K
  • Last Post
Replies
12
Views
4K
  • Last Post
Replies
0
Views
1K
  • Last Post
Replies
2
Views
2K
  • Last Post
Replies
6
Views
7K
  • Last Post
Replies
1
Views
903
Replies
2
Views
3K
  • Last Post
Replies
4
Views
20K
Replies
2
Views
1K
Top