cubic solver
|
07-03-2024, 10:17 PM
(This post was last modified: 07-05-2024 09:38 PM by Albert Chan.)
Post: #8
|
|||
|
|||
RE: cubic solver
Previous posts assumed depressed cubic. Here is how to depress a cubic.
This version, if cubic coefficients are integers, so does depressed cubic. Let's define {a,b,c,d} = roots of polynomial, a*x^3 + b*x^2 + c*x + d To force b to 0, we need substitution, x = y - b/A, where A=3a But we don't want fractions. Let's scale the problem. Bonus: cubic coefficient = 1 {a, b, c, d} = {A, 3b, 3c, 3d} = {1, 3b, 3Ac, 3A²d} / A Synthetic Division with offset b will clear 3b coefficient Code: -b> 1 3b 3Ac 3A²d {a,b,c,d} = ({1, 0, C, D} - b) / A Example, super-golden ratio, ψ³ = ψ²+1, we have a, b, c, d = 1, -1, 0, -1 A = 3 * a = 3 C = 3 * (Ac-b²) = 3 * -1 D = 3A²d - b*(C+b²) = -29 α³, β³ = {1, D, -(C/3)³} = {1,-29,1} = (29 ± √(93²-4))/2 = (29 ± 3√93)/2 ψ = ({1, 0, -3, -29} - (-1)) / 3 = (α + β + 1) / 3 Cas> (cubic(3,29) .+ 1) / 3. [1.46557123188, −0.232785615938+0.792551992515*i, −0.232785615938-0.792551992515*i] This matched Michael Penn's ψ solution (08-07-2022 07:55 AM)Thomas Klemm Wrote: Recently I stumbled upon this video by Micheal Penn: What is the super-golden ratio?? Code: function cubic(a,b,c,d) -- a*x^3 + b*x^2 + c*x + d = 0 |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
cubic solver - Albert Chan - 09-08-2023, 02:26 PM
RE: cubic solver - Albert Chan - 09-08-2023, 02:44 PM
RE: cubic solver - parisse - 09-08-2023, 06:56 PM
RE: cubic solver - Albert Chan - 06-29-2024, 02:46 PM
RE: cubic solver - Albert Chan - 06-29-2024, 03:29 PM
RE: cubic solver - Albert Chan - 07-02-2024, 02:34 PM
RE: cubic solver - Albert Chan - 07-02-2024, 05:12 PM
RE: cubic solver - Albert Chan - 07-03-2024 10:17 PM
RE: cubic solver - Albert Chan - 07-03-2024, 11:48 PM
Quarter Solver - Albert Chan - 07-04-2024, 08:37 PM
|
User(s) browsing this thread: 1 Guest(s)