Expressing a root of a cubic polynomial as a series

Click For Summary
SUMMARY

The discussion focuses on methods for expressing the largest root of a cubic polynomial, specifically the equation x^3 - 4*x^2 + 2. The roots calculated are approximately 3.866, -0.655, and 0.789. Participants explore various numerical methods, including Newton's Method and the bisection method, to extract the largest root with arbitrary precision. The conversation emphasizes the challenge of obtaining long decimal expansions without losing significant digits due to truncation.

PREREQUISITES
  • Cubic polynomial equations and their roots
  • Newton's Method for root-finding
  • Bisection method for numerical analysis
  • Understanding of Taylor expansions
NEXT STEPS
  • Research the implementation of the bisection method for root extraction
  • Learn about arbitrary precision arithmetic libraries, such as MPFR or GMP
  • Study the derivation and application of Cardano's formula for cubic equations
  • Explore algorithms for generating digits of irrational numbers, similar to spigot algorithms
USEFUL FOR

Mathematicians, computer scientists, and software developers interested in numerical methods for polynomial root-finding and those requiring high-precision calculations.

SeventhSigma
Messages
256
Reaction score
0
Is there a good way to do this?

I have an equation, say x^3 - 4*x^2 + 2, so a=1, b=-4, c=0, d=2.

Is there an easy way to express the largest root of such an equation? In this case, the roots are:

3.8661982625090223
-0.65544238154983
0.7892441190408067

But I am trying to find an easier way to extract that 3.866 root in such a way that I can express it in terms of as many digits as I want (incrementally, so as to not waste computer memory doing crazy float math). I've tried looking at the wiki entries for cubic functions and Taylor expansions but I feel like I'm hitting a brick wall.

Apologies if my question is not clear.
 
Mathematics news on Phys.org
And yes, I'm aware of Newton's Method, but the problem is that it requires me to divide a function by its derivative, which ultimately results in a decimal of infinite length (meaning I have to truncate it and lose information).
 
SeventhSigma said:
And yes, I'm aware of Newton's Method, but the problem is that it requires me to divide a function by its derivative, which ultimately results in a decimal of infinite length (meaning I have to truncate it and lose information).

How about the bisection method? Of course there are also limitations (as with every other numerical method) but it is not as worse as with Newton.
 
Just of the top of my head:

You could calculate the extrema (set derivative to zero).
Pick a point to the left of the leftmost extrema, calculate the tangent line and intersect it with the x-axis.
There! A lower bracket.

If there are no extrema, search left and right with some step, until your signs are different.
There! A bracket.
 
My problem isn't finding roots -- it's returning arbitrarily long decimal expansions
 
Ah sorry, my bad.

Well, you could simply calculate all roots and pick the biggest.

The solution of x^3+ax^2+bx+c = 0 is:

Q={a^2-3b \over 9}

R={2a^3-9ab +27c \over 54}

if R^2 < Q^3 then

\theta=\arccos(R / \sqrt{Q^3})

x_1=-2\sqrt Q \cos({\theta \over 3}) - {a \over 3}

x_2=-2\sqrt Q \cos({\theta + 2\pi \over 3}) - {a \over 3}

x_3=-2\sqrt Q \cos({\theta - 2\pi \over 3}) - {a \over 3}​

else

A=-sgn(R)\left[|R| + \sqrt{R^2-Q^3}\right]^{1 \over 3}

B=(Q/A) \text{ if } (A \ne 0) \text{ or 0 otherwise}

x_1=(A+B) - {a \over 3}​

fi
 
Right, but I mean how do I then take that sort of formulation and then spit out, say, N digits, where I'm dealing with each digit as a standalone entity?

ex:

for N in range (1, 100):
return Nth digit of cubic root
 
Sorry, I finally understand what you're asking, but I've got no clue. :frown:
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
1K
Replies
9
Views
3K
  • · Replies 16 ·
Replies
16
Views
5K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
1
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 17 ·
Replies
17
Views
2K