This repository has been archived by the owner on May 11, 2021. It is now read-only.
/
solving_for_the_x-intercept.html
73 lines (66 loc) · 2.89 KB
/
solving_for_the_x-intercept.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
<!DOCTYPE html>
<html data-require="math graphie math-format expressions">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Solving for the x-intercept</title>
<script src="../khan-exercise.js"></script>
<style>
#answer_area .short input[type=text] { width: 30px; }
</style>
</head>
<body>
<div class="exercise">
<div class="vars">
<var id="X_COEFF">randRangeNonZero( -9, 9 )</var>
<var id="Y_COEFF">randRangeNonZero( -9, 9 )</var>
<var id="X_INTERCEPT">randRangeNonZero( -9, 9 )</var>
<var id="EQUALS">X_COEFF * X_INTERCEPT</var>
</div>
<div class="problems">
<div>
<p>Given the equation:</p>
<p><code><var>expr([ "*", X_COEFF, "x" ])</var> + <var>expr([ "*", Y_COEFF, "y" ])</var> = <var>EQUALS</var></code></p>
<p class="question">What is the <code>x</code>-intercept?</p>
<div class="solution" data-type="multiple">
<code>\Large{(}</code><span class="sol short" data-forms="integer"><var>X_INTERCEPT</var></span><code>,\ 0\Large{)}</code>
</div>
</div>
</div>
<div class="hints">
<p>The <code>x</code>-intercept is the point where the line crosses the <code>x</code>-axis. This happens when <code>y</code> is zero.</p>
<div>
<p>Set <code>y</code> to zero and solve for <code>x</code>.</p>
<p><code><var>expr([ "*", X_COEFF, "x" ])</var> + <var>expr([ "*", Y_COEFF, 0 ])</var> = <var>EQUALS</var></code></p>
</div>
<p><code><var>expr([ "*", X_COEFF, "x" ])</var> = <var>EQUALS</var></code></p>
<div data-if="X_COEFF !== 1" data-unwrap>
<p><code>(<var>fractionReduce( 1, X_COEFF )</var>) \cdot (<var>X_COEFF</var>x) = (<var>fractionReduce( 1, X_COEFF )</var>) \cdot (<var>EQUALS</var>)</code></p>
<p><code>x = <var>X_INTERCEPT</var></code></p>
</div>
<div>
<p>This line intersects the <code>x</code>-axis at <code>(<var>X_INTERCEPT</var>, 0)</code>.</p>
<div class="graphie">
graphInit({
range: 11,
scale: 20,
tickStep: 1,
labelStep: 1,
unityLabels: false,
labelFormat: function( s ) { return "\\small{" + s + "}"; },
axisArrows: "<->"
});
style({ stroke: BLUE });
plot(function( x ) {
return ( -1 * X_COEFF / Y_COEFF ) * x + EQUALS / Y_COEFF;
}, [ -11, 11 ] );
circle( [X_INTERCEPT, 0], 3/20, {
stroke: BLUE,
fill: BLUE
} );
label( [X_INTERCEPT, 0], "(" + X_INTERCEPT + ", 0)", "above", { labelDistance: 5 } );
</div>
</div>
</div>
</div>
</body>
</html>