Enter quartic equation coefficients:

x4
x3
x2
= 0
Solve the quartic equation
3x4 + 6x3 - 123x2 - 126x + 1080 = 0

Divide the quartic by x4 coefficient of 3
Our resulting equation is
x4 + 2x3 - 41x2 - 42x + 360 = 0
where our new (a,b,c,d,e) coefficients become (1,2,-41,-42,360)

Calculate preliminary values

f = c - (⅜b2)
f = -41 - ⅜(2)2
f = -41 - ⅜(4)
f = -41 + 1.5
f = -42.5

g = d + ⅜b3 - ½bc
g = -42 + ⅜(23) - ½(2 * -41)
g = -42 + ⅜(8) - ½(-82)
g = -42 + 1 + 41
g = 0

h = e - (3b4/256) + (b2 * c)/16 - bd/4
h = 360 - (3(24)/256) + (22 * -41/16) - (2 * -42)/4
h = 360 - (3(16)/256) - 10.25 + 84/4
h = 360 - 0.1875 - 10.25 + 21
h = 370.5625

Form a cubic equation:

x3 + ½fx2 + ((f2 - 4h)/16)x - g2/64 = 0

Find the a, b, c, and d coefficients

Calculate the b coefficient:

b = ½f
b = ½(-42.5)
  b  =  -21.25

Calculate the c coefficient:

c  =  f2 - 4h
  16

c  =  -42.52 - 4(370.5625)
  16

c  =  1806.25 - 1482.25
  16

c  =  324
  16

  c  =  20.25

Calculate the d coefficient:

d  =  -g2
  64

d  =  -02
  64

d  =  0
  64

  d  =  0

Solve the following cubic equation
x3 - 21.25x2 + 20.25x + 0 = 0

Calculate the discriminant Δ:

Δ = 4b3d - b2c2 + 4ac3 - 18abcd + 27a2d2
Δ = (4)-21.253(0) - -21.25220.252 + (4)(1)20.253 - 18(1)(-21.25)(20.25)(0) + (27)1202
Δ = -0 - 185168.84765625 + 33215.0625 - -0 + 0
Δ = -151953.78515625

Since Δ < 0:
The cubic equation has 3 real roots.

Calculate f:

f  =  (3c/a) - b2/a2
  3

f  =  (3)(20.25)/1 - (-21.252)/(12)
  3

f  =  60.75 - 451.5625
  3

f  =  -390.8125
  3

  f  =  -130.27083333333

Calculate g:

g  =  2b3/a3 - 9bc2 + 27d/a
  27

g  =  [(2)(-21.25313 - (9)(-21.25)20.252 + (27)(0)/1
  27

g  =  [(2)(-21.25313 - (9)(-21.25)20.252 + (27)(0)/1
  27

g  =  -19191.40625 - -3872.8125 + 0
  27

g  =  -15318.59375
  27

  g  =  -567.35532407407

Calculate h:

h  =  g2
  4
+
  
f3
27
h  =  -567.355324074072
  4
+
  
-130.270833333333
27

h  =  321892.0637552
  4
+
  
-2210759.8766366
27

  h  =  80473.015938799 + -81879.995430987

  h  =  -1406.9794921875

Calculate i:

  i  =  Square Root(¼g2 - h)

  i  =  Square Root(¼(-567.355324074072) - -1406.9794921875)

  i  =  √80473.015938799 - -1406.9794921875

  i  =  √81879.995430987

  i  =  286.14680747998

Calculate j:

  j  =  i(1/3)

  j  =  286.14680747998(1/3)

  j  =  6.5896594078231

Calculate k:

  k  =  Arccosine(-g/(2i))

  k  =  Arccosine(--567.35532407407/((2)286.14680747998))

  k  =  Arccosine(0.99137105367454)

  k  =  0.13146394750086

Calculate l:

  l  =  -j

  l  =  -(6.5896594078231)

  l  =  -6.5896594078231

Calculate m:

  m  =  Cosine(k/3)

  m  =  Cosine(0.13146394750086/3)

  m  =  Cosine(0.04382131583362)

  m  =  0.99903999977871

Calculate n:

  n  =  √3 * Sin(k/3)

  n  =  √3 * Sin(0.13146394750086/3)

  n  =  1.7320508075689 * Sin(0.04382131583362)

  n  =  1.7320508075689 * 0.043807292111654

  n  =  0.075876455679396

Calculate p:

p  =  -b
  3a

p  =  -(-21.25)
  3(1)

p  =  21.25
  3

  p  =  7.0833333333333

Calculate the first root x1:

  x1  =  2j * Cosine(k/3) - b/(3a)

  x1  =  (2)(6.5896594078231) * (Cosine(0.13146394750086/3) - -21.25/(3)(1)

  x1  =  (13.179318815646)(Cosine(0.04382131583362) - -7.0833333333333

  x1  =  13.166666666667 - -7.0833333333333

  x1  =  20.25

Calculate the second root x2:

  x2  =  l(m + n) + p

  x2  =  -6.5896594078231(0.99903999977871 + 0.075876455679396) + 7.0833333333333

  x2  =  -6.5896594078231(1.0749164554581) + 7.0833333333333

  x2  =  -7.0833333333333 + 7.0833333333333

  x2  =  -0

Calculate the third root x3:

  x3  =  l(m - n) + p

  x3  =  -6.5896594078231(0.99903999977871 - 0.075876455679396) + 7.0833333333333

  x3  =  -6.5896594078231(0.92316354409931) + 7.0833333333333

  x3  =  -6.0833333333333 + 7.0833333333333

  x3  =  1

You have found all 3 Real roots now.
(20.25, -0, 1)

Continue solving the quartic:

Calculate p and q

p = √20.25
p = 4.5

q = √1
q = 1

Calculate the r coefficient:

r  =  -g
  8pq

r  =  -(0)
  8(4.5)(1)

r  =  0
  36

  r  =  0

Calculate the s coefficient:

s  =  b
  4a

s  =  2
  4(1)

s  =  2
  4

  s  =  0.5

Now we have everything we need for our quartic equation roots:

x1 = p + q + r - s
x1 = 4.5 + 1 + 0 - 0.5
x1 = 5

x2 = p - q - r - s
x2 = 4.5 - 1 - 0 - 0.5
x2 = 3

x3 = -p + q - r - s
x3 = -4.5 + 1 - 0 - 0.5
x3 = -4

x4 = -p - q + r - s
x4 = -4.5 - 1 + 0 - 0.5
x4 = -6


(5, 3, -4, -6)


x1 = 5
x2 = 3
x3 = -4
x4 = -6