For: $ax+b=0\;;\; x= \frac{-b}{a}\;\;\;\;\;$ and for:$$ Ax^2 +bx+c = 0\;; \;x = \frac{-b\pm\sqrt {b^2-4ac}}{2a}$$
And for $$ Ax^3+bx^2+cx+d =0$$ 
Is there a constant transformation from equations $x = \frac{-b}a\;\; -$ Linear; to: $x = \frac{-b\pm\sqrt {b^2-4ac}}{2a} \;\;-$ Quadratic; to:
$-\;$Cubic; ect...
In my head there must be a tacit relationship between the equations, I ask this because I want to program an application that can resolve any polynomial thrown at it. I've got linear and Quadratic working but if I had the relationship between the equations I could make one function to work for all. I don't know if this is more of a StackOverflow question but it is heavily math-based.