Solve Quartic with Casio FX-115MS
02-01-2020, 12:27 PM (This post was last modified: 03-13-2020 06:24 PM by Albert Chan.)
Post: #7
 Albert Chan Senior Member Posts: 2,230 Joined: Jul 2018
RE: Solve Quartic with Casio FX-115MS
Found a Quartic Solver from https://thomasokken.com/free42/

It uses the same resolvent cubics as Brown's method, without sorting the roots.

(08-30-2019 02:02 PM)Albert Chan Wrote:  Example: solve x^4 + 2 x^3 + 3 x^2 + 4 x + 5 = 0

A = 2
B = 3
C = 4
D = 5
E = AC-4D = -12
F = D(4B-A²)-C² = 24

y^3 - B y^2 + E y + F = 0 → Y = 4.482612919

c^2 - A c + (B-Y) = 0 ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ ﻿→ [c1,c2] = [-0.575630959, 2.575630959]
d^2 - Y d + D = 0 ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ ﻿﻿ ﻿ ﻿ ﻿→ [d1,d2] = [2.088157364, 2.394455555]

if B and Y nearly equal, we may use another form for B-Y

Y^2 (Y-B) + E Y + F = 0 → B-Y = (E Y + F) / Y²

Calculate AY/2
If AY/2 > C, make sure roots of c,d sorted the same way
If AY/2 < C, make sure roots of c,d sorted opposite way

For this case, AY/2 = Y > C, thus c,d roots sorted the same way.

x^2 + c1 x + d1 = 0 → x = 0.2878154795 ± 1.416093081 i
x^2 + c2 x + d2 = 0 → x = -1.287815480 ± 0.8578967571 i

Upto calculations of Y is identical

E = √(A²/4 - B + Y) = 1.575630959
F = √(Y²/4 - D) = 0.153149095

→ [c1,c2] = A/2 ± E = [2.575630959, -0.575630959]
→ [d1,d2] = Y/2 ∓ F = [2.088157364, 2.394455555]

Unfortunately, the roots are in wrong order !

Solving (x^2 + c1 x + d1)(x^2 + c2 x + d2) = 0, gives all wrong roots.

Can anyone try the actual code, or am I mistaken somewhere ?
Source in https://thomasokken.com/free42/42progs/, named G4G
 « Next Oldest | Next Newest »

 Messages In This Thread Solve Quartic with Casio FX-115MS - Albert Chan - 11-29-2018, 05:28 PM RE: Solve Quartic with Casio FX-115MS - Albert Chan - 11-29-2018, 10:31 PM RE: Solve Quartic with Casio FX-115MS - Albert Chan - 02-04-2019, 01:39 PM RE: Solve Quartic with Casio FX-115MS - Albert Chan - 08-24-2019, 12:47 PM RE: Solve Quartic with Casio FX-115MS - SlideRule - 03-14-2020, 01:28 AM RE: Solve Quartic with Casio FX-115MS - Albert Chan - 08-30-2019, 02:02 PM RE: Solve Quartic with Casio FX-115MS - Albert Chan - 09-02-2019, 02:35 PM RE: Solve Quartic with Casio FX-115MS - Albert Chan - 02-01-2020 12:27 PM RE: Solve Quartic with Casio FX-115MS - Albert Chan - 03-13-2020, 06:30 PM

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