Permalink
Fetching contributors…
Cannot retrieve contributors at this time
373 lines (371 sloc) 28 KB
<!DOCTYPE html>
<html data-require="math math-format expressions word-problems spin">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Systems of equations word problems</title>
<script data-main="../local-only/main.js" src="../local-only/require.js"></script>
</head>
<body>
<div class="exercise">
<div class="problems">
<div id="substitution-x">
<div class="vars">
<var id="INDEX">randRange( 0, 2 )</var>
<var id="X">[randRange( 2, 4 ), randRange( 2, 4 ), randRange( 40, 50 )][INDEX]</var>
<var id="Y">[randRange( X + 2, 10 ), randRange( X + 2, 10 ), randRange( 30, 50 )][INDEX]</var>
<var id="CENT_1">randRange( 0, 1 )</var>
<var id="CENT_2" data-ensure="( CENT_1 + CENT_2 ) !== 0">randRange( 0, 1 )</var>
<var id="A1">[roundTo( 8, randRange( 5, 8 ) + CENT_1 * 0.5 ), roundTo( 8, randRange( 5, 8 ) + CENT_1 * 0.5 ), 1][INDEX]</var>
<var id="B1">[roundTo( 8, randRange( 2, 4 ) + CENT_2 * 0.5 ), roundTo( 8, randRange( 2, 4 ) + CENT_2 * 0.5 ), 1][INDEX]</var>
<var id="C1">roundTo( 8, A1 * X + B1 * Y )</var>
<var id="A2">1</var>
<var id="B2" data-ensure="( A1 * B2 ) !== ( A2 * B1 )">[-1, -1, randRange( -4, -2 )][INDEX]</var>
<var id="C2">roundTo( 8, A2 * X + B2 * Y )</var>
<var id="SIGN_1">A1 * C2 &gt; 0 ? "-" : "+"</var>
<var id="SIGN_2">B1 * Y &gt; 0 ? "-" : "+"</var>
<var id="PROBLEM_1">[
i18n._("A group of adults and kids went to see a movie"),
i18n._("A few families took a trip to an amusement park together"),
""
][INDEX]</var>
<var id="PROBLEM_2">[
i18n._("Find the number of adults and kids in the group"),
i18n._("Find the number of adults and kids on the trip"),
""
][INDEX]</var>
<var id="UNIT_1">[
i18n._("adults"),
i18n._("adults"),
i18n._("home team fans")
][INDEX]</var>
<var id="UNIT_2">[
i18n._("kids"),
i18n._("kids"),
i18n._("away team fans")
][INDEX]</var>
</div>
<div class="question">
<div data-if="INDEX === 0 || INDEX === 1">
<p><var>PROBLEM_1</var>. Tickets cost <code>$<var>localeToFixed(A1, 2)</var></code> each for adults and <code>$<var>localeToFixed(B1, 2)</var></code> each for kids, and the group paid <code>$<var>localeToFixed(C1, 2)</var></code> in total. There were <code><var>abs(C2)</var></code> fewer adults than kids in the group.</p>
<p><var>PROBLEM_2</var>.</p>
</div>
<div data-else="">
<p><code><var>C1</var></code> people attended a baseball game. Everyone there was a fan of either the home team or the away team.
The number of home team fans was <code><var>abs(C2)</var></code> less than <code><var>abs(B2)</var></code> times the number of away team fans.</p>
<p>How many home team and away team fans attended the game?</p>
</div>
</div>
<div class="solution" data-type="multiple">
<p># of <var>UNIT_1</var> = <span class="sol short50" data-forms="integer, decimal"><var>X</var></span></p>
<p># of <var>UNIT_2</var> = <span class="sol short50" data-forms="integer, decimal"><var>Y</var></span></p>
</div>
<div class="hints">
<p>Let <code>x</code> equal the number of <var>UNIT_1</var> and <code>y</code> equal the number of <var>UNIT_2</var>.</p>
<div>
<p>The system of equations is then:</p>
<p><code>\blue{<var>expr(["+", ["*", A1, "x"], ["*", B1, "y"]])</var> = <var>C1</var>}</code><br>
<code>\green{x = <var>expr(["+", ["*", -B2, "y"], C2])</var>}</code></p>
<p>Solve for <code>x</code> and <code>y</code> using substitution.</p>
</div>
<div>
<p>Since <code>x</code> has already been solved for, substitute <code>\green{<var>expr(["+", ["*", -B2, "y"], C2])</var>}</code> for <code>x</code> in the first equation.</p>
<p><code>\blue{<span data-if="abs(A1) !== 1"><var>A1</var></span><span data-if="A1 === -1">-</span>}\green{(<var>expr(["+", ["*", -B2, "y"], C2])</var>)}\blue{+ <var>expr(["*", B1, "y"])</var> = <var>C1</var>}</code></p>
</div>
<div>
<p>Simplify and solve for <code>y</code>.</p>
<p><code>
<var>expr(["+", ["*", roundTo(8, A1 * -B2), "y"], roundTo(8, A1 * C2)])</var> + <var>expr(["*", B1, "y"])</var> = <var>C1</var>
</code></p>
<p><code>
<var>expr(["+", ["*", roundTo(8, A1 * -B2 + B1), "y"], roundTo(8, A1 * C2)])</var> = <var>C1</var>
</code></p>
<p data-if="(A1 * -B2 + B1) !== 1"><code>
<var>expr(["*", roundTo(8, A1 * -B2 + B1), "y"])</var> = <var>roundTo(8, C1 - A1 * C2)</var>
</code></p>
<p data-if="(A1 * -B2 + B1) !== 1"><code>
y = \dfrac{<var>roundTo(8, C1 - A1 * C2)</var>}{<var>roundTo( 8, A1 * -B2 + B1 )</var>}
</code></p>
<p><code>\orange{y = <var>Y</var>}</code></p>
</div>
<div>
<p>Now that you know <code>\orange{y = <var>Y</var>}</code>, plug it back into <code>\green{x = <var>expr(["+", ["*", -B2, "y"], C2])</var>}</code> to find <code>x</code>.</p>
</div>
<div>
<p><code>\green{x = <span data-if="abs(B2) !== 1"><var>-B2</var></span><span data-if="B2 === 1">-</span>}\orange{(<var>Y</var>)}\green{ + <var>C2</var>}</code></p>
<p data-if="B2 !== -1"><code>x = <var>-B2 * Y</var> + <var>C2</var></code></p>
<p><code>\red{x = <var>X</var>}</code></p>
</div>
<div>
<p>You can also plug <code>\orange{y = <var>Y</var>}</code> into <code>\blue{<var>expr(["+", ["*", A1, "x"], ["*", B1, "y"]])</var> = <var>C1</var>}</code> and get the same answer for <code>x</code>:</p>
<p><code>\blue{<var>expr(["*", A1, "x"])</var> + <span data-if="abs(B1) !== 1"><var>B1</var></span><span data-if="B1 === -1">-</span>}\orange{(<var>Y</var>)}\blue{= <var>C1</var>}</code></p>
<p><code>\red{x = <var>X</var>}</code></p>
</div>
<p>There were <code><var>X</var></code> <var>UNIT_1</var> and <code><var>Y</var></code> <var>UNIT_2</var>.</p>
</div>
</div>
<div id="substitution-y">
<div class="vars">
<var id="INDEX">randRange( 0, 2 )</var>
<var id="X">[randRange( 2, 4 ), randRange( 2, 4 ), randRange( 40, 50 )][INDEX]</var>
<var id="Y">[randRange( X + 2, 10 ), randRange( X + 2, 10 ), randRange( 30, 50 )][INDEX]</var>
<var id="CENT_1">randRange( 0, 1 )</var>
<var id="CENT_2" data-ensure="( CENT_1 + CENT_2 ) !== 0">randRange( 0, 1 )</var>
<var id="A1">[roundTo( 8, randRange( 5, 8 ) + CENT_1 * 0.5 ), roundTo( 8, randRange( 5, 8 ) + CENT_1 * 0.5 ), 1][INDEX]</var>
<var id="B1">[roundTo( 8, randRange( 2, 4 ) + CENT_2 * 0.5 ), roundTo( 8, randRange( 2, 4 ) + CENT_2 * 0.5 ), 1][INDEX]</var>
<var id="C1">roundTo( 8, A1 * X + B1 * Y )</var>
<var id="B2">1</var>
<var id="A2" data-ensure="( A1 * B2 ) !== ( A2 * B1 )">[-1, -1, randRange( -4, -2 )][INDEX]</var>
<var id="C2">roundTo( 8, A2 * X + B2 * Y )</var>
<var id="SIGN_1">B1 * C2 &gt; 0 ? "-" : "+"</var>
<var id="SIGN_2">A1 * X &gt; 0 ? "-" : "+"</var>
<var id="PROBLEM_1">[
i18n._("The drama club sold bags of candy and cookies to raise money for the spring show"),
i18n._("A local gift shop sold bags of candy and cookies for Halloween"),
""
][INDEX]</var>
<var id="PROBLEM_2">[
i18n._("Find the number of bags of candy and cookies sold by the drama club"),
i18n._("Find the number of bags of candy and cookies sold by the gift shop"),
""
][INDEX]</var>
<var id="UNIT_1">[
i18n._("bags of candy"),
i18n._("bags of candy"),
i18n._("angle 1")
][INDEX]</var>
<var id="UNIT_2">[
i18n._("bags of cookies"),
i18n._("bags of cookies"),
i18n._("angle 2")
][INDEX]</var>
</div>
<div class="question">
<div data-if="INDEX === 0 || INDEX === 1">
<p><var>PROBLEM_1</var>. Bags of candy cost <code>$<var>localeToFixed(A1, 2)</var></code>, and bags of cookies cost <code>$<var>localeToFixed(B1, 2)</var></code>, and sales equaled <code>$<var>localeToFixed(C1, 2)</var></code> in total. There were <code><var>C2</var></code> more bags of cookies than candy sold.</p>
<p><var>PROBLEM_2</var>.</p>
</div>
<div data-else="">
<p>The sum of two angles is <code><var>C1</var>^\circ</code>. Angle 2 is <code><var>abs(C2)</var>^\circ</code> smaller than <code><var>abs(A2)</var></code> times angle 1.</p>
<p>What are the measures of the two angles in degrees?</p>
</div>
</div>
<div class="solution" data-type="multiple">
<p><span data-if="INDEX !== 2"># of </span><var>UNIT_1</var> = <span class="sol short50" data-forms="integer, decimal"><var>X</var></span></p>
<p><span data-if="INDEX !== 2"># of </span><var>UNIT_2</var> = <span class="sol short50" data-forms="integer, decimal"><var>Y</var></span></p>
</div>
<div class="hints">
<p data-if="INDEX !== 2">
Let <code>x</code> equal the number of <var>UNIT_1</var> and <code>y</code> equal the number of <var>UNIT_2</var>.
</p><p data-else>
Let <code>x</code> equal the measure of <var>UNIT_1</var> and <code>y</code> equal the measure of <var>UNIT_2</var>.</p>
<div>
<p>The system of equations is then:</p>
<p><code>\blue{<var>expr(["+", ["*", A1, "x"], ["*", B1, "y"]])</var> = <var>C1</var>}</code><br>
<code>\green{y = <var>expr(["+", ["*", -A2, "x"], C2])</var>}</code></p>
</div>
<div>
<p>Since we already have solved for <code>y</code> in terms of <code>x</code>, we can use substitution to solve for <code>x</code> and <code>y</code>.</p>
</div>
<div>
<p>Substitute <code>\green{<var>expr(["+", ["*", -A2, "x"], C2])</var>}</code> for <code>y</code> in the first equation.</p>
<p><code>\blue{<var>expr(["*", A1, "x"])</var> + <span data-if="abs(B1) !== 1"><var>B1</var></span><span data-if="B1 === -1">-</span>}\green{(<var>expr(["+", ["*", -A2, "x"], C2])</var>)}\blue{= <var>C1</var>}</code></p>
</div>
<div>
<p>Simplify and solve for <code>x</code>.</p>
<p><code>
<var>expr(["+", ["*", A1, "x"], ["*", roundTo(8, B1 * -A2), "x"]])</var> + <var>roundTo(8, B1 * C2)</var> = <var>C1</var>
</code></p>
<p><code>
<var>expr(["+", ["*", roundTo(8, A1 + B1 * -A2), "x"], roundTo(8, B1 * C2)])</var> = <var>C1</var>
</code></p>
<p data-if="(A1 + B1 * -A2) !== 1"><code>
<var>expr(["*", roundTo(8, A1 + B1 * -A2), "x"])</var> = <var>roundTo(8, C1 - B1 * C2)</var>
</code></p>
<p data-if="(A1 + B1 * -A2) !== 1"><code>
x = \dfrac{<var>roundTo( 8, C1 - B1 * C2 )</var>}{<var>roundTo(8, A1 + B1 * -A2)</var>}
</code></p>
<p><code>\red{x = <var>X</var>}</code></p>
</div>
<div>
<p>Now that you know <code>\red{x = <var>X</var>}</code>, plug it back into <code> \green{y = <var>expr(["+", ["*", -A2, "x"], C2])</var>}</code> to find <code>y</code>.</p>
</div>
<div>
<p><code>\green{y = <span data-if="abs(A2) !== 1"><var>-A2</var></span><span data-if="A2 === 1">-</span>}\red{(<var>X</var>)}\green{ + <var>C2</var>}</code></p>
<p data-if="A2 !== -1"><code>y = <var>roundTo(8, -A2 * X)</var> + <var>C2</var></code></p>
<p><code>\orange{y = <var>Y</var>}</code></p>
</div>
<div>
<p>You can also plug <code>\red{x = <var>X</var>}</code> into <code> \blue{<var>expr(["+", ["*", A1, "x"], ["*", B1, "y"]])</var> = <var>C1</var>}</code> and get the same answer for <code>y</code>:</p>
<p><code>\blue{<span data-if="abs(A1) !== 1"><var>A1</var></span><span data-if="A1 === -1">-</span>}\red{(<var>X</var>)}\blue{ + <var>expr(["*", B1, "y"])</var> = <var>C1</var>}</code></p>
<p><code>\orange{y = <var>Y</var>}</code></p>
</div>
<p data-if="INDEX !== 2">
<code><var>X</var></code> bags of candy and <code><var>Y</var></code> bags of cookies were sold.
</p><p data-else>
The measure of angle 1 is <code><var>X</var>^\circ</code> and the measure of angle 2 is <code><var>Y</var>^\circ</code>.
</p>
</div>
</div>
<div id="elimination-x">
<div class="vars" data-ensure="abs( B1 * MULT1 + B2 * MULT2 ) &gt; 0.0001">
<var id="X">randRange( 2, 4 )</var>
<var id="Y">randRange( X + 2, 10 )</var>
<var id="INDEX">1</var>
<var id="CENT_1">randRange( 0, 1 )</var>
<var id="CENT_2" data-ensure="( CENT_1 + CENT_2 ) !== 0">randRange( 0, 1 )</var>
<var id="Z1">roundTo( 8, randRange( 100, 300 ) / 100 )</var>
<var id="Z2" data-ensure="abs( Z2 ) &lt;= 6 &amp;&amp; Z2 !== 0">INDEX === 0 ? -1 * Z1 : randRangeWeighted( -4, 4, -1, 0 ) * Z1</var>
<var id="Z3">roundTo( 8, randRange( 200, 600 ) / 100 )</var>
<var id="Z4">roundTo( 8, randRange( 200, 600 ) / 100 )</var>
<var id="Z5">roundTo( 8, randRange( 200, 600 ) / 100 )</var>
<var id="Z6" data-ensure="( Z3 * Z6 ) !== ( Z4 * Z5 )">roundTo( 8, randRange( 200, 600 ) / 100 )</var>
<var id="A1">roundTo( 8, randRange( 5, 8 ) + CENT_1 * 0.5 )</var>
<var id="B1">roundTo( 8, randRange( 2, 4 ) + CENT_2 * 0.5 )</var>
<var id="C1">roundTo( 8, A1 * X + B1 * Y )</var>
<var id="A2">A1 * randRange( 2, 4 )</var>
<var id="B2">roundTo( 8, randRange( 7, 12 ) + ( CENT_1 + CENT_2 ) * 0.5 )</var>
<var id="C2">roundTo( 8, A2 * X + B2 * Y )</var>
<var id="MULT1">[ 1, roundTo( 8, -A2 / A1 ), 1, A2 &gt; 0 &amp;&amp; A1 &lt; 0 ? A2 : -A2 ][ INDEX ]</var>
<var id="MULT2">[ 1, 1, roundTo( 8, -A1 / A2 ), A2 &gt; 0 &amp;&amp; A1 &lt; 0 ? -A1 : A1 ][ INDEX ]</var>
<var id="SIGN_1">B1 * Y &gt; 0 ? "-" : "+"</var>
<var id="SIGN_2">B2 * Y &gt; 0 ? "-" : "+"</var>
</div>
<div class="question spin">
<p>All of the {3rd|4th|5th} grade teachers and students from <var>school(1)</var> went on a field trip to an {art|archaeology} museum. Tickets were <code>$<var>localeToFixed(A1, 2)</var></code> each for teachers and <code>$<var>localeToFixed(B1, 2)</var></code> each for students, and the group paid <code>$<var>localeToFixed(C1, 2)</var></code> in total.</p>
<p>{A few weeks later|The next month}, the same group visited a {science|natural history} museum where the tickets cost <code>$<var>localeToFixed(A2, 2)</var></code> each for teachers and <code>$<var>localeToFixed(B2, 2)</var></code> each for students, and the group paid <code>$<var>localeToFixed(C2, 2)</var></code> in total.</p>
<p>Find the number of teachers and students on the field trips.</p>
</div>
<div class="solution" data-type="multiple">
<p># of teachers = <span class="sol short50" data-forms="integer, decimal"><var>X</var></span></p>
<p># of students = <span class="sol short50" data-forms="integer, decimal"><var>Y</var></span></p>
</div>
<div class="hints">
<p>Let <code>x</code> equal the number of teachers and <code>y</code> equal the number of students.</p>
<div>
<p>The system of equations is:</p>
<p><code>\blue{<var>expr(["+", ["*", A1, "x"], ["*", B1, "y"]])</var> = <var>C1</var>}</code><br>
<code>\green{<var>expr(["+", ["*", A2, "x"], ["*", B2, "y"]])</var> = <var>C2</var>}</code></p>
<p>Solve for <code>x</code> and <code>y</code> using elimination.</p>
</div>
<div data-if="INDEX !== 0">
<p data-if="INDEX === 2">
Multiply the bottom equation by <code><var>MULT2</var></code>.
</p><p data-else-if="INDEX === 3">
Multiply the top equation by <code><var>MULT1</var></code> and the bottom equation by <code><var>MULT2</var></code>.
</p><p data-else>
Multiply the top equation by <code><var>MULT1</var></code>.
</p>
<p><code>\blue{<var>expr(["+", ["*", A1 * MULT1, "x"], ["*", B1 * MULT1, "y"]])</var> = <var>C1 * MULT1</var>}</code><br>
<code>\green{<var>expr(["+", ["*", A2 * MULT2, "x"], ["*", B2 * MULT2, "y"]])</var> = <var>C2 * MULT2</var>}</code></p>
</div>
<div>
<p>Add the top and bottom equations together.</p>
<p data-if="(B1 * MULT1 + B2 * MULT2) !== 1"><code>
<var>expr(["*", roundTo(8, B1 * MULT1 + B2 * MULT2), "y"])</var> = <var>roundTo(8, C1 * MULT1 + C2 * MULT2)</var>
</code></p>
<p data-if="(B1 * MULT1 + B2 * MULT2) !== 1"><code>
y = \dfrac{<var>roundTo(8, C1 * MULT1 + C2 * MULT2)</var>}{<var>roundTo(8, B1 * MULT1 + B2 * MULT2)</var>}</code></p>
<p><code>\orange{y = <var>Y</var>}</code></p>
</div>
<div>
<p>Now that you know <code>\orange{y = <var>Y</var>}</code>, plug it back into <code> \blue{<var>expr(["+", ["*", A1, "x"], ["*", B1, "y"]])</var> = <var>C1</var>}</code> to find <code>x</code>.</p>
</div>
<div>
<p><code>\blue{<var>expr(["*", A1, "x"])</var> + <span data-if="abs(B1) !== 1"><var>B1</var></span><span data-if="B1 === -1">-</span>}\orange{(<var>Y</var>)}\blue{= <var>C1</var>}</code></p>
<p data-if="B1 !== 1"><code><var>expr(["+", ["*", A1, "x"], B1 * Y])</var> = <var>C1</var></code></p>
<p data-if="A1 !== 1"><code><var>expr(["*", A1, "x"])</var> = <var>roundTo(8, C1 - B1 * Y)</var></code></p>
<p data-if="A1 !== 1"><code>x = \dfrac{<var>roundTo( 8, C1 - B1 * Y )</var>}{<var>A1</var>}</code></p>
<p><code>\red{x = <var>X</var>}</code></p>
</div>
<div>
<p>You can also plug <code>\orange{y = <var>Y</var>}</code> into <code> \green{<var>expr(["+", ["*", A2, "x"], ["*", B2, "y"]])</var> = <var>C2</var>}</code> and get the same answer for <code>x</code>:</p>
<p><code>\green{<var>expr(["*", A2, "x"])</var> + <span data-if="abs(B2) !== 1"><var>B2</var></span><span data-if="B2 === -1">-</span>}\orange{(<var>Y</var>)}\green{= <var>C2</var>}</code></p>
<p><code>\red{x = <var>X</var>}</code></p>
</div>
<p>There were <code><var>X</var></code> teachers and <code><var>Y</var></code> students on the field trips.</p>
</div>
</div>
<div id="elimination-y">
<div class="vars">
<var id="X">randRange( 11, 99 )</var>
<var id="Y" data-ensure="X !== Y">randRange( 10, X - 1 )</var>
<var id="INDEX">0</var>
<var id="Z1">roundTo( 8, randRange( 100, 300 ) / 100 )</var>
<var id="Z2" data-ensure="abs( Z2 ) &lt;= 6 &amp;&amp; Z2 !== 0">INDEX === 0 ? -1 * Z1 : randRangeWeighted( -4, 4, -1, 0 ) * Z1</var>
<var id="Z3">roundTo( 8, randRange( 200, 600 ) / 100 )</var>
<var id="Z4">roundTo( 8, randRange( 200, 600 ) / 100 )</var>
<var id="Z5">roundTo( 8, randRange( 200, 600 ) / 100 )</var>
<var id="Z6" data-ensure="( Z3 * Z6 ) !== ( Z4 * Z5 )">roundTo( 8, randRange( 200, 600 ) / 100 )</var>
<var id="A1">1</var>
<var id="B1">[ 1, Z1, Z2, Z5 ][ INDEX ]</var>
<var id="C1">roundTo( 8, A1 * X + B1 * Y )</var>
<var id="A2">1</var>
<var id="B2">[ -1, Z2, Z1, Z6 ][ INDEX ]</var>
<var id="C2">roundTo( 8, A2 * X + B2 * Y )</var>
<var id="MULT1">[ 1, roundTo( 8, -B2 / B1 ), 1, B2 &gt; 0 &amp;&amp; B1 &lt; 0 ? B2 : -B2 ][ INDEX ]</var>
<var id="MULT2">[ 1, 1, roundTo( 8, -B1 / B2 ), B2 &gt; 0 &amp;&amp; B1 &lt; 0 ? -B1 : B1 ][ INDEX ]</var>
<var id="SIGN_1">A1 * X &gt; 0 ? "-" : "+"</var>
<var id="SIGN_2">A2 * X &gt; 0 ? "-" : "+"</var>
<var id="LARGER">max(X, Y)</var>
<var id="SMALLER">min(X, Y)</var>
</div>
<div class="question">
<p>The sum of two numbers is <code><var>C1</var></code>, and their difference is <code><var>C2</var></code>. What are the two numbers?</p>
</div>
<div class="solution" data-type="multiple">
<p>larger number = <span class="sol short50" data-forms="integer, decimal"><var>LARGER</var></span></p>
<p>smaller number = <span class="sol short50" data-forms="integer, decimal"><var>SMALLER</var></span></p>
</div>
<div class="hints">
<div>
<p>Let <code>x</code> be the first number, and let <code>y</code> be the second number.</p>
</div>
<div>
<p>The system of equations is:</p>
<p><code>\blue{<var>expr(["+", ["*", A1, "x"], ["*", B1, "y"]])</var> = <var>C1</var>}</code><br>
<code>\green{<var>expr(["+", ["*", A2, "x"], ["*", B2, "y"]])</var> = <var>C2</var>}</code></p>
<p>Solve for <code>x</code> and <code>y</code> using elimination.
</p></div>
<div data-if="INDEX !== 0">
<p data-if="INDEX === 2">
Multiply the bottom equation by <code><var>MULT2</var></code>.
</p><p data-else-if="INDEX === 3">
Multiply the top equation by <code><var>MULT1</var></code> and the bottom equation by <code><var>MULT2</var></code>.
</p><p data-else>
Multiply the top equation by <code><var>MULT1</var></code>.
</p>
<p><code>\blue{<var>expr(["+", ["*", A1 * MULT1, "x"], ["*", B1 * MULT1, "y"]])</var> = <var>C1 * MULT1</var>}</code><br>
<code>\green{<var>expr(["+", ["*", A2 * MULT2, "x"], ["*", B2 * MULT2, "y"]])</var> = <var>C2 * MULT2</var>}</code></p>
</div>
<div>
<p>Add the top and bottom equations together.</p>
<p data-if="(A1 * MULT1 + A2 * MULT2) !== 1"><code>
<var>expr(["*", roundTo(8, A1 * MULT1 + A2 * MULT2), "x"])</var> = <var>roundTo(8, C1 * MULT1 + C2 * MULT2)</var>
</code></p>
<p data-if="(A1 * MULT1 + A2 * MULT2) !== 1"><code>
x = \dfrac{<var>roundTo(8, C1 * MULT1 + C2 * MULT2)</var>}{<var>roundTo( 8, A1 * MULT1 + A2 * MULT2 )</var>}
</code></p>
<p><code>\red{x = <var>X</var>}</code></p>
</div>
<div>
<p>Now that you know <code>\red{x = <var>X</var>}</code>, plug it back into <code> \blue{<var>expr(["+", ["*", A1, "x"], ["*", B1, "y"]])</var> = <var>C1</var>}</code> to find <code>y</code>.</p>
</div>
<div>
<p><code>\blue{<span data-if="abs(A1) !== 1"><var>A1</var></span><span data-if="A1 === -1">-</span>}\red{(<var>X</var>)}\blue{ + <var>expr(["*", B1, "y"])</var> = <var>C1</var>}</code></p>
<p data-if="A1 !== 1"><code><var>expr(["+", A1 * X, ["*", B1, "y"]])</var> = <var>C1</var></code></p>
<p data-if="B1 !== 1"><code><var>expr(["*", B1, "y"])</var> = <var>roundTo( 8, C1 - A1 * X )</var></code></p>
<p data-if="B1 !== 1"><code>\dfrac{<var>expr(["*", B1, "y"])</var>}{\blue{<var>B1</var>}} = \dfrac{<var>roundTo( 8, C1 - A1 * X )</var>}{\blue{<var>B1</var>}}</code></p>
<p><code>\orange{y = <var>Y</var>}</code></p>
</div>
<div>
<p>You can also plug <code>\red{x = <var>X</var>}</code> into <code> \green{<var>expr(["+", ["*", A2, "x"], ["*", B2, "y"]])</var> = <var>C2</var>}</code> and get the same answer for <code>y</code>:</p>
<p><code>\green{<span data-if="abs( A2 ) !== 1"><var>A2</var></span><span data-if="A2 === -1">-</span>}\red{(<var>X</var>)}\green{ + <var>expr(["*", B2, "y"])</var> = <var>C2</var>}</code></p>
<p><code>\orange{y = <var>Y</var>}</code></p>
</div>
<p>Therefore, the larger number is <code><var>LARGER</var></code>, and the smaller number is <code><var>SMALLER</var></code>.</p>
</div>
</div>
</div>
</div>
</body>
</html>