# The Quartic Formula

$x=\frac{-3b±\left(\sqrt{3\left(3{b}^{2}-8ac+2a\sqrt[3]{4\left(2{c}^{3}-9bcd+27a{d}^{2}+27{b}^{2}e-72ace+\sqrt{\left(2{c}^{3}-9bcd+27a{d}^{2}+27{b}^{2}e-72ace{\right)}^{2}-4\left({c}^{2}-3bd+12ae{\right)}^{3}}\right)}+2a\sqrt[3]{4\left(2{c}^{3}-9bcd+27a{d}^{2}+27{b}^{2}e-72ace-\sqrt{\left(2{c}^{3}-9bcd+27a{d}^{2}+27{b}^{2}e-72ace{\right)}^{2}-4\left({c}^{2}-3bd+12ae{\right)}^{3}}\right)}\right)}±\sqrt{3\left(3{b}^{2}-8ac+2a\left(\frac{-1+\sqrt{-3}}{2}\right)\sqrt[3]{4\left(2{c}^{3}-9bcd+27a{d}^{2}+27{b}^{2}e-72ace+\sqrt{\left(2{c}^{3}-9bcd+27a{d}^{2}+27{b}^{2}e-72ace{\right)}^{2}-4\left({c}^{2}-3bd+12ae{\right)}^{3}}\right)}+2a\left(\frac{-1-\sqrt{-3}}{2}\right)\sqrt[3]{4\left(2{c}^{3}-9bcd+27a{d}^{2}+27{b}^{2}e-72ace-\sqrt{\left(2{c}^{3}-9bcd+27a{d}^{2}+27{b}^{2}e-72ace{\right)}^{2}-4\left({c}^{2}-3bd+12ae{\right)}^{3}}\right)}\right)}\right)±\mathrm{sgn}\left(\left(\mathrm{sgn}\left(-{b}^{3}+4abc-8{a}^{2}d\right)-\frac{1}{2}\right)\left(\mathrm{sgn}\left(max\left(\left(2{c}^{3}-9bcd+27a{d}^{2}+27{b}^{2}e-72ace{\right)}^{2}-4\left({c}^{2}-3bd+12ae{\right)}^{3},min\left(3{b}^{2}-8ac,3{b}^{4}+16{a}^{2}{c}^{2}+16{a}^{2}bd-16a{b}^{2}c-64{a}^{3}e\right)\right)\right)-\frac{1}{2}\right)\right)\sqrt{3\left(3{b}^{2}-8ac+2a\left(\frac{-1-\sqrt{-3}}{2}\right)\sqrt[3]{4\left(2{c}^{3}-9bcd+27a{d}^{2}+27{b}^{2}e-72ace+\sqrt{\left(2{c}^{3}-9bcd+27a{d}^{2}+27{b}^{2}e-72ace{\right)}^{2}-4\left({c}^{2}-3bd+12ae{\right)}^{3}}\right)}+2a\left(\frac{-1+\sqrt{-3}}{2}\right)\sqrt[3]{4\left(2{c}^{3}-9bcd+27a{d}^{2}+27{b}^{2}e-72ace-\sqrt{\left(2{c}^{3}-9bcd+27a{d}^{2}+27{b}^{2}e-72ace{\right)}^{2}-4\left({c}^{2}-3bd+12ae{\right)}^{3}}\right)}\right)}}{12a}$

The quartic formula gives the solutions of $a{x}^{4}+b{x}^{3}+c{x}^{2}+dx+e=0$ for real numbers $a$, $b$, $c$, $d$, $e$ with $a\ne 0$.

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