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_3.html
74 lines (71 loc) · 3.5 KB
/
linear_equations_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
<!DOCTYPE html>
<html data-require="math math-format">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Linear equations 3</title>
<script src="../khan-exercise.js"></script>
</head>
<body>
<div class="exercise">
<!-- equation is Ax + B = Cx + D -->
<div class="vars">
<var id="A">randRange( 2, 10 )</var>
<var id="B">randRangeNonZero( -10, 10 )</var>
<var id="C" data-ensure="C !== A && abs( A - C ) > 1">randRange( 2, 10 )</var>
<var id="D" data-ensure="D !== B">randRangeNonZero( 2, 10 )</var>
<var id="SOLUTION">fractionReduce( D - B, A - C )</var>
</div>
<div class="problems">
<div>
<p class="question">Solve for <code>x</code>:</p>
<div><code><var>A</var>x + <var>B</var> = <var>C</var>x + <var>D</var></code></div>
<div class="solution" data-type="multiple">
<p><code>x =</code> <span class="sol"><var>( D - B ) / ( A - C )</var></span></p>
</div>
</div>
</div>
<div class="hints">
<div data-if="A > C" data-unwrap>
<div>
<p>Subtract <code><var>C</var>x</code> from both sides:</p>
<p><code>(<var>A</var>x + <var>B</var>) - <var>C</var>x = (<var>C</var>x + <var>D</var>) - <var>C</var>x</code></p>
<p><code><var>A - C</var>x + <var>B</var> = <var>D</var></code></p>
</div>
<div>
<p><var>B > 0 ? "Subtract" : "Add"</var> <code><var>abs(B)</var></code> <var>B > 0 ? "from" : "to"</var> both sides:</p>
<p><code>(<var>A - C</var>x + <var>B</var>) + <var>-B</var> = <var>D</var> + <var>-B</var></code></p>
<p><code><var>A - C</var>x = <var>D - B</var></code></p>
</div>
<div>
<p>Divide both sides by <code><var>A - C</var></code>.</p>
<p><code>\frac{<var>A - C</var>x}{<var>A - C</var>} = \frac{<var>D - B</var>}{<var>A - C</var>}</code></p>
</div>
<div>
<p>Simplify.</p>
<p><code>x = <var>SOLUTION</var></code></p>
</div>
</div>
<div data-else data-unwrap>
<div>
<p>Subtract <code><var>A</var>x</code> from both sides:</p>
<p><code>(<var>A</var>x + <var>B</var>) - <var>A</var>x = (<var>C</var>x + <var>D</var>) - <var>A</var>x</code></p>
<p><code><var>B</var> = <var>C - A</var>x + <var>D</var></code></p>
</div>
<div>
<p><var>D > 0 ? "Subtract" : "Add"</var> <code><var>abs(D)</var></code> <var>D > 0 ? "from" : "to"</var> both sides:</p>
<p><code><var>B</var> + <var>-D</var> = (<var>C - A</var>x + <var>D</var>) + <var>-D</var></code></p>
<p><code><var>B - D</var> = <var>C - A</var>x</code></p>
</div>
<div>
<p>Divide both sides by <code><var>C - A</var></code>.</p>
<p><code>\dfrac{<var>B - D</var>}{<var>C - A</var>} = \dfrac{<var>C - A</var>x}{<var>C - A</var>}</code></p>
</div>
<div>
<p>Simplify.</p>
<p><code><var>SOLUTION</var> = x</code></p>
</div>
</div>
</div>
</div>
</body>
</html>