Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

102 lines (92 sloc) 5.947 kb
<!DOCTYPE html>
<html data-require="math math-format math-model simplify factoring-expressions subhints">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Factoring polynomials with two variables</title>
<script src="../khan-exercise.js"></script>
<div class="exercise">
<div class="problems">
<div class="vars">
<div data-ensure="A !== B && A !== -B">
<var id="A">randRangeNonZero( -10, 10 )</var>
<var id="B">randRangeNonZero( -10, 10 )</var>
<var id="SQUARE">1</var>
<var id="CONSTANT">SQUARE*A*B</var>
<var id="SIMPLECONSTANT">A*B</var>
<var id="LINEAR">SQUARE*(-A-B)</var>
<var id="SIMPLELINEAR">-A-B</var>
<var id="GROUP1">[
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),
<var id="QUESTION">simplify(parse(SQUARE + "x^{2}+" + LINEAR + "xy+" + CONSTANT + "y^{2}"), simplifyOptions.basic)</var>
<var id="SOLUTION">simplify(parse("(x + #{" + (-A) + "}y)(x + #{" + (-B) + "}y)", [PINK, PINK]), simplifyOptions.checkInput)</var>
<var id="SOLUTION2">simplify(parse("(-x + #{" + (A) + "}y)(-x + #{" + (B) + "}y)", [PINK, PINK]), simplifyOptions.checkInput)</var>
<p class="problem">Factor the following expression:</var></code></p>
<p class="question"><code><var>format(QUESTION)</var></code></p>
<div class="solution" data-type="custom">
<div class="instruction">
<input name="response" type="text">
<div class="guess">$( "div.instruction input" ).val()</div>
<div class="validator-function">
return (isEqual(simplify(parse(guess), simplifyOptions.checkInput), simplify(SOLUTION, simplifyOptions.checkInput)) ||
isEqual(simplify(parse(guess), simplifyOptions.checkInput), simplify(SOLUTION2, simplifyOptions.checkInput)))
<div class="show-guess">
<div class="show-guess-solutionarea">
$( "div.instruction input" ).val( guess );
<div class="example">a factored expression, like <b>(x+2y)(x+3y)</b></div>
<div class="hints">
<p>When we factor a polynomial of this form, we are basically reversing this process of multiplying linear expressions together:</p>
<p><code>\qquad <var>formatGroup(GROUP1, [0, 1])</var></code></p>
<p><code>\qquad <var>formatGroup(GROUP1, [2])</var></code></p>
The coefficient on the <code>xy</code> term is <code class="hint_green"><var>SIMPLELINEAR</var></code>
and the coefficient on the <code>y^2</code> term is <code class="hint_blue"><var>SIMPLECONSTANT</var></code>, so to reverse the steps above, we need to find two numbers
that <span class="hint_green">add up to <code><var>SIMPLELINEAR</var></code></span> and <span class="hint_blue">multiply to
<p>You can start by trying to guess which factors of <code class="hint_blue"><var>SIMPLECONSTANT</var></code> add up to
<span class="hint_green"><code><var>SIMPLELINEAR</var></code></span>. In other words, you need to find the values for <code class="hint_pink">a</code> and
<code class="hint_pink">b</code> that meet the following conditions:</p>
<p><code>\qquad <var>parseFormat("#a+#b=#{"+ SIMPLELINEAR + "}", [PINK, PINK, GREEN])</var></code></p>
<p><code>\qquad <var>parseFormat("#a \\times #b = #{" + SIMPLECONSTANT + "}", [PINK, PINK, BLUE])</var></code></p>
<p>If you're stuck, try listing out every single factor of <code class="hint_blue"><var>SIMPLECONSTANT</var></code> and its opposite as
<code class="hint_pink">a</code> in these equations, and see if it gives a value for <code class="hint_pink">b</code>
that validates both conditions. For example, since <var>Math.abs(A)</var> is a factor of <code class="hint_blue"><var>SIMPLECONSTANT</var></code>,
try substituting <var>Math.abs(A)</var> for <code class="hint_pink">a</code> as well as <var>-Math.abs(A)</var>.</p>
<p>The two numbers <code class="hint_pink"><var>-A</var></code> and <code class="hint_pink"><var>-B</var></code> satisfy both conditions:</p>
\qquad <var>parseFormat("#{" + (-A) + "}+#{" + (-B) + "}=#{" + SIMPLELINEAR + "}", [PINK, PINK, GREEN])</var>
\qquad <var>parseFormat("#{" + (-A) + "}\\times #{" + (-B) + "}=#{" + SIMPLECONSTANT + "}", [PINK, PINK, BLUE])</var>
<p><b>So we can factor the polynomial as: <code><var>format(SOLUTION)</var></code></b></p>
Jump to Line
Something went wrong with that request. Please try again.