The general quadratic equation is

(1)

Or,

(2)

To derive the formula, we have by transposing

Completing the square,