Permalink
Fetching contributors…
Cannot retrieve contributors at this time
109 lines (100 sloc) 5.74 KB
<!DOCTYPE html>
<html data-require="math math-format">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Factoring quadratics 2</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="abs(A) !== abs(B)">
<var id="A">randRangeNonZero(-10, 10)</var>
<var id="B">randRangeNonZero(-10, 10)</var>
</div>
<var id="COMMON">randRangeNonZero(-1, 1) * randRangeNonZero(2, 5)</var>
<var id="COMMON_VAR">!!randRange(0, 1)</var>
<var id="CONSTANT">A * B</var>
<var id="LINEAR">-A - B</var>
</div>
<p class="question">
Factor the expression below completely. All coefficients should be integers.
</p>
<p class="problem"><code>
<var>COMMON</var>x^<var>COMMON_VAR ? 3 : 2</var> +
<var>COMMON * LINEAR</var>x^<var>COMMON_VAR ? 2 : 1</var> +
<var>COMMON * CONSTANT</var><var>COMMON_VAR ? "x" : ""</var>
</code></p>
<p class="solution" data-if="COMMON_VAR" data-same-form="" data-type="expression">
<var>COMMON</var>x(x-<var>A</var>)(x-<var>B</var>)
</p><p class="solution" data-else="" data-same-form="" data-type="expression">
<var>COMMON</var>(x-<var>A</var>)(x-<var>B</var>)
</p>
<div class="hints">
<div>
<p>If we notice that all terms have a common factor, we can rewrite the expression as,</p>
<p data-if="COMMON_VAR"><code><var>COMMON</var>x(x^2 + <var>LINEAR</var>x + <var>CONSTANT</var>)</code>.</p><p data-else=""><code><var>COMMON</var>(x^2 + <var>LINEAR</var>x + <var>CONSTANT</var>)</code>.</p>
<p>We can now focus on factoring the polynomial <code>x^2 + <var>LINEAR</var>x + <var>CONSTANT</var></code>.</p>
</div>
<div>
<p>When we factor a polynomial, we are basically reversing this process of multiplying linear expressions together:</p>
<p><code>
\qquad \begin{eqnarray}
(x + a)(x + b) \quad&amp;=&amp;\quad xx &amp;+&amp; xb + ax &amp;+&amp; ab \\ \\
&amp;=&amp;\quad x^2 &amp;+&amp; \green{(a + b)}x &amp;+&amp; \blue{ab}
\end{eqnarray}
</code></p>
</div>
<div>
<p><code>
\qquad \begin{eqnarray}
\hphantom{(x + a)(x + b) \quad}&amp;\hphantom{=}&amp;\hphantom{\quad xx }&amp;\hphantom{+}&amp;\hphantom{ (a + b)x }&amp;\hphantom{+} &amp; \\
&amp;=&amp;\quad x^2 &amp;
<var>LINEAR &gt;= 0 ? "+" : ""</var>&amp;
<var>plus( "\\green{" + LINEAR + "}x" )</var>&amp;
<var>CONSTANT &gt;= 0 ? "+" : ""</var>&amp;
<var>plus( "\\blue{" + CONSTANT + "}" )</var>
\end{eqnarray}
</code></p>
<p>
The coefficient on the <code>x</code> term is <code class="hint_green"><var>LINEAR</var></code>
and the constant 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 try out different factors of <code class="hint_blue"><var>CONSTANT</var></code> to see if you can find two
that satisfy both conditions. If you're stuck and can't think of any, you can also rewrite the conditions as a system of equations and
try solving for <code class="hint_pink">a</code> and <code class="hint_pink">b</code>:</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>
</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>
<span>So we can factor the polynomial as:</span>
<code>(x <var>A &lt; 0 ? "+" : ""</var> \pink{<var>-A</var>})(x <var>B &lt; 0 ? "+" : ""</var> \pink{<var>-B</var>})</code>
</p><p><b>
The fully factored expression is:
<span data-if="COMMON_VAR"><code><var>COMMON</var>x(x + <var>-A</var>)(x + <var>-B</var>)</code></span>
<span data-else=""><code><var>COMMON</var>(x + <var>-A</var>)(x + <var>-B</var>)</code></span>
</b></p>
<p></p>
</div>
</div>
</div>
</div>
</body>
</html>