randRangeNonZero( -10, 10 ) randRangeNonZero( -10, 10 )
1 SQUARE*A*B A*B SQUARE*(-A-B) -A-B [ parse("(x + ay)(x + by)&=&xx &+& xby + ayx &+& ayby"), parse("&=& x^2 &+& #{(a+b)}xy &+& #{ab}y^2", [GREEN, BLUE]), simplify(parse("&=& x^2 &+& #{" + SIMPLELINEAR + "}xy &+& #{" + SIMPLECONSTANT + "}y^2", [GREEN, BLUE]), simplifyOptions.checkInput), ] simplify(parse(SQUARE + "x^{2}+" + LINEAR + "xy+" + CONSTANT + "y^{2}"), simplifyOptions.basic) simplify(parse("(x + #{" + (-A) + "}y)(x + #{" + (-B) + "}y)", [PINK, PINK]), simplifyOptions.checkInput) simplify(parse("(-x + #{" + (A) + "}y)(-x + #{" + (B) + "}y)", [PINK, PINK]), simplifyOptions.checkInput)

Factor the following expression:

format(QUESTION)

$( "div.instruction input" ).val() return (isEqual(simplify(parse(guess), simplifyOptions.checkInput), simplify(SOLUTION, simplifyOptions.checkInput)) || isEqual(simplify(parse(guess), simplifyOptions.checkInput), simplify(SOLUTION2, simplifyOptions.checkInput)))$( "div.instruction input" ).val( guess );
a factored expression, like (x+2y)(x+3y)

When we factor a polynomial of this form, we are basically reversing this process of multiplying linear expressions together:

\qquad formatGroup(GROUP1, [0, 1])

\qquad formatGroup(GROUP1, [2])

The coefficient on the xy term is SIMPLELINEAR and the coefficient on the y^2 term is SIMPLECONSTANT, so to reverse the steps above, we need to find two numbers that add up to SIMPLELINEAR and multiply to SIMPLECONSTANT.

You can start by trying to guess which factors of SIMPLECONSTANT add up to SIMPLELINEAR. In other words, you need to find the values for a and b that meet the following conditions:

\qquad parseFormat("#a+#b=#{"+ SIMPLELINEAR + "}", [PINK, PINK, GREEN])

\qquad parseFormat("#a \\times #b = #{" + SIMPLECONSTANT + "}", [PINK, PINK, BLUE])

If you're stuck, try listing out every single factor of SIMPLECONSTANT and its opposite as a in these equations, and see if it gives a value for b that validates both conditions. For example, since Math.abs(A) is a factor of SIMPLECONSTANT, try substituting Math.abs(A) for a as well as -Math.abs(A).

The two numbers -A and -B satisfy both conditions:

 \qquad parseFormat("#{" + (-A) + "}+#{" + (-B) + "}=#{" + SIMPLELINEAR + "}", [PINK, PINK, GREEN]) 

 \qquad parseFormat("#{" + (-A) + "}\\times #{" + (-B) + "}=#{" + SIMPLECONSTANT + "}", [PINK, PINK, BLUE]) 

So we can factor the polynomial as: format(SOLUTION)