This spreadsheet solves cubic equations with real coefficients, Ax³+Bx²+Cx+D=0. Such equations always have one real root, r₁. The other two roots, r₂ and r₃, are either real numbers or conjugate complex numbers. Sheet Cubic allows you to enter A B C D, then shows r₁ r₂ r₃, and the calculated value of Ax³+Bx²+Cx+D at those roots. Knowing the roots, Ax³+Bx²+Cx+D=0 can be factored as (x-r₁)(x-r₂)(x-r₃)=0. Cell E7 says whether any of the roots are equal.
The sheets have Tools → Protect Document → Sheet enabled, but if you want to experiment with them, you can remove the protection since there is no password. For example, sheet Calc displays the roots in scientific notation, but you can change that in the Styles and Formatting dialog after unprotecting the three sheets.
To discuss this spreadsheet, open a new topic in the Calc forum.
[Example] Cubic equation solver
- MrProgrammer
- Moderator
- Posts: 5347
- Joined: Fri Jun 04, 2010 7:57 pm
- Location: Wisconsin, USA
[Example] Cubic equation solver
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.7.6, iMac Intel. The locale for any menus or Calc formulas in my posts is English (USA).
AOO 4.1.7 Build 9800, MacOS 13.7.6, iMac Intel. The locale for any menus or Calc formulas in my posts is English (USA).