randRange( 2, 6 ) randRange( 1, 6 ) randFromArray([2, 3, 5]) A * A -B * B F "[-\\u2212]" + F "\$$\\s*" + A + "\\s*[xX]\\s*\\+\\s*" + B + "\\s*\$$" "\$$\\s*[-\\u2212]" + A + "\\s*[xX]\\s*[-\\u2212]\\s*" + B + "\\s*\$$" "\$$\\s*" + A + "\\s*[xX]\\s*[-\\u2212]\\s*" + B + "\\s*\$$" "\$$\\s*[-\\u2212]" + A + "\\s*[xX]\\s*\\+\\s*" + B + "\\s*\$$"

Factor the following expression:

F * SQUAREx^2 + F * CONSTANT

^\s*TERM1\s*TERM2\s*TERM3\s*$^\s*TERM1\s*TERM3\s*TERM2\s*$
^\s*TERM2\s*TERM1\s*TERM3\s*$^\s*TERM2\s*TERM3\s*TERM1\s*$
^\s*TERM3\s*TERM1\s*TERM2\s*$^\s*TERM3\s*TERM2\s*TERM1\s*$
^\s*TERM1N\s*TERM2N\s*TERM3\s*$^\s*TERM1N\s*TERM3N\s*TERM2\s*$
^\s*TERM2N\s*TERM1N\s*TERM3\s*$^\s*TERM2N\s*TERM3N\s*TERM1\s*$
^\s*TERM3N\s*TERM1N\s*TERM2\s*$^\s*TERM3N\s*TERM2N\s*TERM1\s*$
^\s*TERM1N\s*TERM2\s*TERM3N\s*$^\s*TERM1N\s*TERM3\s*TERM2N\s*$
^\s*TERM2N\s*TERM1\s*TERM3N\s*$^\s*TERM2N\s*TERM3\s*TERM1N\s*$
^\s*TERM3N\s*TERM1\s*TERM2N\s*$^\s*TERM3N\s*TERM2\s*TERM1N\s*$
^\s*TERM1\s*TERM2N\s*TERM3N\s*$^\s*TERM1\s*TERM3N\s*TERM2N\s*$
^\s*TERM2\s*TERM1N\s*TERM3N\s*$^\s*TERM2\s*TERM3N\s*TERM1N\s*$
^\s*TERM3\s*TERM1N\s*TERM2N\s*$^\s*TERM3\s*TERM2N\s*TERM1N\s*$
a factored expression, like 2(3x+1)(3x+2)

We can start by factoring a \green{F} out of each term:

\qquad \green{F}(\pink{SQUAREx^2} - \blue{abs(CONSTANT)})

The second term is of the form \color{PINK}{a^2} - \color{BLUE}{b^2}, which is a difference of two squares so we can factor it as \green{F}(\pink{a} + \blue{b}) (\color{PINK}{a} - \color{BLUE}{b}).

What are the values of a and b?

\qquad a = \sqrt{SQUAREx^2} = Ax

\qquad b = \sqrt{B * B} = B

Use the values we found for a and b to complete the factored expression, \green{F}(\color{PINK}{a} + \color{BLUE}{b}) (\color{PINK}{a} - \color{BLUE}{b}).

So we can factor the expression as: \green{F}(\color{PINK}{Ax} + \color{BLUE}{B}) (\color{PINK}{Ax} - \color{BLUE}{B})