2 roots
Chat with our AI personalities
Write an algorithm to find the root of quadratic equation
Using the quadratic equation formula or completing the square
the sum is -b/a and the product is c/a
General form of a quadratic equation is: ax2+b+c = 0 The discriminant is: b2-4ac If the discriminant equals zero then there are two equal roots If the discriminant is greater than zero then there are two different roots If the discriminant is less than zero then there are no real roots
If the two roots are x = r1 and x = r2 then the quadratic equation is: (x - r1)(x - r2) = x2 - (r1 + r2)x + r1r2 = 0