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
/
solutions_to_systems_of_equations.html
183 lines (175 loc) · 10.7 KB
/
solutions_to_systems_of_equations.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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
<!DOCTYPE html>
<html data-require="math math-format expressions graphie">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Solutions to systems of equations</title>
<script src="../khan-exercise.js"></script>
</head>
<body>
<div class="exercise">
<div class="vars">
<var id="INDICES">[randRange( 2, 3 ), randRange( 0, 3 )]</var>
<var id="M1">randRangeNonZero( -6, 6 )</var>
<var id="M2" data-ensure="M1 !== M2">randRangeNonZero( -6, 6 )</var>
<var id="Y1">randRangeNonZero( -10, 10 )</var>
<var id="Y2" data-ensure="Y1 !== Y2">randRangeNonZero( -10, 10 )</var>
<var id="MULT" data-ensure="MULT[0] !== 1 && MULT[1] !== 1">[randRange( 1, 3 ) * randRangeNonZero( -1, 1 ), randRange( 1, 3 ) * randRangeNonZero( -1, 1 )]</var>
<var id="AB_VALS">[{ a: M1, b: Y1 }, { a: M2, b: Y2 }]</var>
<var id="COUNT">[0, 1]</var>
</div>
<div class="problems">
<div id="original" data-weight="0">
<div class="vars">
<var id="EQUATIONS">
(function() {
var equations = [];
var i = 0;
while ( i < 2 ) {
if( INDICES[i] === 0 ) {
equations.push( "y = " + expr(["+", ["*", AB_VALS[i].a, "x"], AB_VALS[i].b]) );
}
if( INDICES[i] === 1 ) {
equations.push( "y = " + expr(["+", AB_VALS[i].b, ["*", AB_VALS[i].a, "x"]]) );
}
if( INDICES[i] === 2 ) {
equations.push( expr(["+", ["*", -AB_VALS[i].a, "x"], "y"]) + " = " + AB_VALS[i].b );
}
if( INDICES[i] === 3 ) {
equations.push( expr(["+", ["*", -AB_VALS[i].a * MULT[i], "x"], ["*", MULT[i], "y"]]) + " = " + AB_VALS[i].b * MULT[i] );
}
i++;
}
return equations;
})()
</var>
<var id="SIGNS_1">[AB_VALS[0].a > 0 ? "+" : "-", AB_VALS[1].a > 0 ? "+" : "-"]</var>
<var id="SIGNS_2">[( AB_VALS[0].a * MULT[0] ) > 0 ? "+" : "-", ( AB_VALS[1].a * MULT[1] ) > 0 ? "+" : "-"]</var>
</div>
<p class="problem">Determine how many solutions exist for the system of equations.</p>
<div class="question">
<p><code>\color{<var>BLUE</var>}{<var>EQUATIONS[0]</var>}</code><br />
<code>\color{<var>GREEN</var>}{<var>EQUATIONS[1]</var>}</code></p>
</div>
<ul class="choices" data-category="true">
<li>One solution</li>
<li>Infinite solutions</li>
<li>No solutions</li>
</ul>
<div class="hints">
<p>Convert both equations to slope-intercept form:</p>
<div data-unwrap>
<p data-each="COUNT as INDEX"><code>\color{<span data-if="INDEX === 0"><var>BLUE</var></span><span data-else><var>GREEN</var></span>}{<var>EQUATIONS[INDEX]</var>}</code><br />
<span data-if="INDICES[INDEX] === 1"><code>\color{<span data-if="INDEX === 0"><var>BLUE</var></span><span data-else><var>GREEN</var></span>}{y = <var>expr(["+", ["*", AB_VALS[INDEX].a, "x"], AB_VALS[INDEX].b])</var>}</code></span>
<span data-if="INDICES[INDEX] === 2"><code><var>expr(["*", -AB_VALS[INDEX].a, "x"])</var>\color{<var>PINK</var>}{<var>SIGNS_1[INDEX]</var><var>expr(["*", abs( AB_VALS[INDEX].a ), "x"])</var>} + y = <var>AB_VALS[INDEX].b</var>\color{<var>PINK</var>}{<var>SIGNS_1[INDEX]</var><var>expr(["*", abs( AB_VALS[INDEX].a ), "x"])</var>}</code><br />
<code>y = <var>AB_VALS[INDEX].b</var><var>SIGNS_1[INDEX]</var><var>expr(["*", abs( AB_VALS[INDEX].a ), "x"])</var></code><br />
<code>\color{<span data-if="INDEX === 0"><var>BLUE</var></span><span data-else><var>GREEN</var></span>}{y = <var>expr(["+", ["*", AB_VALS[INDEX].a, "x"], AB_VALS[INDEX].b])</var>}</code></span>
<span data-if="INDICES[INDEX] === 3"><code><var>expr(["*", -AB_VALS[INDEX].a * MULT[INDEX], "x"])</var>\color{<var>PINK</var>}{<var>SIGNS_2[INDEX]</var><var>expr(["*", abs( AB_VALS[INDEX].a * MULT[INDEX] ), "x"])</var>} + <var>expr(["*", MULT[INDEX], "y"])</var> = <var>AB_VALS[INDEX].b * MULT[INDEX]</var>\color{<var>PINK</var>}{<var>SIGNS_2[INDEX]</var><var>expr(["*", abs( AB_VALS[INDEX].a * MULT[INDEX] ), "x"])</var>}</code><br />
<code><var>expr(["*", MULT[INDEX], "y"])</var> = <var>AB_VALS[INDEX].b * MULT[INDEX]</var><var>SIGNS_2[INDEX]</var><var>expr(["*", abs( AB_VALS[INDEX].a * MULT[INDEX] ), "x"])</var></code><br />
<code>y = <var>AB_VALS[INDEX].b</var><var>SIGNS_1[INDEX]</var><var>expr(["*", abs( AB_VALS[INDEX].a ), "x"])</var></code><br />
<code>\color{<span data-if="INDEX === 0"><var>BLUE</var></span><span data-else><var>GREEN</var></span>}{y = <var>expr(["+", ["*", AB_VALS[INDEX].a, "x"], AB_VALS[INDEX].b])</var>}</code></span></p>
</div>
<div>
<p>Just by looking at both equations in slope-intercept form, what can you determine?</p>
<p><code>\color{<var>BLUE</var>}{y = <var>expr(["+", ["*", AB_VALS[0].a, "x"], AB_VALS[0].b])</var>}</code><br />
<code>\color{<var>GREEN</var>}{y = <var>expr(["+", ["*", AB_VALS[1].a, "x"], AB_VALS[1].b])</var>}</code></p>
</div>
</div>
</div>
<div id="one_solution" data-type="original">
<div class="vars">
<var id="AB_VALS">[{ a: M1, b: Y1 }, { a: M2, b: Y2 }]</var>
</div>
<div class="solution">One solution</div>
<div class="hints" data-apply="appendContents">
<div>
<p>The linear equations have different slopes.</p>
<div class="graphie" id="grid">
graphInit({
range: [[-10, 10], [-10, 10]],
scale: [18, 18],
tickStep: 1,
labelStep: 1,
unityLabels: false,
labelFormat: function( s ) { return "\\small{" + s + "}"; },
axisArrows: "<->"
});
plot(function( x ) {
return ( AB_VALS[0].a * x + AB_VALS[0].b );
}, [-10, 10], {
stroke: "BLUE"
});
plot(function( x ) {
return ( AB_VALS[1].a * x + AB_VALS[1].b );
}, [-10, 10], {
stroke: "GREEN"
});
</div>
</div>
<p>When two equations have different slopes, the lines will intersect once with one solution.</p>
</div>
</div>
<div id="infinite_solutions" data-type="original">
<div class="vars">
<var id="AB_VALS">[{ a: M1, b: Y1 }, { a: M1, b: Y1 }]</var>
</div>
<div class="solution">Infinite solutions</div>
<div class="hints" data-apply="appendContents">
<div>
<p>Both equations have the same slope and the same y-intercept, which means the lines would completely overlap.</p>
<div class="graphie" id="grid">
graphInit({
range: [[-10, 10], [-10, 10]],
scale: [18, 18],
tickStep: 1,
labelStep: 1,
unityLabels: false,
labelFormat: function( s ) { return "\\small{" + s + "}"; },
axisArrows: "<->"
});
plot(function( x ) {
return ( AB_VALS[0].a * x + AB_VALS[0].b );
}, [-10, 10], {
stroke: "BLACK"
});
</div>
</div>
<p>Since any solution of <code>\color{<var>BLUE</var>}{<var>EQUATIONS[0]</var>}</code> is also a solution of <code>\color{<var>GREEN</var>}{<var>EQUATIONS[1]</var>}</code>, there are infinitely many solutions.</p>
</div>
</div>
<div id="zero_solutions" data-type="original">
<div class="vars">
<var id="AB_VALS">[{ a: M1, b: Y1 }, { a: M1, b: Y2 }]</var>
</div>
<div class="solution">No solutions</div>
<div class="hints" data-apply="appendContents">
<div>
<p>Both equations have the same slope with different y-intercepts. This means the equations are parallel.</p>
<div class="graphie" id="grid">
graphInit({
range: [[-10, 10], [-10, 10]],
scale: [18, 18],
tickStep: 1,
labelStep: 1,
unityLabels: false,
labelFormat: function( s ) { return "\\small{" + s + "}"; },
axisArrows: "<->"
});
plot(function( x ) {
return ( AB_VALS[0].a * x + AB_VALS[0].b );
}, [-10, 10], {
stroke: "BLUE"
});
plot(function( x ) {
return ( AB_VALS[1].a * x + AB_VALS[1].b );
}, [-10, 10], {
stroke: "GREEN"
});
</div>
</div>
<p>Parallel lines never intersect, thus there are NO SOLUTIONS.</p>
</div>
</div>
</div>
</div>
</body>
</html>