Is there a general formula for solving 4th degree equations (quartic)?

There is, in fact, a general formula for solving quartic (4th degree polynomial) equations. As the cubic formula is significantly more complex than the quadratic formula, the quartic formula is significantly more complex than the cubic formula. Wikipedia's article on quartic functions has a lengthy process by which to get the solutions, but does not give an explicit formula.

Beware that in the cubic and quartic formulas, depending on how the formula is expressed, the correctness of the answers likely depends on a particular choice of definition of principal roots for nonreal complex numbers and there are two different ways to define such a principal root.

There cannot be explicit algebraic formulas for the general solutions to higher-degree polynomials, but proving this requires mathematics beyond precalculus (it is typically proved with Galois Theory now, though it was originally proved with other methods). This fact is known as the Abel-Ruffini theorem.

Also of note, Wolfram sells a poster that discusses the solvability of polynomial equations, focusing particularly on techniques to solve a quintic (5th degree polynomial) equation. This poster gives explicit formulas for the solutions to quadratic, cubic, and quartic equations.

edit: I believe that the formula given below gives the correct solutions for x to $ax^4+bx^3+cx^2+d+e=0$ for all complex a, b, c, d, and e, under the assumption that $w=\sqrt{z}$ is the complex number such that $w^2=z$ and $\arg(w)\in(-\frac{\pi}{2},\frac{\pi}{2}]$ and $w=\sqrt[3]{z}$ is the complex number such that $w^3=z$ and $\arg(w)\in(-\frac{\pi}{3},\frac{\pi}{3}]$ (these are typically how computer algebra systems and calculators define the principal roots). Some intermediate parameters $p_k$ are defined to keep the formula simple and to help in keeping the choices of roots consistent.

Let: \begin{align*} p_1&=2c^3-9bcd+27ad^2+27b^2e-72ace \\\\ p_2&=p_1+\sqrt{-4(c^2-3bd+12ae)^3+p_1^2} \\\\ p_3&=\frac{c^2-3bd+12ae}{3a\sqrt[3]{\frac{p_2}{2}}}+\frac{\sqrt[3]{\frac{p_2}{2}}}{3a} \end{align*} $\quad\quad\quad\quad$

\begin{align*} p_4&=\sqrt{\frac{b^2}{4a^2}-\frac{2c}{3a}+p_3} \\\\ p_5&=\frac{b^2}{2a^2}-\frac{4c}{3a}-p_3 \\\\ p_6&=\frac{-\frac{b^3}{a^3}+\frac{4bc}{a^2}-\frac{8d}{a}}{4p_4} \end{align*}

Then: $$\begin{align} x&=-\frac{b}{4a}-\frac{p_4}{2}-\frac{\sqrt{p_5-p_6}}{2} \\\\ \mathrm{or\ }x&=-\frac{b}{4a}-\frac{p_4}{2}+\frac{\sqrt{p_5-p_6}}{2} \\\\ \mathrm{or\ }x&=-\frac{b}{4a}+\frac{p_4}{2}-\frac{\sqrt{p_5+p_6}}{2} \\\\ \mathrm{or\ }x&=-\frac{b}{4a}+\frac{p_4}{2}+\frac{\sqrt{p_5+p_6}}{2} \end{align}$$

(These came from having Mathematica explicitly solve the quartic, then seeing what common bits could be pulled from the horrifically-messy formula into parameters to make it readable/useable.)


Assuming the four roots $x_1$, $x_2$, $x_3$, $x_4$ to be real, they are respectively$$x_1=-\frac{b}{4 a}-\frac{1}{2} \sqrt{\frac{\sqrt[3]{2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e+\sqrt{\left(2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e\right)^2-4 \left(c^2-3 b d+12 a e\right)^3}}}{3 \sqrt[3]{2} a}+\frac{b^2}{4 a^2}-\frac{2 c}{3 a}+\frac{\sqrt[3]{2} \left(c^2-3 b d+12 a e\right)}{3 a \sqrt[3]{2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e+\sqrt{\left(2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e\right)^2-4 \left(c^2-3 b d+12 a e\right)^3}}}}-\frac{1}{2} \sqrt{-\frac{\sqrt[3]{2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e+\sqrt{\left(2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e\right)^2-4 \left(c^2-3 b d+12 a e\right)^3}}}{3 \sqrt[3]{2} a}+\frac{b^2}{2 a^2}-\frac{4 c}{3 a}-\frac{\sqrt[3]{2} \left(c^2-3 b d+12 a e\right)}{3 a \sqrt[3]{2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e+\sqrt{\left(2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e\right)^2-4 \left(c^2-3 b d+12 a e\right)^3}}}-\frac{-\frac{b^3}{a^3}+\frac{4 c b}{a^2}-\frac{8 d}{a}}{4 \sqrt{\frac{\sqrt[3]{2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e+\sqrt{\left(2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e\right)^2-4 \left(c^2-3 b d+12 a e\right)^3}}}{3 \sqrt[3]{2} a}+\frac{b^2}{4 a^2}-\frac{2 c}{3 a}+\frac{\sqrt[3]{2} \left(c^2-3 b d+12 a e\right)}{3 a \sqrt[3]{2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e+\sqrt{\left(2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e\right)^2-4 \left(c^2-3 b d+12 a e\right)^3}}}}}}$$

$$x_2=-\frac{b}{4 a}-\frac{1}{2} \sqrt{\frac{\sqrt[3]{2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e+\sqrt{\left(2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e\right)^2-4 \left(c^2-3 b d+12 a e\right)^3}}}{3 \sqrt[3]{2} a}+\frac{b^2}{4 a^2}-\frac{2 c}{3 a}+\frac{\sqrt[3]{2} \left(c^2-3 b d+12 a e\right)}{3 a \sqrt[3]{2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e+\sqrt{\left(2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e\right)^2-4 \left(c^2-3 b d+12 a e\right)^3}}}}+\frac{1}{2} \sqrt{-\frac{\sqrt[3]{2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e+\sqrt{\left(2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e\right)^2-4 \left(c^2-3 b d+12 a e\right)^3}}}{3 \sqrt[3]{2} a}+\frac{b^2}{2 a^2}-\frac{4 c}{3 a}-\frac{\sqrt[3]{2} \left(c^2-3 b d+12 a e\right)}{3 a \sqrt[3]{2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e+\sqrt{\left(2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e\right)^2-4 \left(c^2-3 b d+12 a e\right)^3}}}-\frac{-\frac{b^3}{a^3}+\frac{4 c b}{a^2}-\frac{8 d}{a}}{4 \sqrt{\frac{\sqrt[3]{2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e+\sqrt{\left(2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e\right)^2-4 \left(c^2-3 b d+12 a e\right)^3}}}{3 \sqrt[3]{2} a}+\frac{b^2}{4 a^2}-\frac{2 c}{3 a}+\frac{\sqrt[3]{2} \left(c^2-3 b d+12 a e\right)}{3 a \sqrt[3]{2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e+\sqrt{\left(2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e\right)^2-4 \left(c^2-3 b d+12 a e\right)^3}}}}}}$$

$$x_3=-\frac{b}{4 a}+\frac{1}{2} \sqrt{\frac{\sqrt[3]{2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e+\sqrt{\left(2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e\right)^2-4 \left(c^2-3 b d+12 a e\right)^3}}}{3 \sqrt[3]{2} a}+\frac{b^2}{4 a^2}-\frac{2 c}{3 a}+\frac{\sqrt[3]{2} \left(c^2-3 b d+12 a e\right)}{3 a \sqrt[3]{2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e+\sqrt{\left(2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e\right)^2-4 \left(c^2-3 b d+12 a e\right)^3}}}}-\frac{1}{2} \sqrt{-\frac{\sqrt[3]{2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e+\sqrt{\left(2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e\right)^2-4 \left(c^2-3 b d+12 a e\right)^3}}}{3 \sqrt[3]{2} a}+\frac{b^2}{2 a^2}-\frac{4 c}{3 a}-\frac{\sqrt[3]{2} \left(c^2-3 b d+12 a e\right)}{3 a \sqrt[3]{2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e+\sqrt{\left(2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e\right)^2-4 \left(c^2-3 b d+12 a e\right)^3}}}+\frac{-\frac{b^3}{a^3}+\frac{4 c b}{a^2}-\frac{8 d}{a}}{4 \sqrt{\frac{\sqrt[3]{2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e+\sqrt{\left(2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e\right)^2-4 \left(c^2-3 b d+12 a e\right)^3}}}{3 \sqrt[3]{2} a}+\frac{b^2}{4 a^2}-\frac{2 c}{3 a}+\frac{\sqrt[3]{2} \left(c^2-3 b d+12 a e\right)}{3 a \sqrt[3]{2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e+\sqrt{\left(2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e\right)^2-4 \left(c^2-3 b d+12 a e\right)^3}}}}}}$$

$$x_4=-\frac{b}{4 a}+\frac{1}{2} \sqrt{\frac{\sqrt[3]{2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e+\sqrt{\left(2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e\right)^2-4 \left(c^2-3 b d+12 a e\right)^3}}}{3 \sqrt[3]{2} a}+\frac{b^2}{4 a^2}-\frac{2 c}{3 a}+\frac{\sqrt[3]{2} \left(c^2-3 b d+12 a e\right)}{3 a \sqrt[3]{2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e+\sqrt{\left(2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e\right)^2-4 \left(c^2-3 b d+12 a e\right)^3}}}}+\frac{1}{2} \sqrt{-\frac{\sqrt[3]{2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e+\sqrt{\left(2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e\right)^2-4 \left(c^2-3 b d+12 a e\right)^3}}}{3 \sqrt[3]{2} a}+\frac{b^2}{2 a^2}-\frac{4 c}{3 a}-\frac{\sqrt[3]{2} \left(c^2-3 b d+12 a e\right)}{3 a \sqrt[3]{2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e+\sqrt{\left(2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e\right)^2-4 \left(c^2-3 b d+12 a e\right)^3}}}+\frac{-\frac{b^3}{a^3}+\frac{4 c b}{a^2}-\frac{8 d}{a}}{4 \sqrt{\frac{\sqrt[3]{2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e+\sqrt{\left(2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e\right)^2-4 \left(c^2-3 b d+12 a e\right)^3}}}{3 \sqrt[3]{2} a}+\frac{b^2}{4 a^2}-\frac{2 c}{3 a}+\frac{\sqrt[3]{2} \left(c^2-3 b d+12 a e\right)}{3 a \sqrt[3]{2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e+\sqrt{\left(2 c^3-9 b d c-72 a e c+27 a d^2+27 b^2 e\right)^2-4 \left(c^2-3 b d+12 a e\right)^3}}}}}}$$


Edited in response to Quonux's comments.

Yes. As an answer I will use a shorter version of this Portuguese post of mine, where I deduce all the formulae. Suppose you have the general quartic equation (I changed the notation of the coefficients to Greek letters, for my convenience):

$$\alpha x^{4}+\beta x^{3}+\gamma x^{2}+\delta x+\varepsilon =0.\tag{1}$$

If you make the substitution $x=y-\frac{\beta }{4\alpha }$, you get a reduced equation of the form

$$y^{4}+Ay^{2}+By+C=0\tag{2},$$

with

$$A=\frac{\gamma }{\alpha }-\frac{3\beta ^{2}}{8\alpha ^{2}},$$

$$B=\frac{\delta }{\alpha }-\frac{\beta \gamma }{2\alpha ^{2}}+\frac{\beta^3 }{ 8\alpha^3 },$$

$$C=\frac{\varepsilon }{\alpha }-\frac{\beta \delta }{4\alpha ^{2}}+\frac{ \beta ^{2}\gamma}{16\alpha ^{3}}-\frac{3\beta ^{4}}{256\alpha ^{4}}.$$

After adding and subtracting $2sy^{2}+s^{2}$ to the LHS of $(2)$ and rearranging terms, we obtain the equation

$$\underset{\left( y^{2}+s\right) ^{2}}{\underbrace{y^{4}+2sy^{2}+s^{2}}}-\left[ \left( 2s-A\right) y^{2}-By+s^{2}-C\right] =0. \tag{2a}$$

Then we factor the quadratic polynomial $$\left(2s-A\right) y^{2}-By+s^{2}-C=\left(2s-A\right)(y-y_+)(y-y_-)$$ and make $y_+=y_-$, which will impose a constraint on $s$ (equation $(4)$). We will get:

$$\left( y^{2}+s+\sqrt{2s-A}y-\frac{B}{2\sqrt{2s-A}}\right) \left( y^{2}+s- \sqrt{2s-A}y+\frac{B}{2\sqrt{2s-A}}\right) =0,$$ $$\tag{3}$$

where $s$ satisfies the resolvent cubic equation

$$8s^{3}-4As^{2}-8Cs+\left( 4AC-B^{2}\right) =0.\tag{4}$$

The four solutions of $(2)$ are the solutions of $(3)$:

$$y_{1}=-\frac{1}{2}\sqrt{2s-A}+\frac{1}{2}\sqrt{-2s-A+\frac{2B}{\sqrt{2s-A}}}, \tag{5}$$

$$y_{2}=-\frac{1}{2}\sqrt{2s-A}-\frac{1}{2}\sqrt{-2s-A+\frac{2B}{\sqrt{2s-A}}} ,\tag{6}$$

$$y_{3}=\frac{1}{2}\sqrt{2s-A}+\frac{1}{2}\sqrt{-2s-A-\frac{2B}{\sqrt{2s-A}}} ,\tag{7}$$

$$y_{4}=\frac{1}{2}\sqrt{2s-A}-\frac{1}{2}\sqrt{-2s-A-\frac{2B}{\sqrt{2s-A}}} .\tag{8}$$

Thus, the original equation $(1)$ has the solutions $$x_{k}=y_{k}-\frac{\beta }{4\alpha }.\qquad k=1,2,3,4\tag{9}$$

Example: $x^{4}+2x^{3}+3x^{2}-2x-1=0$

$$y^{4}+\frac{3}{2}y^{2}-4y+\frac{9}{16}=0.$$

The resolvent cubic is

$$8s^{3}-6s^{2}-\frac{9}{2}s-\frac{101}{8}=0.$$

Making the substitution $s=t+\frac{1}{4}$, we get

$$t^{3}-\frac{3}{4}t-\frac{7}{4}=0.$$

One solution of the cubic is

$$s_{1}=\left( -\frac{q}{2}+\frac{1}{2}\sqrt{q^{2}+\frac{4p^{3}}{27}}\right) ^{1/3}+\left( -\frac{q}{2}-\frac{1}{2}\sqrt{q^{2}+\frac{4p^{3}}{27}}\right) ^{1/3}-\frac{b}{3a},$$

where $a=8,b=-6,c=-\frac{9}{2},d=-\frac{101}{8}$ are the coefficients of the resolvent cubic and $p=-\frac{3}{4},q=-\frac{7}{4}$ are the coefficients of the reduced cubic. Numerically, we have $s_{1}\approx 1.6608$.

The four solutions are :

$$x_{1}=-\frac{1}{2}\sqrt{2s_{1}-A}+\frac{1}{2}\sqrt{-2s_{1}-A+\frac{2B}{ \sqrt{2s-A}}}-\frac{\beta }{4\alpha },$$

$$x_{2}=-\frac{1}{2}\sqrt{2s_{1}-A}-\frac{1}{2}\sqrt{-2s_{1}-A+\frac{2B}{ \sqrt{2s-A}}}-\frac{\beta }{4\alpha },$$

$$x_{3}=\frac{1}{2}\sqrt{2s_{1}-A}+\frac{1}{2}\sqrt{-2s_{1}-A-\frac{2B}{ \sqrt{2s-A}}}-\frac{\beta }{4\alpha },$$

$$x_{4}=\frac{1}{2}\sqrt{2s_{1}-A}-\frac{1}{2}\sqrt{-2s_{1}-A-\frac{2B}{ \sqrt{2s-A}}}-\frac{\beta }{4\alpha },$$

with $A=\frac{3}{2},B=-4,C=\frac{9}{16}$. Numerically we have $x_{1}\approx -1.1748+1.6393i$, $x_{2}\approx -1.1748-1.6393i$, $x_{3}\approx 0.70062$, $x_{4}\approx -0.35095$.

Another method is to expand the LHS of the quartic into two quadratic polynomials, and find the zeroes of each polynomial. However, this method sometimes fails. Example: $x^{4}-x-1=0$. If we factor $x^{4}-x-1$ as $x^{4}-x-1=\left( x^{2}+bx+c\right) \left( x^{2}+Bx+C\right) $ expand and equate coefficients we will get two equations, one of which is $-1/c-c^{2}\left( 1+c^{2}\right) ^{2}+c=0$. This is studied in Galois theory.

The general quintic is not solvable in terms of radicals, as well as equations of higher degrees.