Expressing a root of a cubic polynomial as a series

In summary, the conversation discusses different methods for extracting the largest root of a cubic equation with arbitrary precision. The bisection method and calculating all roots and picking the largest were suggested, but the main issue is finding a way to output a specific number of digits for the root.
  • #1
SeventhSigma
257
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
  • #2
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).
 
  • #3
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.
 
  • #4
  • #5
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.
 
  • #6
My problem isn't finding roots -- it's returning arbitrarily long decimal expansions
 
  • #7
Ah sorry, my bad.

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

The solution of [itex]x^3+ax^2+bx+c = 0[/itex] is:

[itex]Q={a^2-3b \over 9}[/itex]

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

if [itex]R^2 < Q^3[/itex] then

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

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

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

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

else

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

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

[itex]x_1=(A+B) - {a \over 3}[/itex]​

fi
 
  • #8
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
 
  • #9
Sorry, I finally understand what you're asking, but I've got no clue. :frown:
 

Related to Expressing a root of a cubic polynomial as a series

1. How do you express a root of a cubic polynomial as a series?

To express a root of a cubic polynomial as a series, we use the Taylor series expansion. This involves expanding the polynomial around the root in terms of its derivatives.

2. Why is it useful to express a root of a cubic polynomial as a series?

Expressing a root of a cubic polynomial as a series allows us to approximate the value of the root with greater accuracy. It also helps in solving complex mathematical problems involving cubic polynomials.

3. Can you provide an example of expressing a root of a cubic polynomial as a series?

Let's say we have a cubic polynomial f(x) = x^3 + 2x^2 - 5x + 1. To express the root x = 1 as a series, we use the Taylor series expansion: f(x) = f(a) + f'(a)(x-a) + f''(a)(x-a)^2/2! + f'''(a)(x-a)^3/3! + ...

4. What is the significance of using a Taylor series in expressing a root of a cubic polynomial?

The Taylor series allows us to approximate a function with an infinite series of polynomials. This helps in finding a more accurate value of the root of a cubic polynomial, as we can include as many terms as needed in the series to improve the precision of the approximation.

5. Are there any limitations to expressing a root of a cubic polynomial as a series?

Yes, there are limitations to using Taylor series for approximating roots of cubic polynomials. The series may converge slowly or may not converge at all for certain functions. Also, the accuracy of the approximation decreases as we move further away from the root.

Similar threads

Replies
1
Views
851
Replies
9
Views
2K
  • General Math
Replies
16
Views
3K
  • Precalculus Mathematics Homework Help
Replies
6
Views
1K
Replies
1
Views
750
Replies
5
Views
3K
  • General Math
Replies
2
Views
1K
Replies
4
Views
2K
  • Precalculus Mathematics Homework Help
Replies
12
Views
545
Replies
3
Views
2K
Back
Top