randRangeNonZero(-10, 10) randRangeNonZero(-10, 10) randRangeNonZero(-10, 10) B * B - 4 * A * C
splitRadical(RADICAND) new Polynomial(0, 2, [C, B, A], "x") F.text() (function() { var wrongs = []; var good_gcd = getGCD(A, B, C); for (var i = 0; i < 5; i++) { var bad_a = randRangeNonZero(-10, 10); var bad_b = randRangeNonZero(-10, 10); var bad_c = randRangeNonZero(-10, 10); var bad_gcd = getGCD( bad_a, bad_b, bad_c ); while (( abs(A*bad_gcd) === abs(bad_a*good_gcd) && abs(B*bad_gcd) === abs(bad_b*good_gcd) && abs(C*bad_gcd) === abs(bad_c*good_gcd) ) || (( (bad_b * bad_b) - (4 * bad_a * bad_c) ) < 0)) { bad_a = randRangeNonZero(-10, 10); bad_b = randRangeNonZero(-10, 10); bad_c = randRangeNonZero(-10, 10); bad_gcd = getGCD( bad_a, bad_b, bad_c ); } wrongs.push(quadraticRoots(bad_a, bad_b, bad_c)); } return wrongs; })()

`EQUATION = 0`

Solve for `x`.

`quadraticRoots(A, B, C)`

- `WRONGS[0]`
- `WRONGS[1]`
- `WRONGS[2]`
- `WRONGS[3]`
- `WRONGS[4]`

shuffle([coefficient(A) + "x^2", coefficient(B) + "x", C]).join("+") coefficient(A) + "x^2+"+ coefficient(B) + "x+" + C

Get the equation into the form `ax^2 + bx + c = 0`:

`\qquadF.text() = 0`

shuffle([0, 1, 2]) [coefficient(A) + "x^2", coefficient(B) + "x", C] [coefficient(-A) + "x^2", coefficient(-B) + "x", -C] TERMS.join("+")

`TERMS[N1] + TERMS[N2] = NEGTERMS[N3]`

Solve for `x`.

Get the equation into the form `ax^2 + bx + c = 0`:

`\qquadTERMS[N1] + TERMS[N2] + TERMS[N3] = 0`

`\qquadF.text() = 0`

shuffle([0, 1, 2]) [coefficient(A) + "x^2", coefficient(B) + "x", C] [coefficient(-A) + "x^2", coefficient(-B) + "x", -C] TERMS.join("+")

`TERMS[N1] = NEGTERMS[N2] + NEGTERMS[N3]`

Solve for `x`.

Get the equation into the form `ax^2 + bx + c = 0`:

`\qquad \begin{eqnarray} TERMS[N1] + TERMS[N2] &=& NEGTERMS[N3] \\ TERMS[N1] + TERMS[N2] + TERMS[N3] &=& 0 \\ F.text() &=& 0 \end{eqnarray}`

randRangeExclude(-10, 10, [0, A]) B C A1 - A shuffle([0, 1, 2]) [coefficient(A1) + "x^2", coefficient(B) + "x", C] [coefficient(A) + "x^2", coefficient(B) + "x", C]

`TERMS1[N1] + TERMS1[N2] + TERMS1[N3] = coefficient(A2) + "x^2"`

Solve for `x`.

Get the equation into the form `ax^2 + bx + c = 0`:

`\qquad \begin{eqnarray} TERMS2[N1] + TERMS2[N2] + TERMS2[N3] &=& 0 \\ F.text() &=& 0 \end{eqnarray}`

randRangeExclude(-10, 10, [0, B]) B1 - B shuffle([0, 1, 2]) [coefficient(A) + "x^2", coefficient(B1) + "x", C] [coefficient(A) + "x^2", coefficient(B) + "x", C]

`TERMS1[N1] + TERMS1[N2] + TERMS1[N3] = coefficient(B2) + "x"`

Solve for `x`.

randRangeExclude(-10, 10, [0, C]) C1 - C shuffle([0, 1, 2]) [coefficient(A) + "x^2", coefficient(B) + "x", C1] [coefficient(A) + "x^2", coefficient(B) + "x", C]

`TERMS1[N1] + TERMS1[N2] + TERMS1[N3] = C2`

Solve for `x`.

Use the quadratic formula to solve `ax^2 + bx + c = 0`:

`\qquad x = \dfrac{-b \pm \sqrt{b^2 - 4ac}}{2a}`

`\qquad a = A, b = B, c = C`

`\qquad x = \dfrac{-negParens(B) \pm \sqrt{expr(["^", B, 2]) - 4 \cdot A \cdot C}}{2 \cdot A}`

`\qquad x = \dfrac{-B \pm \sqrt{RADICAND}}{2 * A}`

`\qquad x = \dfrac{-B \pm formattedSquareRootOf(RADICAND)}{2 * A}`

`\qquad quadraticRoots(A, B, C)`