HP-45 Application Book (Not getting Correct Answer))
|
06-29-2024, 12:54 AM
Post: #2
|
|||
|
|||
RE: HP-45 Application Book (Not getting Correct Answer))
Hi, Namir
I have not read the book, nor your code, but this is easy to explain. ³√(-8) = -2, but (-8)^(1/3) = -2*ω, where ω = cis(2*pi/3) = (-1 + i√3) / 2 Because of this ambiguity, below is a *bad* cubic formula. x might not be a root al all! One term might require ω factor correction. Instead of doing 2 cube roots, do only 1, and derive the other, guaranteed correct one. Bonus: we can get the one with least cancellation errors, and have both accurate terms. x^3 - 4*x^2 + 8*x - 8 = 0 // let x = y + 4/3 y^3 + 8/3*y - 56/27 = 0 // c = 8/3, d = 56/27, to match above formula --> (y - (α + β)) * (y - (α*ω + β/ω)) * (y - (α/ω + β*ω)) = 0 α = ³√(d/2 + √((d/2)^2 + (c/3)^3)) = ³√(28/27 + 4/3) = ³√(64/27) = 4/3 β = (-c/3) / α = (-8/9) / (4/3) = -2/3 β is correctly paired with α --> all generated roots are correct. x = 4/3 + y x1 = 4/3 + (4/3) + (-2/3) = 2 x2 = 4/3 + (4/3)*ω + (-2/3)/ω = 1 + i√3 x3 = 4/3 + (4/3)/ω + (-2/3)*ω = -1/3 − i√3 Had we use cube root for β, we may get (28/27 - 4/3)^(1/3) = -2/3/ω XCas> ω := exp(i*2*pi/3) XCas> float(normal([[1,1],[ω,1/ω],[1/ω,ω]] * [4/3, -2/3/ω] .+ 4/3)) [3.0+0.57735026919*i, 1.0+0.57735026919*i, -1.15470053838*i] |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
HP-45 Application Book (Not getting Correct Answer)) - Namir - 06-28-2024, 10:18 PM
RE: HP-45 Application Book (Not getting Correct Answer)) - Albert Chan - 06-29-2024 12:54 AM
RE: HP-45 Application Book (Not getting Correct Answer) - Thomas Klemm - 06-29-2024, 01:41 AM
RE: HP-45 Application Book (Not getting Correct Answer)) - Namir - 06-29-2024, 02:14 AM
RE: HP-45 Application Book (Not getting Correct Answer)) - Namir - 06-30-2024, 08:49 PM
|
User(s) browsing this thread: 4 Guest(s)