Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 89 lines (81 sloc) 5.245 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
<!DOCTYPE html>
<html data-require="math math-format">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Factoring polynomials with two variables</title>
    <script data-main="../local-only/main.js" src="../local-only/require.js"></script>
</head>
<body>
    <div class="exercise">
    <div class="problems">
        <div>
            <div class="vars">
                <div data-ensure="A !== B && A !== -B">
                    <var id="A">randRangeNonZero( -10, 10 )</var>
                    <var id="B">randRangeNonZero( -10, 10 )</var>
                </div>
                <var id="CONSTANT">A * B</var>
                <var id="CONSTANT_DISP">CONSTANT === 1 ? "" : CONSTANT === -1 ? "-" : CONSTANT</var>
                <var id="LINEAR">-A - B</var>
                <var id="LINEAR_DISP">LINEAR === 1 ? "" : LINEAR === -1 ? "-" : LINEAR</var>
            </div>

            <p class="problem">Factor the following expression:</p>
            <p class="question"><code>
                x^2 + <var>LINEAR_DISP</var>xy + <var>CONSTANT_DISP</var>y^2
            </code></p>

            <p class="solution" data-type="expression" data-same-form>(x-<var>A</var>y)(x-<var>B</var>y)</p>

            <div class="hints">
                <div>
                    <p>When we factor a polynomial of this form, we are basically reversing this process of multiplying linear expressions together:</p>
                    <p><code>\qquad
                        \begin{eqnarray}
                        (x + ay)(x + by)&amp;=&amp;xx &amp;+&amp; xby + ayx &amp;+&amp; ayby \\ \\
                        &amp;=&amp; x^2 &amp;+&amp; \green{(a+b)}xy &amp;+&amp; \blue{ab}y^2 \\
                        &amp;\hphantom{=}&amp; \hphantom{x^2} &amp;\hphantom{+}&amp; \hphantom{\green{<var>LINEAR</var>}xy} &amp;\hphantom{+}&amp; \hphantom{\blue{<var>CONSTANT</var>}y^2}
                        \end{eqnarray}
                    </code></p>
                </div>

                <div>
                    <p><code>\qquad
                        \begin{eqnarray}
                        \hphantom{(x + ay)(x + by)}&amp;\hphantom{=}&amp;\hphantom{xx} &amp;\hphantom{+}&amp; \hphantom{xby + ayx} &amp;\hphantom{+}&amp;\hphantom{ayby} \\
                        &amp;\hphantom{=}&amp; \hphantom{x^2} &amp;\hphantom{+}&amp;\hphantom{\green{(a+b)}xy}&amp;\hphantom{+}&amp;\hphantom{\blue{ab}y^2} \\
                        &amp;=&amp; x^2 &amp;+&amp; \green{<var>LINEAR</var>}xy &amp;+&amp; \blue{<var>CONSTANT</var>}y^2
                        \end{eqnarray}
                    </code></p>
                    <p>
                        The coefficient on the <code>xy</code> term is <code class="hint_green"><var>LINEAR</var></code>
                        and the coefficient on the <code>y^2</code> term is <code class="hint_blue"><var>CONSTANT</var></code>, so to reverse the steps above, we need to find two numbers
                        that <span class="hint_green">add up to <code><var>LINEAR</var></code></span> and <span class="hint_blue">multiply to
                        <code><var>CONSTANT</var></code></span>.
                    </p>
                </div>

                <div>
                    <p>You can start by trying to guess which factors of <code class="hint_blue"><var>CONSTANT</var></code> add up to
                    <span class="hint_green"><code><var>LINEAR</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 \pink{a} + \pink{b} = \green{<var>LINEAR</var>}</code></p>
                    <p><code>\qquad \pink{a} \times \pink{b} = \blue{<var>CONSTANT</var>}</code></p>

                    <p>If you're stuck, try listing out every single factor of <code class="hint_blue"><var>CONSTANT</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 <code><var>abs(A)</var></code> is a factor of <code class="hint_blue"><var>CONSTANT</var></code>,
                    try substituting <code><var>abs(A)</var></code> for <code class="hint_pink">a</code> as well as <code><var>-abs(A)</var></code>.</p>
                </div>

                <div>
                    <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>
                    <p><code>
                        \qquad \pink{<var>-A</var>} + \pink{<var>-B</var>} = \green{<var>LINEAR</var>}
                    </code></p>
                    <p><code>
                        \qquad \pink{<var>-A</var>} \times \pink{<var>-B</var>} = \blue{<var>CONSTANT</var>}
                    </code></p>
                </div>
                <p>
                    So we can factor the polynomial as <code>(<var>plus("x", -A + "y")</var>)(<var>plus("x", -B + "y")</var>)</code>.
                </p>
            </div>
        </div>
    </div>
    </div>
</body>
</html>
Something went wrong with that request. Please try again.