HP50g simplifing a root
10-11-2020, 06:28 PM (This post was last modified: 10-12-2020 05:19 AM by Albert Chan.)
Post: #24
 Albert Chan Senior Member Posts: 2,680 Joined: Jul 2018
RE: HP50g simplifing a root
(10-09-2020 02:31 PM)Albert Chan Wrote:  Lets rearrange the cubic to match form x³ + 3px - 2q = 0

c³ = A² - R
4*a³ = 3*c*a + A
a³ + 3*(-c/4)*a - 2*(A/8) = 0

→ Cubic discriminant = p³ + q² = (-c/4)³ + (A/8)² = (-c³ + A²) / 64 = R/64
→ If R < 0, we got 3 real roots.

Instead of cubic discriminant, we can show this with more familiar quadratic discriminant.

Let f(x) = 4x³ - 3*c*x - A, so that f(a) = 0

f(x) = 4 * (x-a) * (x² + a*x + (a² - 3*c/4))

Quadratic discriminant = a² - 4*(a² - 3*c/4) = -3*(a² - c) = -3*r
→ if r < 0 (due to R < 0), f got 3 real roots.

We can solve the quadratics, but unnecessary.
If we have 1 solution, where (a ± √r)³ = A ± √R, we can get the other 2.

(a ± √r)³ = ((a ± √r) × w)³ = ((a ± √r) / w)³, ﻿ ﻿ ﻿ ﻿ where w = (-1)^(2/3)

Example, simplify ³√(36 + 20i√7)

>>> from mpmath import *
>>> A, B, k = 36, 20, -7
>>> z = A + B*sqrt(k)
>>> q = cbrt(z); print q
(3.79128784747792 + 1.27520055582102j)

>>> c = cbrt(A*A-B*B*k); print c
16.0

q looks hopeless to simplify, but c is integer, thus possible.
Perhaps the "nice" root is not the principle root ?

>>> w = exp(2j/3*pi)
>>> print q*w, q/w
(-3.0 + 2.64575131106459j)﻿ ﻿ ﻿ ﻿ ﻿ ﻿ (-0.791287847477919 - 3.92095186688561j)

>>> a = -3
>>> f = lambda x: 4*x**3 - 3*c*x - A
>>> print f(a)
0.0
>>> print a, (A/a - a*a)/3
-3 ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ -7.0

We have ³√(36 + 20i√7) = (-3 + i√7) / (-1)^(2/3)

However, converted to form a ± √r, expression look messier than original ³√(A + √R)
 « Next Oldest | Next Newest »

 Messages In This Thread HP50g simplifing a root - peacecalc - 09-29-2020, 09:22 PM RE: HP50g simplifing a root - Albert Chan - 09-29-2020, 11:47 PM RE: HP50g simplifing a root - Albert Chan - 09-30-2020, 02:22 AM RE: HP50g simplifing a root - Albert Chan - 09-30-2020, 10:50 PM RE: HP50g simplifing a root - Albert Chan - 10-01-2020, 07:31 AM RE: HP50g simplifing a root - peacecalc - 09-30-2020, 05:33 AM RE: HP50g simplifing a root - peacecalc - 10-01-2020, 02:20 PM RE: HP50g simplifing a root - Albert Chan - 10-01-2020, 05:22 PM RE: HP50g simplifing a root - peacecalc - 10-04-2020, 06:05 PM RE: HP50g simplifing a root - Albert Chan - 10-04-2020, 11:48 PM RE: HP50g simplifing a root - peacecalc - 10-04-2020, 07:36 PM RE: HP50g simplifing a root - peacecalc - 10-05-2020, 11:36 AM RE: HP50g simplifing a root - Albert Chan - 10-05-2020, 05:01 PM RE: HP50g simplifing a root - peacecalc - 10-06-2020, 05:25 AM RE: HP50g simplifing a root - Albert Chan - 10-06-2020, 09:40 AM RE: HP50g simplifing a root - Albert Chan - 10-06-2020, 12:06 PM RE: HP50g simplifing a root - Albert Chan - 10-06-2020, 04:13 PM RE: HP50g simplifing a root - Albert Chan - 10-07-2020, 06:12 PM RE: HP50g simplifing a root - Albert Chan - 10-09-2020, 12:20 AM RE: HP50g simplifing a root - Albert Chan - 10-09-2020, 02:31 PM RE: HP50g simplifing a root - Albert Chan - 10-11-2020 06:28 PM RE: HP50g simplifing a root - Albert Chan - 10-12-2020, 03:17 AM RE: HP50g simplifing a root - Albert Chan - 10-24-2020, 02:19 PM RE: HP50g simplifing a root - Albert Chan - 10-12-2020, 10:54 PM RE: HP50g simplifing a root - CMarangon - 10-12-2020, 11:45 PM RE: HP50g simplifing a root - grsbanks - 10-13-2020, 06:46 AM RE: HP50g simplifing a root - Albert Chan - 10-09-2020, 05:21 PM RE: HP50g simplifing a root - Albert Chan - 10-10-2020, 03:58 PM RE: HP50g simplifing a root - Albert Chan - 10-10-2020, 04:49 PM RE: HP50g simplifing a root - peacecalc - 10-12-2020, 08:49 PM RE: HP50g simplifing a root - peacecalc - 10-13-2020, 06:30 AM RE: HP50g simplifing a root - peacecalc - 10-13-2020, 06:36 AM

User(s) browsing this thread: 1 Guest(s)