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
/
linear_equations_4.html
94 lines (90 loc) · 5.65 KB
/
linear_equations_4.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
<!DOCTYPE html>
<html data-require="math math-format">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Linear equations 4</title>
<script src="../khan-exercise.js"></script>
</head>
<body>
<div class="exercise">
<div class="problems">
<div id="x-on-bottom">
<!-- A = B / (Cx + D) -->
<div class="vars" data-ensure="( C * ANSWER + D !== 0 )">
<var id="A">randRange( 2, 8 )</var>
<var id="B">randRangeNonZero( -12, 18 )</var>
<var id="C">randRangeNonZero( -6, 6 )</var>
<var id="D">randRangeNonZero( -6, 6 )</var>
<var id="ANSWER">( B - A * D ) / ( A * C )</var>
</div>
<p class="question">Solve for <code>x</code>:</p>
<div><code><var>A</var> = \dfrac{<var>B</var>}{<var>expr(["*", C, "x"])</var> + <var>D</var>}</code></div>
<div class="solution" data-type="multiple">
<p><code>x =</code> <span class="sol"><var>ANSWER</var></span></p>
</div>
<div class="hints">
<div>
<p>Multiply both sides by <code><var>expr(["*", C, "x"])</var> + <var>D</var></code>:</p>
<p><code>\qquad <var>A</var> (<var>expr(["*", C, "x"])</var> + <var>D</var>) = \dfrac{<var>B</var>}{<var>expr(["*", C, "x"])</var> + <var>D</var>} (<var>expr(["*", C, "x"])</var> + <var>D</var>)</code></p>
<p><code>\qquad <var>A * C</var>x + <var>A * D</var> = <var>B</var></code></p>
</div>
<div>
<p>Now <var>A * D < 0 ? "add" : "subtract"</var> <code><var>abs( A * D )</var></code> <var>A * D < 0 ? "to" : "from"</var> both sides:</p>
<p><code>\qquad (<var>A * C</var>x + <var>A * D</var>) + <var>-A * D</var> = <var>B</var> + <var>- A * D</var></code></p>
<p><code>\qquad <var>A * C</var>x = <var>B - A * D</var></code></p>
</div>
<div>
<p>Divide by <code><var>A * C</var></code>:</p>
<p><code>\qquad x = <var>fraction( B - A * D, A * C, false, false )</var></code></p>
</div>
<div data-if="reduces( B - A * D, A * C )">
<p>Reduce the fraction:</p>
<p><code>\qquad x = <var>fractionReduce( B - A * D, A * C )</var></code></p>
</div>
</div>
</div>
<div id="x-on-top-and-bottom">
<!-- (Ax + B) / (Cx + D) = E -->
<div class="vars" data-ensure="abs(A - E * C) >= 2 && ( C * ANSWER + D !== 0 )">
<var id="A">randRangeNonZero( -12, 18 )</var>
<var id="B">randRangeNonZero( -12, 18 )</var>
<var id="C">randRangeNonZero( -6, 6 )</var>
<var id="D">randRangeNonZero( -6, 6 )</var>
<var id="E">randRange( 2, 8 )</var>
<var id="ANSWER">( E * D - B ) / ( A - E * C )</var>
</div>
<p class="question">Solve for <code>x</code>:</p>
<div><code>\dfrac{<var>expr(["*", A, "x"])</var> + <var>B</var>}{<var>expr(["*", C, "x"])</var> + <var>D</var>} = <var>E</var></code></div>
<div class="solution" data-type="multiple">
<p><code>x =</code> <span class="sol"><var> ANSWER </var></span></p>
</div>
<div class="hints">
<div>
<p>Multiply both sides by <code><var>expr(["*", C, "x"])</var> + <var>D</var></code>:</p>
<p><code>\qquad \dfrac{<var>expr(["*", A, "x"])</var> + <var>B</var>}{<var>expr(["*", C, "x"])</var> + <var>D</var>} (<var>expr(["*", C, "x"])</var> + <var>D</var>) = <var>E</var> (<var>expr(["*", C, "x"])</var> + <var>D</var>)</code></p>
<p><code>\qquad <var>expr(["*", A, "x"])</var> + <var>B</var> = <var>expr(["*", E * C, "x"])</var> + <var>E * D</var></code></p>
</div>
<div>
<p>Now <var>E * C < 0 ? "add" : "subtract"</var> <code><var>abs( E * C )</var>x</code> <var>E * C < 0 ? "to" : "from"</var> both sides:</p>
<p><code>\qquad (<var>expr(["*", A, "x"])</var> + <var>B</var>) + <var>-E * C</var>x = (<var>expr(["*", E * C, "x"])</var> + <var>E * D</var>) + <var>-E * C</var>x</code></p>
<p><code>\qquad <var>A - E * C</var>x + <var>B</var> = <var>E * D</var></code></p>
</div>
<div>
<p>Now <var>B < 0 ? "add" : "subtract"</var> <code><var>abs( B )</var></code>:</p>
<p><code>\qquad (<var>A - E * C</var>x + <var>B</var>) + <var>-B</var> = <var>E * D</var> + <var>-B</var></code></p>
<p><code>\qquad <var>A - E * C</var>x = <var>E * D - B</var></code></p>
</div>
<div>
<p>Divide by <code><var>A - E * C</var></code>:</p>
<p><code>\qquad x = <var>fraction( E * D - B, A - E * C, false, false )</var></code></p>
</div>
<div data-if="reduces(E * D - B, A - E * C)">
<p>Reduce the fraction:</p>
<p><code>\qquad x = <var>fractionReduce( E * D - B, A - E * C )</var></code></p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>