Permalink
Fetching contributors…
Cannot retrieve contributors at this time
82 lines (74 sloc) 3.62 KB
<!DOCTYPE html>
<html data-require="math">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Comparing fractions 2</title>
<script data-main="../local-only/main.js" src="../local-only/require.js"></script>
</head>
<body>
<div class="exercise">
<div class="problems">
<div id="original">
<div class="vars" data-ensure="NUM_1 !== NUM_2" data-weight="2">
<var id="DEN_1">randFromArray(smallDenominators)</var>
<var id="DEN_2" data-ensure="DEN_1 !== DEN_2">randFromArray(smallDenominators)</var>
<var id="NUM_1">randRange(1, DEN_1 - 1)</var>
<var id="NUM_2">randRange(1, DEN_2 - 1)</var>
<var id="LCM">getLCM(DEN_1, DEN_2)</var>
<var id="F1">LCM / DEN_1</var>
<var id="F2">LCM / DEN_2</var>
<var id="N1">NUM_1 * F1</var>
<var id="N2">NUM_2 * F2</var>
<var id="SOLUTION">(function() {
var f1 = NUM_1 / DEN_1;
var f2 = NUM_2 / DEN_2;
if (f1 === f2) {
return "=";
} else {
return f1 &lt; f2 ? "&lt;" : "&gt;";
}
})()</var>
</div>
<div class="problem">
<p>Compare.</p>
<p>
<code>\dfrac{<var>NUM_1</var>}{<var>DEN_1</var>}</code>
____ <code>\dfrac{<var>NUM_2</var>}{<var>DEN_2</var>}</code>
</p>
</div>
<p class="solution"><code><var>SOLUTION</var></code></p>
<ul class="choices" data-category="true">
<li><code>&lt;</code></li>
<li><code>&gt;</code></li>
<li><code>=</code></li>
</ul>
<div class="hints">
<div>
<p>Let's change the fractions to have a common denominator of <code><var>LCM</var></code>:</p>
<p><code>
\qquad\begin{eqnarray}
\blue{\dfrac{<var>NUM_1</var>}{<var>DEN_1</var>}} \times
\dfrac{<var>F1</var>}{<var>F1</var>} &amp;=&amp; \blue{\dfrac{<var>N1</var>}{<var>LCM</var>}} \\ \\
\green{\dfrac{<var>NUM_2</var>}{<var>DEN_2</var>}} \times
\dfrac{<var>F2</var>}{<var>F2</var>} &amp;=&amp; \green{\dfrac{<var>N2</var>}{<var>LCM</var>}}
\end{eqnarray}
</code></p>
</div>
<div>
<p>Now that our fractions have the same denominator, we compare their numerators:</p>
<p><code>\qquad \blue{<var>N1</var>} <var>SOLUTION</var> \green{<var>N2</var>}</code></p>
</div>
<p><code>
\qquad \blue{\dfrac{<var>N1</var>}{<var>LCM</var>}} <var>SOLUTION</var>
\green{\dfrac{<var>N2</var>}{<var>LCM</var>}}
</code></p>
<p><code>
\qquad \blue{\dfrac{<var>NUM_1</var>}{<var>DEN_1</var>}} <var>SOLUTION</var>
\green{\dfrac{<var>NUM_2</var>}{<var>DEN_2</var>}}
</code></p>
</div>
</div>
</div>
</div>
</body>
</html>