This repository has been archived by the owner on May 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 863
/
factoring_polynomials_3.html
107 lines (106 loc) · 5.69 KB
/
factoring_polynomials_3.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
96
97
98
99
100
101
102
103
104
105
106
107
<!DOCTYPE html>
<html data-require="math graphie math-model simplify">
<head>
<meta charset="UTF-8" />
<title>Factoring polynomials 3</title>
<script src="../khan-exercise.js"></script>
</head>
<body>
<div class="exercise">
<div class="problems">
<div>
<div class="vars">
<var id="a">randRange(2, 9)</var>
<var id="b_sign">randFromArray([-1, 1])</var>
<var id="b_abs">randFromArrayExclude([3, 5, 7, 9], [a])</var>
<var id="b">b_sign*b_abs</var>
<var id="A">randFromArrayExclude(getFactors(a * b_abs), [1])</var>
<var id="B">a + b</var>
<var id="C">a * b / A</var>
<var id="F1">getGCD(A, a)</var>
<var id="F2">b_sign * getGCD(b_abs, C)</var>
<var id="PROBLEM">simplify(polynomial([A, B, C], "x"), simplifyOptions.basic)</var>
<!-- use parse so that the ast matches the parsed user input -->
<var id="SOLUTION">parse("(" + F1 + "x+" + F2 + ")(" + A / F1 + "x+" + a / F1 + ")")</var>
<var id="HINT1">parse(F1 + "x(" + A / F1 + "x+" + a / F1 + ")+" + F2 + "(" + b / F2 + "x+" + C / F2 + ")}")</var>
<var id="GROUP1">[parse("#{ab} &=& #{A}*#{C} &=& " + (A*C), [GREEN, BLUE, ORANGE]),
parse("#{a}+#{b} &=& #{B} &=& #{" + B, [GREEN, GREEN, PINK])]</var>
</div>
<div>
<p class="question">
Factor the following expression:
</p>
<p>
<code><var>format(PROBLEM, "large")</var></code>
</p>
</div>
<div class="solution" data-type="custom">
<div class="instruction">
<input name="response" type="text">
</div>
<div class="guess">jQuery("div.instruction input").val()</div>
<div class="validator-function">
return isEqual(parse(guess), SOLUTION);
</div>
<div class="show-guess">
</div>
<div class="show-guess-solutionarea">
jQuery("div.instruction input").val(guess);
</div>
<div class="example">a factored expression, like <b>(x+1)(x+2)</b></div>
</div>
<div class="hints">
<div>
<p>The expression is of the form
<code><var>parseFormat("#{A}x^2+#{B}x+#{C}}", [BLUE, PINK, ORANGE])</var></code>.
You can factor this trinomial by grouping. In this case,
<code>\blue{A}=\blue{<var>A</var>}</code>, <code>\pink{B}=\pink{<var>B</var>}</code>,
<code>\orange{C}=\orange{<var>C</var>}</code>
</p>
</div>
<div>
<p>To do this, the first step is to find two values
<code>\green{a}</code> and
<code>\green{b}</code>, such that:</p>
<p><code><var>parseFormat("#{ab} = #{A}*#{C}", [GREEN, BLUE, ORANGE])</var></code></p>
<p><code><var>parseFormat("#{a}+#{b} = #{B}", [GREEN, GREEN, PINK])</var></code></p>
<p>The next step is to rewrite the
expression as <code><var>parseFormat("#{A}x^2 + #{a}x + #{b}x + #{C}", [BLUE, GREEN, GREEN, ORANGE])</var></code> or
<code><var>parseFormat("(#{A}x^2 + #{a}x) + (#{b}x + #{C})", [BLUE, GREEN, GREEN, ORANGE])</var></code>, and factor each term, to
find a common factor.</p>
</div>
<div>
<p>To apply the first step, you need to find
<code>\green{a}</code> and <code>\green{b}</code> such that:</p>
<p><code><var>formatGroup(GROUP1, [0,1])</var></code></p>
</div>
<div>
<p>The following values can be used:</p>
<p><code><var>parseFormat("#{a}=#{" + a + "}", [GREEN, GREEN])</var></code><br>
<code><var>parseFormat("#{b}=#{" + b + "}", [GREEN, GREEN])</var></code></p>
</div>
<div>
<p>For the second step, rewrite the expression as:</p>
<p><code><var>parseFormat("#{" + A + "}x^2+#{" + a + "}x+#{" + b + "}x+#{" + C + "}}", [BLUE, GREEN, GREEN, ORANGE])</var></code></p>
<p>or</p><p><code><var>parseFormat("(#{" + A + "}x^2+#{" + a + "}x)+(#{" + b + "}x+#{" + C + "})", [BLUE, GREEN, GREEN, ORANGE])</var></code></p>
<p>The next step is to factor both terms of the above expression:</p>
</div>
<div>
<p>
<code><var>format(HINT1, {del1factors:true, evalBasicNumOps:true})</var></code>
</p>
</div>
<div class="final_answer">
<p>
Redistribute the common term to get the answer:
</p>
<p>
<code><var>format(SOLUTION, simplifyOptions.basic, false, "large")</var></code>
</p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>