Deriving the quadratic formula