Some Fixes to the formatting of the quadratic equation

Fixed the formatting of the quadratic  equation in some cases when a is
neither 1 nor -1.