How this calculator works
FOIL expands two binomials: first, outer, inner, last. Reverse FOIL runs the process backwards. For x² + bx + c the search looks for two numbers multiplying to c and adding to b. When the leading coefficient is not 1, the search pairs factors of a with factors of c and checks whether the outer and inner products add to b. If no integer pair works, the quadratic still has roots when its discriminant is not negative, but they are irrational or fractional and the factors contain roots.
Formula
(px + q)(rx + s) = pr x² + (ps + qr)x + qs. Matching coefficients gives pr = a, ps + qr = b and qs = c. The discriminant is b² - 4ac.
Worked example
For x² - 5x + 6 the numbers -2 and -3 multiply to 6 and add to -5, so the factors are (x - 2)(x - 3). For 2x² + 7x + 3, pairing 2x with 1x and 3 with 1 gives (2x + 1)(x + 3), and the discriminant is 49 - 24 = 25.
Advertisement
Frequently asked questions
What does the discriminant tell me?
A positive discriminant gives two distinct real roots, zero gives one repeated root and a negative value gives no real roots. A perfect-square discriminant also tells you the roots are rational, so the factors have integer coefficients.
What if the coefficient a is negative?
The calculator factors out -1 first and shows the minus sign in front. For example -x² + 5x - 6 becomes -(x - 2)(x - 3). The roots are unchanged.
Why does the calculator say it cannot factor?
The search only accepts integer coefficients in the two binomials. When the discriminant is positive but not a perfect square, the roots are irrational and no such integer factorization exists. The roots output still gives the decimal values.
Is reverse FOIL the same as the quadratic formula?
They are complementary. The quadratic formula finds the roots from any coefficients, while reverse FOIL writes the expression as a product. When a factorization with integer coefficients exists, the roots follow directly from the factors.