Permalink
Fetching contributors…
Cannot retrieve contributors at this time
210 lines (200 sloc) 10.3 KB
<!DOCTYPE html>
<html data-require="math math-format expressions">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Combining like terms</title>
<script data-main="../local-only/main.js" src="../local-only/require.js"></script>
</head>
<body>
<div class="exercise">
<div class="vars">
<var id="X">randVar()</var>
<var id="A">randRangeNonZero(-1, 1) * randRange(1, randRange(1, 12))</var>
<var id="B" data-ensure="abs( A ) !== abs( B )">randRangeNonZero(-1, 1) * randRange(1, randRange(1, 12))</var>
<var id="C">randRangeNonZero(-1, 1) * randRange(1, randRange(1, 20))</var>
<var id="D" data-ensure="abs( C ) !== abs( D )">randRangeNonZero(-1, 1) * randRange(1, randRange(1, 12))</var>
</div>
<div class="problems">
<div id="ax_bx">
<div class="vars">
<var id="SOLUTION">A + B + X</var>
</div>
<p class="question">
Combine the like terms to make a simpler expression:
</p>
<p class="problem">
<code>\large{<var>expr(["+", ["*", A, X], ["*", B, X]])</var>}</code>
</p>
<div class="solution" data-type="expression" data-simplify=""><var>SOLUTION</var></div>
<div class="hints">
<div>
<p>Combine the <code>\pink{<var>X</var>}</code> terms:</p>
<p><code>\qquad \large{ \begin{eqnarray}
<var>coefficient(A)</var>\pink{<var>X</var>}
<span data-if="B > 0"> + </span><span data-else=""> - </span>
<var>coefficient(abs(B))</var>\pink{<var>X</var>}
&amp;=&amp; (<var>A</var> + <var>B</var>)\pink{<var>X</var>} \\
&amp;=&amp; <var>coefficient(A + B)</var>\pink{<var>X</var>}
\end{eqnarray}}
</code></p>
</div>
<p>The simplified expression is <code><var>expr(["*", A + B, X])</var></code></p>
</div>
</div>
<div id="ax_bx_c" data-type="ax_bx">
<div class="vars">
<var id="SOLUTION">A + B + X + "+" + C</var>
</div>
<p class="problem">
<code>\large{<var>expr(["+", ["*", A, X], ["*", B, X], C])</var>}</code>
</p>
<div class="hints">
<div>
<p>Combine the <code>\pink{<var>X</var>}</code> terms:</p>
<p><code>\qquad \large{ \begin{eqnarray}
<var>coefficient(A)</var>\pink{<var>X</var>}
<span data-if="B > 0"> + </span><span data-else=""> - </span>
<var>coefficient(abs(B))</var>\pink{<var>X</var>}
+ <var>C</var>
&amp;=&amp; (<var>A</var> + <var>B</var>)\pink{<var>X</var>} + <var>C</var>\\
&amp;=&amp; <var>coefficient(A + B)</var>\pink{<var>X</var>} + <var>C</var>
\end{eqnarray}}
</code></p>
</div>
<p>The simplified expression is <code><var>expr(["*", A + B, X])</var> + <var>C</var></code></p>
</div>
</div>
<div id="ax_c_bx" data-type="ax_bx_c">
<p class="problem">
<code>\large{<var>expr(["+", ["*", A, X], C, ["*", B, X]])</var>}</code>
</p>
<div class="hints">
<div>
<p>Combine the <code>\pink{<var>X</var>}</code> terms:</p>
<p><code>\qquad \large{ \begin{eqnarray}
<var>coefficient(A)</var>\pink{<var>X</var>}
+ <var>C</var>
<span data-if="B > 0"> + </span><span data-else=""> - </span>
<var>coefficient(abs(B))</var>\pink{<var>X</var>}
&amp;=&amp; (<var>A</var> + <var>B</var>)\pink{<var>X</var>} + <var>C</var>\\
&amp;=&amp; <var>coefficient(A + B)</var>\pink{<var>X</var>} + <var>C</var>
\end{eqnarray}}
</code></p>
</div>
<p>The simplified expression is <code><var>expr(["*", A + B, X])</var> + <var>C</var></code></p>
</div>
</div>
<div id="ax_c_bx_d" data-type="ax_bx_c">
<div class="vars">
<var id="SOLUTION">A + B + X + "+" + (C + D)</var>
</div>
<p class="problem">
<code>\large{<var>expr(["+", ["*", A, X], C, ["*", B, X], D])</var>}</code>
</p>
<div class="hints">
<div>
<p>Combine the <code>\pink{<var>X</var>}</code> terms:</p>
<p><code>\qquad \large{ \begin{eqnarray}
<var>coefficient(A)</var>\pink{<var>X</var>}
+ <var>C</var>
<span data-if="B > 0"> + </span><span data-else=""> - </span>
<var>coefficient(abs(B))</var>\pink{<var>X</var>}
+ <var>D</var>
&amp;=&amp; (<var>A</var> + <var>B</var>)\pink{<var>X</var>} + <var>C</var> + <var>D</var> \\
&amp;=&amp; <var>coefficient(A + B)</var>\pink{<var>X</var>} + <var>C</var> + <var>D</var>
\end{eqnarray}}
</code></p>
</div>
<div>
<p>Combine the <span class="hint_blue">numeric</span> terms:</p>
<p><code>\qquad \large{
<var>coefficient(A + B)</var>\pink{<var>X</var>}
<span data-if="C > 0"> + </span><span data-else=""> - </span> \blue{<var>abs(C)</var>}
<span data-if="D > 0"> + </span><span data-else=""> - </span> \blue{<var>abs(D)</var>} =
<var>coefficient(A + B)</var>\pink{<var>X</var>}
<span data-if="C + D > 0"> + </span><span data-else=""> - </span>
\blue{<var>abs(C + D)</var>}}
</code></p>
</div>
<p>The simplified expression is <code><var>expr(["+", ["*", A + B, X], C + D])</var></code></p>
</div>
</div>
<div id="ax_c_d_bx" data-type="ax_c_bx_d">
<p class="problem">
<code>\large{<var>expr(["+", ["*", A, X], C, D, ["*", B, X]])</var>}</code>
</p>
<div class="hints">
<div>
<p>Combine the <code>\pink{<var>X</var>}</code> terms:</p>
<p><code>\qquad \large{ \begin{eqnarray}
<var>coefficient(A)</var>\pink{<var>X</var>}
+ <var>C</var>
+ <var>D</var>
<span data-if="B > 0"> + </span><span data-else=""> - </span>
<var>coefficient(abs(B))</var>\pink{<var>X</var>}
&amp;=&amp; (<var>A</var> + <var>B</var>)\pink{<var>X</var>} + <var>C</var> + <var>D</var> \\
&amp;=&amp; <var>coefficient(A + B)</var>\pink{<var>X</var>} + <var>C</var> + <var>D</var>
\end{eqnarray}}
</code></p>
</div>
<div>
<p>Combine the <span class="hint_blue">numeric</span> terms:</p>
<p><code>\qquad \large{
<var>coefficient(A + B)</var>\pink{<var>X</var>}
<span data-if="C > 0"> + </span><span data-else=""> - </span> \blue{<var>abs(C)</var>}
<span data-if="D > 0"> + </span><span data-else=""> - </span> \blue{<var>abs(D)</var>} =
<var>coefficient(A + B)</var>\pink{<var>X</var>}
<span data-if="C + D > 0"> + </span><span data-else=""> - </span>
\blue{<var>abs(C + D)</var>}}
</code></p>
</div>
<p>The simplified expression is <code><var>expr(["+", ["*", A + B, X], C + D])</var></code></p>
</div>
</div>
<div id="ax_c_d" data-type="ax_bx">
<div class="vars">
<div class="vars">
<var id="SOLUTION">A + X + "+" + (C + D)</var>
</div>
</div>
<p class="problem">
<code>\large{<var>expr(["+", ["*", A, X], C, D])</var>}</code>
</p>
<div class="hints">
<div>
<p>Combine the <span class="hint_blue">numeric</span> terms:</p>
<p><code>\qquad \large{
<var>expr(["*", A, X])</var>
<span data-if="C > 0"> + </span><span data-else=""> - </span> \blue{<var>abs(C)</var>}
<span data-if="D > 0"> + </span><span data-else=""> - </span> \blue{<var>abs(D)</var>} =
<var>expr(["*", A, X])</var>
<span data-if="C + D > 0"> + </span><span data-else=""> - </span>
\blue{<var>abs(C + D)</var>}}
</code></p>
</div>
<p>The simplified expression is <code><var>expr(["+", ["*", A, X], C + D])</var></code></p>
</div>
</div>
<div id="c_ax_d" data-type="ax_c_d">
<p class="problem">
<code>\large{<var>expr(["+", C, ["*", A, X], D])</var>}</code>
</p>
<div class="hints">
<div>
<p>Combine the <span class="hint_blue">numeric</span> terms:</p>
<p><code>\qquad \large{
\blue{<var>C</var>} +
<var>expr(["*", A, X])</var>
<span data-if="D > 0"> + </span><span data-else=""> - </span> \blue{<var>abs(D)</var>} =
<var>expr(["*", A, X])</var>
<span data-if="C + D > 0"> + </span><span data-else=""> - </span>
\blue{<var>abs(C + D)</var>}}
</code></p>
</div>
<p>The simplified expression is <code><var>expr(["+", ["*", A, X], C + D])</var></code></p>
</div>
</div>
</div>
</div>
</body>
</html>