HP50g simplifing a root
|
10-09-2020, 12:20 AM
(This post was last modified: 10-12-2020 06:34 AM by Albert Chan.)
Post: #19
|
|||
|
|||
RE: HP50g simplifing a root
Unfortunately, our divisors based cube root simplify routines were flawed !
(10-01-2020 05:22 PM)Albert Chan Wrote: Real rational root for a is a divisor of n, *but* possibly divided by 4. Above XCas version is correct. It does not assume a is integer. Updated previous post simp_cbrt2() code to handle "quarter" bug. XCas> find_cbrt(81,30,-3) → \(\frac{9}{2} + \frac{i}{2}\cdot\sqrt{3}\) lua> simp_cbrt2(81,30,-3) → 4.5 0.5 -3 Update: roots impossible as quarters, but possible as halves. Updated previous post simp_cbrt2() code to handle "halves" bug. see https://www.hpmuseum.org/forum/thread-15...#pid137252 --- I added a simple third version, going for converged (a, r), rational or not. This may be convenient if we do not have √R factored to B√k Code: function simp_cbrt3(A,R) -- simplify cbrt(A +/- sqrt(R)) lua> simp_cbrt3(10, 108) -- ³√(10 ± √108) = 1 ± √3 1 3 lua> A, R = 123, 456 lua> a, r = simp_cbrt3(A, R) -- not possible to simplify, (A²-R) not cubes lua> a, r 4.956345549114864 0.0837701441234425 lua> cbrt(A + sqrt(R)) , a + sqrt(r) 5.245776273336468 5.245776273336468 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)