This repository has been archived by the owner on May 11, 2021. It is now read-only.
/
factoring_polynomials_1.html
95 lines (86 loc) · 5.39 KB
/
factoring_polynomials_1.html
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
90
91
92
93
94
95
<!DOCTYPE html>
<html data-require="math math-format">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Factoring polynomials 1</title>
<script src="../khan-exercise.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="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>
</div>
<p class="problem">Factor the following expression:</p>
<p class="question"><code><var>plus(SQUARE + "x^2")</var> + <var>plus( LINEAR + "x" )</var> + <var>CONSTANT</var></code></p>
<div class="solution" data-type="set">
<div class="set-sol" data-type="regex">^\s*\(\s*[xX]\s*<var>A < 0 ? "\\+" : "[-\u2212]"</var>\s*<var>abs( A )</var>\s*\)\s*\(\s*[xX]\s*<var>B < 0 ? "\\+" : "[-\u2212]"</var>\s*<var>abs( B )</var>\s*\)\s*$</div>
<div class="set-sol" data-type="regex">^\s*\(\s*[xX]\s*<var>B < 0 ? "\\+" : "[-\u2212]"</var>\s*<var>abs( B )</var>\s*\)\s*\(\s*[xX]\s*<var>A < 0 ? "\\+" : "[-\u2212]"</var>\s*<var>abs( A )</var>\s*\)\s*$</div>
<div class="input-format"><span class="entry"></span></div>
<div class="example">a factored expression, like <b>(x+1)(x+2)</b></div>
</div>
<div class="hints">
<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&=&\quad xx &+& xb + ax &+& ab \\ \\
&=&\quad x^2 &+& \color{<var>GREEN</var>}{(a + b)}x &+& \color{<var>BLUE</var>}{ab}
\end{eqnarray}
</code></p>
</div>
<div>
<p><code>
\qquad \begin{eqnarray}
\hphantom{(x + a)(x + b) \quad}&\hphantom{=}&\hphantom{\quad xx }&\hphantom{+}&\hphantom{ (a + b)x }&\hphantom{+}& \\
&=&\quad x^2 &
<var>SIMPLELINEAR >= 0 ? "+" : ""</var>&
<var>plus( "\\color{" + GREEN + "}{" + SIMPLELINEAR + "}x" )</var>&
<var>SIMPLECONSTANT >= 0 ? "+" : ""</var>&
<var>plus( "\\color{" + BLUE + "}{" + SIMPLECONSTANT + "}" )</var>
\end{eqnarray}
</code></p>
<p>
The coefficient on the <code>x</code> term is <code class="hint_green"><var>SIMPLELINEAR</var></code>
and the constant 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
<code><var>SIMPLECONSTANT</var></code></span>.
</p>
</div>
<div>
<p>You can try out different factors of <code class="hint_blue"><var>SIMPLECONSTANT</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 \color{<var>PINK</var>}{a} + \color{<var>PINK</var>}{b} = \color{<var>GREEN</var>}{<var>SIMPLELINEAR</var>}</code></p>
<p><code>\qquad \color{<var>PINK</var>}{a} \times \color{<var>PINK</var>}{b} = \color{<var>BLUE</var>}{<var>SIMPLECONSTANT</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 \color{<var>PINK</var>}{<var>-A</var>} + \color{<var>PINK</var>}{<var>-B</var>} =
\color{<var>GREEN</var>}{<var>SIMPLELINEAR</var>}
</code></p>
<p><code>
\qquad \color{<var>PINK</var>}{<var>-A</var>} \times \color{<var>PINK</var>}{<var>-B</var>} =
\color{<var>BLUE</var>}{<var>SIMPLECONSTANT</var>}
</code></p>
</div>
<p><b>
<span>So we can factor the expression as:</span>
<code>(x <var>A < 0 ? "+" : ""</var> \color{<var>PINK</var>}{<var>-A</var>})(x <var>B < 0 ? "+" : ""</var> \color{<var>PINK</var>}{<var>-B</var>})</code>
</b></p>
</div>
</div>
</div>
</div>
</body>
</html>