James Tanton’s Quadratics Solver

Solve the quadratic equation x2{{b < 0 ? '–' : '+'}}x{{c < 0 ? '–' : '+'}}=0.

{{af}}x{{disp(bf)}}
{{af}}x{{a * ax * bx}}x2{{abs(b * ax * bx / 2)}}x
{{disp(bf)}}{{abs(b * ax * bx / 2)}}x{{disp(bf * bf)}}

Step 1: First we have to ensure that the first term is a perfect square. If necessary, we can multiply the entire equation by some factor:

If we multiply the entire equation by {{disp(ax)}}, we get

{{a*ax}}x2{{sign(b*ax)}}{{abs(b*ax)}}x{{sign(c*ax)}}{{abs(c*ax)}}=0

We can already factorise {{a*ax}}x2 into a square.

Step 2: Next, we have to check that the second term is even, while also keeping the first term a square.

We multiply the entire equation by 4 (not 2), to ensure that the first term remains a perfect square. Now we have

{{a*ax*bx}}x2{{sign(b*ax*bx)}}{{abs(b*ax*bx)}}x{{sign(c*ax*bx)}}{{abs(c*ax*bx)}}=0

We can also fill in the remaining cells in the table.

Step 3: Finally, we have to ensure that the third term matches the value in the last square, by adding their difference to both sides of the equation:

If we add {{disp(cx)}} to both sides of the equation, we get

{{a*ax*bx}}x2{{sign(b*ax*bx)}}{{abs(b*ax*bx)}}x{{sign(bf*bf)}}{{abs(bf*bf)}}={{disp(cx)}}

Step 4: The left-hand side of the equation is now a perfect square. We can read off the factorised version from the diagram:

{{af}}x{{bf < 0 ? '–' : '+'}}{{abs(bf)}}2={{disp(cx)}}

Step 5: Finally, we can take square roots of both sides. Remember to add a ± sign on the right-hand side:

{{af}}x{{bf < 0 ? '–' : '+'}}{{abs(bf)}}=±{{disp(sqrt(cx))}}±{{disp(cx)}}

Step 6: All that is left is to clean up the equation, and isolate x:

x=±{{disp(sqrt(cx))}}±{{disp(cx)}}{{bf > 0 ? '–' : '+'}}{{abs(bf)}}±{{disp(sqrt(cx))}}±{{disp(cx)}}{{bf > 0 ? '–' : '+'}}{{abs(bf)}}{{disp(af)}}

There is only one solution: x={{disp(x1)}}.

Since we can’t take square roots of negative numbers, this equation doesn’t have any (real) solutions.

The two correct solutions are x={{disp(x1)}} and x={{disp(x2)}}.

Archie