The Quartic Formula

x = 3 b ± ( 3 ( 3 b 2 8 a c + 2 a 4 ( 2 c 3 9 b c d + 27 a d 2 + 27 b 2 e 72 a c e + ( 2 c 3 9 b c d + 27 a d 2 + 27 b 2 e 72 a c e ) 2 4 ( c 2 3 b d + 12 a e ) 3 ) 3 + 2 a 4 ( 2 c 3 9 b c d + 27 a d 2 + 27 b 2 e 72 a c e ( 2 c 3 9 b c d + 27 a d 2 + 27 b 2 e 72 a c e ) 2 4 ( c 2 3 b d + 12 a e ) 3 ) 3 ) ± 3 ( 3 b 2 8 a c + 2 a ( 1 + 3 2 ) 4 ( 2 c 3 9 b c d + 27 a d 2 + 27 b 2 e 72 a c e + ( 2 c 3 9 b c d + 27 a d 2 + 27 b 2 e 72 a c e ) 2 4 ( c 2 3 b d + 12 a e ) 3 ) 3 + 2 a ( 1 3 2 ) 4 ( 2 c 3 9 b c d + 27 a d 2 + 27 b 2 e 72 a c e ( 2 c 3 9 b c d + 27 a d 2 + 27 b 2 e 72 a c e ) 2 4 ( c 2 3 b d + 12 a e ) 3 ) 3 ) ) ± sgn ( ( sgn ( b 3 + 4 a b c 8 a 2 d ) 1 2 ) ( sgn ( max ( ( 2 c 3 9 b c d + 27 a d 2 + 27 b 2 e 72 a c e ) 2 4 ( c 2 3 b d + 12 a e ) 3 , min ( 3 b 2 8 a c , 3 b 4 + 16 a 2 c 2 + 16 a 2 b d 16 a b 2 c 64 a 3 e ) ) ) 1 2 ) ) 3 ( 3 b 2 8 a c + 2 a ( 1 3 2 ) 4 ( 2 c 3 9 b c d + 27 a d 2 + 27 b 2 e 72 a c e + ( 2 c 3 9 b c d + 27 a d 2 + 27 b 2 e 72 a c e ) 2 4 ( c 2 3 b d + 12 a e ) 3 ) 3 + 2 a ( 1 + 3 2 ) 4 ( 2 c 3 9 b c d + 27 a d 2 + 27 b 2 e 72 a c e ( 2 c 3 9 b c d + 27 a d 2 + 27 b 2 e 72 a c e ) 2 4 ( c 2 3 b d + 12 a e ) 3 ) 3 ) 12 a

The quartic formula gives the solutions of ax4+bx3+cx2+dx+e=0 for real numbers a, b, c, d, e with a0.

Directions: Choose all possibilities for the three ± signs with the last two equivalent. Use real cube roots if possible, and principal roots otherwise.