Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

70 lines (65 sloc) 3.504 kb
<!DOCTYPE html>
<html data-require="math math-format">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Linear inequalities</title>
<script src="../khan-exercise.js"></script>
<div class="exercise">
<div class="vars">
<var id="A">randRange( 2, 10 )</var>
<var id="B">randRangeNonZero( -10, 10 )</var>
<var id="C" data-ensure="abs( C - A ) > 1">randRange( 2, 10 )</var>
<var id="D" data-ensure="D !== B">randRangeNonZero( 2, 10 )</var>
<var id="SOLUTION">fractionReduce( D - B, A - C )</var>
<var id="REL">randFromArray([ "&lt;", "&gt;", "&le;", "&ge;" ])</var>
<var id="FREL">{ "&lt;": "&gt;", "&gt;": "&lt;", "&le;": "&ge;", "&ge;": "&le;" }[ REL ]</var>
<div class="problems">
<p class="question">Solve for <code>x</code>:</p>
<div><code><var>A</var>x + <var>B</var> <var>REL</var> <var>C</var>x + <var>D</var></code></div>
<p class="solution" data-type="multiple">
<span class="sol" data-type="list" data-choices="['', '&lt;', '&gt;', '&le;', '&ge;']">
<var>A - C > 0 ? REL : FREL</var>
<span class="sol"><var>( D - B ) / ( A - C )</var></span></p>
<div class="hints">
<p>Subtract <code><var>C</var>x</code> from both sides:</p>
<p><code>(<var>A</var>x + <var>B</var>) - <var>C</var>x <var>REL</var> (<var>C</var>x + <var>D</var>) - <var>C</var>x</code></p>
<p><code><var>A - C</var>x + <var>B</var> <var>REL</var> <var>D</var></code></p>
<p><var>B > 0 ? "Subtract" : "Add"</var> <code><var>abs(B)</var></code> <var>B > 0 ? "from" : "to"</var> both sides:</p>
<p><code>(<var>A - C</var>x + <var>B</var>) + <var>-B</var> <var>REL</var> <var>D</var> + <var>-B</var></code></p>
<p><code><var>A - C</var>x <var>REL</var> <var>D - B</var></code></p>
<div data-if="A - C > 0">
<p>Divide both sides by <code><var>A - C</var></code>. Because <code><var>A - C</var></code> is positive, the inequality sign <code><var>REL</var></code> should not be flipped.</p>
<p><code>\dfrac{<var>A - C</var>x}{<var>A - C</var>} <var>REL</var> \dfrac{<var>D - B</var>}{<var>A - C</var>}</code></p>
<p><code>x <var>REL</var> <var>SOLUTION</var></code></p>
<div data-else>
<p>Divide both sides by <code><var>A - C</var></code>. Because <code><var>A - C</var></code> is negative, the inequality sign <code><var>REL</var></code> must be flipped to <code><var>FREL</var></code>.</p>
<p><code>\dfrac{<var>A - C</var>x}{<var>A - C</var>} <var>FREL</var> \dfrac{<var>D - B</var>}{<var>A - C</var>}</code></p>
<p><code>x <var>FREL</var> <var>SOLUTION</var></code></p>
Jump to Line
Something went wrong with that request. Please try again.