Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

173 lines (168 sloc) 9.707 kB
<!DOCTYPE html>
<html data-require="math">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Equations from tables</title>
<script data-main="../local-only/main.js" src="../local-only/require.js"></script>
</head>
<body>
<div class="exercise">
<div class="vars"></div>
<div class="problems">
<div id="linear">
<div class="vars">
<var id="A1">2</var>
<var id="A2">5</var>
<var id="B1">1</var>
<var id="B2">10</var>
<var id="COEF">randRange( A1, A2 )</var>
<var id="CONS">randRange( B1, B2 )</var>
<var id="XVALS">randRangeUnique( 1, 9, 4 ).sort()</var>
<var id="WRONG_ANSWERS">
(function() {
var wrongs = [];
var i = randRangeWeighted( A1, A2, COEF, 0 );
var j = ( COEF * XVALS[0] + CONS ) - ( i * XVALS[0] );
wrongs.push( { coef: i, cons: j } );
while( wrongs.length &lt; 4 ) {
i = randRange( A1, A2 );
if( i === COEF ) {
j = randRangeWeighted( B1, B2, CONS, 0 );
}
else {
j = randRange( B1, B2 );
}
wrongs.push( { coef: i, cons: j } );
}
return wrongs;
})()
</var>
<var id="X_VAR">"x"</var>
<var id="Y_VAR">"y"</var>
<var id="X_HEADER">"x"</var>
<var id="Y_HEADER">"y"</var>
</div>
<div class="problem">
<p>Some ordered pairs for a linear function of <code>\pink{<var>X_VAR</var>}</code> are given in the table below.</p>
</div>
<div class="fake_header plugging_in_values">
<span class="hint_pink"><code><var>X_HEADER</var></code></span>
<span class="hint_blue"><code><var>Y_HEADER</var></code></span>
</div>
<div class="fake_row plugging_in_values" data-each="XVALS as xval">
<span><code><var>xval</var></code></span>
<span><code><var>COEF * xval + CONS</var></code></span>
</div>
<p class="question">Which equation was used to generate this table?</p>
<p class="solution"> <code><var>Y_VAR</var> = <var>COEF</var><var>X_VAR</var> + <var>CONS</var></code></p>
<ul class="choices" data-show="5">
<li data-each="WRONG_ANSWERS as wrong">
<code><var>Y_VAR</var> = <var>wrong.coef</var><var>X_VAR</var> + <var>wrong.cons</var></code>
</li>
</ul>
<div class="hints">
<p>Take one of the equations and try plugging in the values from the table. If the equality does not hold for at least one set of values, then we can eliminate that answer choice.</p>
<div>
<p>For example, consider <code><var>Y_VAR</var> = <var>WRONG_ANSWERS[0].coef</var><var>X_VAR</var> + <var>WRONG_ANSWERS[0].cons</var></code>. Substituting in <code>\pink{<var>X_VAR</var> = <var>XVALS[0]</var>}</code> and <code>\blue{<var>Y_VAR</var> = <var>XVALS[0] * COEF + CONS</var>}</code> shows that the equality holds for the first row of the table:</p>
<p><code>\blue{<var>XVALS[0] * COEF + CONS</var>} = <var>WRONG_ANSWERS[0].coef</var>(\pink{<var>XVALS[0]</var>}) + <var>WRONG_ANSWERS[0].cons</var></code></p>
<p><code><var>XVALS[0] * COEF + CONS</var> = <var>XVALS[0] * COEF + CONS</var></code></p>
</div>
<div>
<p>However, plugging in <code>\pink{<var>X_VAR</var> = <var>XVALS[1]</var>}</code> and <code>\blue{<var>Y_VAR</var> = <var>XVALS[1] * COEF + CONS</var>}</code> from the second row of the table gives us:</p>
<p><code>\blue{<var>XVALS[1] * COEF + CONS</var>} = <var>WRONG_ANSWERS[0].coef</var>(\pink{<var>XVALS[1]</var>}) + <var>WRONG_ANSWERS[0].cons</var></code></p>
<p><code><var>XVALS[1] * COEF + CONS</var> \ne <var>WRONG_ANSWERS[0].coef * XVALS[1] + WRONG_ANSWERS[0].cons</var></code></p>
<p>So we can eliminate <code><var>Y_VAR</var> = <var>WRONG_ANSWERS[0].coef</var><var>X_VAR</var> + <var>WRONG_ANSWERS[0].cons</var></code> from consideration and try a different answer choice.</p>
</div>
<div>
<p>When we try <code><var>Y_VAR</var> = <var>COEF</var><var>X_VAR</var> + <var>CONS</var></code>, we see that it holds up for each set of values in the table.</p>
<table class="plugging_in_values_hint">
<tbody><tr data-each="XVALS as xval">
<td>
<code>\blue{<var>COEF * xval + CONS</var>} = <var>COEF</var> \cdot \pink{<var>xval</var>} + <var>CONS</var></code>
</td>
<td>→</td>
<td>
<code>\blue{<var>COEF * xval + CONS</var>} = <var>COEF * xval + CONS</var></code>
</td>
</tr>
</tbody></table>
</div>
<p>The equation that fits this table of values is <code><var>Y_VAR</var> = <var>COEF</var><var>X_VAR</var> + <var>CONS</var></code>.</p>
</div>
</div>
<div id="grocery" data-type="linear">
<div class="vars">
<var id="X_VAR">"p"</var>
<var id="Y_VAR">"c"</var>
<var id="X_HEADER">"\\text{" + $._("Pounds") + " }(p)"</var>
<var id="Y_HEADER">"\\text{" + $._("Cost") + " }(c)"</var>
</div>
<div class="question">
<p>The data in the table show the cost of buying bulk vegetables per pound, including the fee for the clerk to package the vegetables in boxes.</p>
<p><b>Which equation fits the data?</b></p>
</div>
<div class="fake_row plugging_in_values" data-each="XVALS as xval">
<span><code><var>xval</var></code></span>
<span><code>$<var>COEF * xval + CONS</var></code></span>
</div>
</div>
<div id="negative" data-type="linear">
<div class="vars">
<var id="A1">-5</var>
<var id="A2">-2</var>
</div>
</div>
<div id="fill-table" data-type="linear" data-weight="3">
<div class="vars">
<var id="COEF">randRange( A1, A2 ) * randRangeNonZero( -1, 1 )</var>
<var id="CONS">randRange( B1, B2 ) * randRangeNonZero( -1, 1 )</var>
<var id="Y_VAR">"f(x)"</var>
<var id="Y_HEADER">"f(x)"</var>
<var id="I">randRange( 1, 3 )</var>
<var id="TABLEVALS">
(function() {
var wrongs = [];
var count = 0;
while ( wrongs.length &lt; 4 ) {
wrongs.push( { xval: XVALS[count], yval: COEF * XVALS[count] + CONS } );
count++;
}
count = 0;
var j = randRangeUnique( 0, 3, I );
while( count &lt; I ) {
wrongs[j[count]].yval = " ";
count++;
}
return wrongs;
})()
</var>
</div>
<div class="fake_row plugging_in_values" data-each="TABLEVALS as tableval">
<span><code><var>tableval.xval</var></code></span>
<span><code><var>tableval.yval</var></code></span>
</div>
<div class="question">
<p><b>The table below was generated using the following equation:</b><code>\quad f(x) = <var>COEF</var>x + <var>CONS</var></code></p>
<p data-if="I === 1"><b>Find the missing value.</b></p>
<p data-else=""><b>Find the missing values.</b></p>
</div>
<div class="solution" data-each="TABLEVALS as tableval" data-type="multiple">
<p data-if="tableval.yval === ' '"><code>f(<var>tableval.xval</var>)</code> = <span class="sol short50" data-forms="integer, decimal"><var>COEF * tableval.xval + CONS</var></span></p>
</div>
<div class="hints">
<p>Plug the corresponding values of <code>\pink{x}</code> into the equation to find the missing values of <code>\blue{f(x)}</code>.</p>
<div>
<p data-each="TABLEVALS as tableval"><span data-if="tableval.yval === ' '"><code>\blue{f(<var>tableval.xval</var>)} = <var>COEF</var> \cdot \pink{<var>tableval.xval</var>} + <var>CONS</var> = <var>tableval.xval * COEF</var> + <var>CONS</var> = <var>tableval.xval * COEF + CONS</var></code></span></p>
</div>
<div>
<p>The missing <span data-if="I === 1">value is</span><span data-else="">values are</span>:</p>
<p data-each="TABLEVALS as tableval">
<span data-if="tableval.yval === ' '"><code>f(<var>tableval.xval</var>) = <var>tableval.xval * COEF + CONS</var></code></span>
</p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.