# Khan/khan-exercises

### Subversion checkout URL

You can clone with
or
.
Fetching contributors…

Cannot retrieve contributors at this time

106 lines (102 sloc) 5.41 KB
 Factoring linear binomials
randRange(2, 9) random() < 0.2
randRangeExclude(-20, 20, [-1, 0, 1]) getGCD(A, B)
IS_IRREDUCIBLE ? plus(A + "x", B) : GCD + "(" + plus(A / GCD + "x", B / GCD) + ")" toSentenceTex(getFactors(abs(A)).concat(["x"])) toSentenceTex(getFactors(abs(B))) GCD "[-\\u2212]" + GCD "(?:" + (A < 0 ? "[-\\u2212]" : "") + abs(A / GCD) + (A / GCD === 1 ? "|" : "" ) + (A / GCD === -1 ? "|[-\\u2212]" : "") + ")\\s*x" "(?:" + (A > 0 ? "[-\\u2212]" : "") + abs(A / GCD) + (A / GCD === -1 ? "|" : "" ) + (A / GCD === 1 ? "|[-\\u2212]" : "") + ")\\s*x" (B < 0 ? "[-\\u2212]" : "\\+") + "\\s*" + abs(B / GCD) (B > 0 ? "[-\\u2212]" : "\\+") + "\\s*" + abs(B / GCD)

Write the following expression in its most factored form:

expr(["+", ["*", A, "x"], B])

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

To factor a polynomial, you should first try to find the greatest common factor of all the terms.

The factors of Ax are Ax_FACTORS and the factors of B are B_FACTORS.

The greatest common factor of Ax and B is GCD.

Since the greatest common factor is 1, the expression is already in its most factored form.

Therefore the answer is the original expression, SOLUTION.

We can factor out the GCD and put it before the parenthesis.

If we divide each of the terms in the original expression by GCD we get \dfrac{Ax}{GCD} = plus((A/GCD) + "x") and \dfrac{B}{GCD} = B/GCD.

So the factored expression is SOLUTION.

Something went wrong with that request. Please try again.