If you want to solve a cubic equation

  • Thread starter Thread starter edgo
  • Start date Start date
  • Tags Tags
    Cubic
Click For Summary
SUMMARY

The discussion focuses on a numerical solution for cubic equations of the form x^3 + ax^2 + bx + c = 0, specifically when a^2 - 3b ≠ 0. It highlights the use of Newton's method with a strategic starting point to enhance convergence, and demonstrates calculations using MS Excel. Key parameters such as 4d and y values are computed to derive the roots of the equation, providing an example with specific coefficients and results. The accuracy of the method is confirmed to be sufficient for practical use, achieving around six decimal places.

PREREQUISITES
  • Understanding of cubic equations and their properties
  • Familiarity with Newton's method for numerical solutions
  • Basic knowledge of MS Excel for calculations
  • Proficiency in LaTeX for mathematical formatting
NEXT STEPS
  • Explore advanced techniques in Newton's method for improved convergence
  • Learn about numerical methods for solving polynomial equations
  • Investigate the use of MS Excel for complex mathematical computations
  • Study LaTeX formatting for presenting mathematical equations effectively
USEFUL FOR

Mathematicians, engineers, data analysts, and anyone involved in numerical analysis or computational mathematics will benefit from this discussion.

edgo
Messages
32
Reaction score
0
There is a very handy numerical solution for cubic equations like ## x^3+ax^2+bx+c=0## with ##x_i \in R## while a^2-3b \neq 0. Though it makes use of the method of Newton, the starting point for the algorithm gives it a great advantage to the normal algorithm. And you can use MS Excel as an ordinary calculator!

We compute the parameter ##4d=\frac{-9\left(2a^3-9ab+27c\right)}{\sqrt{12\left(a^2-3b\right)^3-3\left(2a^3-9ab+27c\right)^2}}## for the composition of the equation ##f^3-4df^2-9f+4d=0##.

This equation has roots that satisfy ##f_j=\frac{f_i-3}{f_i+1}##.

Next thing to do is to calculate ##y_0=\frac{4d}{4+\sqrt{16d^2+25}}##.

We substitute ##y_0## in ## y_j=\frac{2y_i^3-4dy_i^2-4d}{3y_i^2-8dy_i-9}##.

This gives the value ##y_1##, repeating this step for ##y_1## gives ##y_2##. There is no need to go any further than ##y_2## as Excel can’t handle those accuracies any more.

Substitution of ##y_2=f_2## in ##f_j=\frac{f_i-3}{f_i+1}## gives ## f_i##. Then:

##x_i=-\frac{ab-9c}{2a^3-6b}+\frac{f_i}{18a^2-54b}\times \sqrt{12\left(a^2-3b\right)^3-3\left(2a^3-9ab+27c\right)^2}##.

Just an example: ##x^3+4x^2-18x-9=0##
##4d## = -2,655 292 734 356 2300
##y_0##= - 0,274 837 379 984 0870
##y_1## = - 0,275 027 669 928 0960
##y_2## = - 0,275 027 663 450 8140

Substitution gives
##x_1## = 3,000 000 000 000 0000
##x_2## = -0,458 618 734 850 8900
##x_3## = - 6,541 381 265 149 1100

Check on coefficients:
##a## = 4,000 000 000 000 0000
##b## = - 18, 000 000 000 000 0000
##c## = - 9,000 000 000 000 0000 In Excel!

For those who want to know: ##|f_2-y_0| < 0,00086## for every ##f_2 \in R##. So for practical use ##y_1## will suffice giving an accuracy of about 6 decimals.

Can anybody please tell me what to do about this ridiculous jumping too small figures in LaTeX? \Large doesn't do any good nor itex (the way I used it). Thanks.
 
Last edited by a moderator:
Physics news on Phys.org
Looks like an interesting approach, especially the part about calculating a starting point. One of the deficiencies of Newton's method is that it can sometimes fail to converge if you start with an unfortunate initial guess.

edgo said:
Can anybody please tell me what to do about this ridiculous jumping too small figures in LaTeX? \Large doesn't do any good nor itex (the way I used it). Thanks.
Not sure what you mean, but I edited your post to replace all of the standalone LaTeX with inline LaTeX.
 

Similar threads

Replies
10
Views
3K
  • · Replies 5 ·
Replies
5
Views
1K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
8K