Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

126 lines (119 sloc) 6.181 kb
<!DOCTYPE html>
<html data-require="math math-format">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Radical equations</title>
<script data-main="../local-only/main.js" src="../local-only/require.js"></script>
</head>
<body>
<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 ) &gt; 1">randRange( 2, 10 )</var>
<var id="D" data-ensure="D !== B">randRangeNonZero( 2, 10 )</var>
<var id="SIMPLIFIED">fractionReduce( D - B, A - C )</var>
<var id="NOSOLN">$._("No solution")</var>
<var id="SOLUTION">
(function() {
if ( ( D - B ) / ( A - C) &gt; 0 ) {
return "&lt;code&gt;"
+ "x = "
+ fractionReduce( ( D - B ) * ( D - B), ( A - C ) * ( A - C) )
+ "&lt;/code&gt;";
} else {
return NOSOLN;
}
})()</var>
<var id="CHOICES">
(function() {
var choices = [];
for ( var i = 0; i &lt; 4; i++ ) {
var nOffset = randRange( 1, 10 );
var dOffset = randRangeExclude( 1, 10, [ C - A ] );
var choice = "&lt;code&gt;"
+ "x = "
+ fractionReduce( ( D - B + nOffset ) * ( D - B + nOffset ), ( A - C + dOffset ) * ( A - C + dOffset ) )
+ "&lt;/code&gt;";
choices.unshift( choice );
}
if ( ( D - B ) / ( A - C ) &gt; 0 ) {
choices.shift();
choices.unshift( SOLUTION );
}
choices = shuffle( choices );
choices.push( NOSOLN );
return choices;
})()</var>
</div>
<div class="problems">
<div>
<p class="question">Solve for <code>x</code>:</p>
<p><code><var>A</var>\sqrt{x} + <var>B</var> = <var>C</var>\sqrt{x} + <var>D</var></code></p>
<p class="solution"><var>SOLUTION</var></p>
<ul class="choices" data-category="true">
<li data-each="CHOICES as choice"><var>choice</var></li>
</ul>
</div>
</div>
<div class="hints">
<div data-if="A > C" data-unwrap="">
<div>
<p>Subtract <code><var>C</var>\sqrt{x}</code> from both sides:</p>
<p><code>(<var>A</var>\sqrt{x} + <var>B</var>) - <var>C</var>\sqrt{x} = (<var>C</var>\sqrt{x} + <var>D</var>) - <var>C</var>\sqrt{x}</code></p>
<p><code><var>A - C</var>\sqrt{x} + <var>B</var> = <var>D</var></code></p>
</div>
<div>
<p data-if="B > 0">Subtract <code><var>abs(B)</var></code> from both sides:</p><p data-else="">Add <code><var>abs(B)</var></code> to both sides:</p>
<p><code>(<var>A - C</var>\sqrt{x} + <var>B</var>) + <var>-B</var> = <var>D</var> + <var>-B</var></code></p>
<p><code><var>A - C</var>\sqrt{x} = <var>D - B</var></code></p>
</div>
<div>
<p>Divide both sides by <code><var>A - C</var></code>.</p>
<p><code>\frac{<var>A - C</var>\sqrt{x}}{<var>A - C</var>} = \frac{<var>D - B</var>}{<var>A - C</var>}</code></p>
</div>
<div>
<p>Simplify.</p>
<p><code>\sqrt{x} = <var>SIMPLIFIED</var></code></p>
</div>
<div data-if="( D - B ) / ( A - C ) > 0">
<p>Square both sides.</p>
<p><code>\sqrt{x} \cdot \sqrt{x} = <var>SIMPLIFIED</var> \cdot <var>SIMPLIFIED</var></code></p>
<p><var>SOLUTION</var></p>
</div>
<p data-else="">
The principal root of a number cannot be negative. So, there is no solution.
</p>
</div>
<div data-else="" data-unwrap="">
<div>
<p>Subtract <code><var>A</var>\sqrt{x}</code> from both sides:</p>
<p><code>(<var>A</var>\sqrt{x} + <var>B</var>) - <var>A</var>\sqrt{x} = (<var>C</var>\sqrt{x} + <var>D</var>) - <var>A</var>\sqrt{x}</code></p>
<p><code><var>B</var> = <var>C - A</var>\sqrt{x} + <var>D</var></code></p>
</div>
<div>
<p data-if="D > 0">Subtract <code><var>abs(D)</var></code> from both sides:</p><p data-else="">Add <code><var>abs(D)</var></code> to both sides:</p>
<p><code><var>B</var> + <var>-D</var> = (<var>C - A</var>\sqrt{x} + <var>D</var>) + <var>-D</var></code></p>
<p><code><var>B - D</var> = <var>C - A</var>\sqrt{x}</code></p>
</div>
<div>
<p>Divide both sides by <code><var>C - A</var></code>.</p>
<p><code>\frac{<var>B - D</var>}{<var>C - A</var>} = \frac{<var>C - A</var>\sqrt{x}}{<var>C - A</var>}</code></p>
</div>
<div>
<p>Simplify.</p>
<p><code><var>SIMPLIFIED</var> = \sqrt{x}</code></p>
</div>
<div data-if="( D - B ) / ( A - C ) > 0">
<p>Square both sides.</p>
<p><code><var>SIMPLIFIED</var> \cdot <var>SIMPLIFIED</var> = \sqrt{x} \cdot \sqrt{x}</code></p>
<p><var>SOLUTION</var></p>
</div>
<p data-else="">
The principal root of a number cannot be negative. So, there is no solution.
</p>
</div>
</div>
</div>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.