Permalink
Browse files

delete some exercises

  • Loading branch information...
1 parent 4f5dd17 commit ba18a0640b4d70e5d15f9abc46eb25c9a0fbfba8 @petercollingridge petercollingridge committed Feb 15, 2013
@@ -2,37 +2,45 @@
<html data-require="math math-format">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>Dividing polynomials by binomials</title>
+ <title>Adding and subtracting with like denominators</title>
<script src="../khan-exercise.js"></script>
+ <script type="text/javascript">
+ function getExpression( coefficient, degree, vari ) {
+ var expr = coefficient;
+
+ if (degree > 1) {
+ expr += vari + "^" + degree;
+ } else if (degree === 1) {
+ expr += vari;
+ }
+ return expr
+ }
+ </script>
</head>
<body>
<div class="exercise">
<div class="problems">
<div>
<div class="vars">
- <div data-ensure="abs(A) !== abs(B)">
- <var id="A">randRangeNonZero( -10, 10 )</var>
- <var id="B">randRangeNonZero( -10, 10 )</var>
- </div>
- <var id="SQUARE">1</var>
- <var id="CONSTANT">SQUARE*A*B</var>
- <var id="SIMPLECONSTANT">A*B</var>
- <var id="LINEAR">SQUARE*(-A-B)</var>
- <var id="SIMPLELINEAR">-A-B</var>
+ <var id="CONSTANT">randRangeNonZero( -12, 12 )</var>
+ <var id="COEFFICIENT1">randRange( 1, 12 )</var>
+ <var id="COEFFICIENT2">randRange( 1, 12 )</var>
+ <var id="X">randVar()</var>
+ <var id="DENOMINATOR">randRange( 2, 12 )</var>
+ <var id="SOLUTION">toFraction((COEFFICIENT1 + COEFFICIENT2) / DENOMINATOR)</var>
</div>
- <p class="problem">Simplify the following expression:</p>
- <p class="question"><code>\dfrac{<var>plus(SQUARE + "x^2")</var> + <var>plus( LINEAR + "x" )</var> + <var>CONSTANT</var>}{x + <var>-A</var>}</code></p>
+ <p class="problem">Simplify the expression.</p>
+ <p class="question">
+ <code>
+ \frac{<var>COEFFICIENT1</var><var>X</var> + <var>CONSTANT</var>}{<var>DENOMINATOR</var><var>X</var>} +
+ \frac{<var>COEFFICIENT2</var><var>X</var> - <var>CONSTANT</var>}{<var>DENOMINATOR</var><var>X</var>}
+ </code>
+ </p>
- <div class="solution" data-type="set">
- <div class="set-sol" data-type="regex">^\s*[xX]\s*<var>B &lt; 0 ? "\\+" : "[-\u2212]"</var>\s*<var>abs( B )</var>\s*$</div>
- <div class="set-sol" data-type="regex">^\s*<var>B &lt; 0 ? "" : "[-\u2212]"</var>\s*<var>abs( B )</var>\s*\+\s*[xX]\s*$</div>
- <div class="input-format"><span class="entry"></span></div>
- <div class="example">an expression, like <b>x+1</b></div>
- </div>
+ <p class="solution" data-type="rational"><var>SOLUTION[0] / SOLUTION[1]</var></p>
<div class="hints">
- <p>First factor the polynomial in the numerator.</p>
<div>
<p>When we factor a polynomial, we are basically reversing this process of multiplying linear expressions together:</p>
@@ -83,18 +91,10 @@
</code></p>
</div>
- <p>
- So we can rewrite the expression as:
- <code>
- \dfrac{(x <var>A &lt; 0 ? "+" : ""</var> \color{<var>PINK</var>}{<var>-A</var>})
- (x <var>B &lt; 0 ? "+" : ""</var> \color{<var>PINK</var>}{<var>-B</var>})}
- {x + <var>-A</var>}
- </code>
- </p>
-
- <p>We can now divide the numerator and denominator by <code>(x + <var>-A</var>)</code>.</p>
-
- <p>Which leaves us with <code>x + <var>-B</var></code>.</p>
+ <p><b>
+ So we can factor the expression as: <code>(x <var>A &lt; 0 ? "+" : ""</var> \color{<var>PINK</var>}{<var>-A</var>})
+ (x <var>B &lt; 0 ? "+" : ""</var> \color{<var>PINK</var>}{<var>-B</var>})</code>
+ </b></p>
</div>
</div>
@@ -11,19 +11,19 @@
<div id="perfect-square">
<div class="vars">
+ <var id="X">randVar()</var>
<div data-ensure="abs(A) !== 1">
<var id="A">randRangeNonZero( -9, 9 )</var>
</div>
- <var id="SQUARE">1</var>
<var id="CONSTANT">-A * A</var>
</div>
<p class="problem">Simplify the following expression:</p>
- <p class="question"><code>\dfrac{x^2</var> + <var>CONSTANT</var>}{x + <var>A</var>}</code></p>
+ <p class="question"><code>\dfrac{<var>X</var>^2 + <var>CONSTANT</var>}{<var>X</var> + <var>A</var>}</code></p>
<div class="solution" data-type="set">
- <div class="set-sol" data-type="regex">^\s*[xX]\s*<var>A &lt; 0 ? "\\+" : "[-\u2212]"</var>\s*<var>abs( A )</var>\s*$</div>
- <div class="set-sol" data-type="regex">^\s*<var>A &lt; 0 ? "" : "[-\u2212]"</var>\s*<var>abs( A )</var>\s*\+\s*[xX]\s*$</div>
+ <div class="set-sol" data-type="regex">^\s*<var>X</var>\s*<var>A &lt; 0 ? "\\+" : "[-\u2212]"</var>\s*<var>abs( A )</var>\s*$</div>
+ <div class="set-sol" data-type="regex">^\s*<var>A &lt; 0 ? "" : "[-\u2212]"</var>\s*<var>abs( A )</var>\s*\+\s*<var>X</var>\s*$</div>
<div class="input-format"><span class="entry"></span></div>
<div class="example">an expression, like <b>x+1</b></div>
</div>
@@ -37,62 +37,60 @@
</p>
<div>
- <p><code class="hint_pink">\qquad a = x</code></p>
+ <p><code class="hint_pink">\qquad a = <var>X</var></code></p>
<p><code class="hint_blue">\qquad b = \sqrt{<var>A * A</var>} = <var>A</var></code></p>
</div>
<p>
So we can rewrite the expression as:
<code>
- \dfrac{(\color{<var>BLUE</var>}{x} <var>A &gt; 0 ? "+" : "" </var> \color{<var>PINK</var>}{<var>A</var>})
- (\color{<var>BLUE</var>}{x} <var>A &lt; 0 ? "+" : "" </var> \color{<var>PINK</var>}{<var>-A</var>})}
- {x + <var>A</var>}
+ \dfrac{(\color{<var>BLUE</var>}{<var>X</var>} <var>A &gt; 0 ? "+" : "" </var> \color{<var>PINK</var>}{<var>A</var>})
+ (\color{<var>BLUE</var>}{<var>X</var>} <var>A &lt; 0 ? "+" : "" </var> \color{<var>PINK</var>}{<var>-A</var>})}
+ {<var>X</var> + <var>A</var>}
</code>
</p>
- <p>We can now divide the numerator and denominator by <code>(x + <var>A</var>)</code>.</p>
+ <p>We can now divide the numerator and denominator by <code>(<var>X</var> + <var>A</var>)</code>.</p>
- <p>Which leaves us with <code>x + <var>-A</var></code>.</p>
+ <p>Which leaves us with <code><var>X</var> + <var>-A</var></code>.</p>
</div>
</div>
<div id="not-perfect-square">
<div class="vars">
+ <var id="X">randVar()</var>
<div data-ensure="abs(A) !== abs(B)">
<var id="A">randRangeNonZero( -10, 10 )</var>
<var id="B">randRangeNonZero( -10, 10 )</var>
</div>
- <var id="SQUARE">1</var>
- <var id="CONSTANT">SQUARE*A*B</var>
- <var id="SIMPLECONSTANT">A*B</var>
- <var id="LINEAR">SQUARE*(-A-B)</var>
- <var id="SIMPLELINEAR">-A-B</var>
+ <var id="CONSTANT">A*B</var>
+ <var id="LINEAR">-A-B</var>
</div>
<p class="problem">Simplify the following expression:</p>
- <p class="question"><code>\dfrac{<var>plus(SQUARE + "x^2")</var> + <var>plus( LINEAR + "x" )</var> + <var>CONSTANT</var>}{x + <var>-A</var>}</code></p>
+ <p class="question"><code>\dfrac{<var>X</var>^2 + <var>plus( LINEAR + X )</var> + <var>CONSTANT</var>}{<var>X</var> + <var>-A</var>}</code></p>
<div class="solution" data-type="set">
- <div class="set-sol" data-type="regex">^\s*[xX]\s*<var>B &lt; 0 ? "\\+" : "[-\u2212]"</var>\s*<var>abs( B )</var>\s*$</div>
- <div class="set-sol" data-type="regex">^\s*<var>B &lt; 0 ? "" : "[-\u2212]"</var>\s*<var>abs( B )</var>\s*\+\s*[xX]\s*$</div>
+ <div class="set-sol" data-type="regex">^\s*<var>X</var>\s*<var>B &lt; 0 ? "\\+" : "[-\u2212]"</var>\s*<var>abs( B )</var>\s*$</div>
+ <div class="set-sol" data-type="regex">^\s*<var>B &lt; 0 ? "" : "[-\u2212]"</var>\s*<var>abs( B )</var>\s*\+\s*<var>X</var>\s*$</div>
<div class="input-format"><span class="entry"></span></div>
<div class="example">an expression, like <b>x+1</b></div>
</div>
<div class="hints" data-apply="appendContents">
<p>
- <code><var>plus(SQUARE + "x^2")</var> + <var>plus( LINEAR + "x" )</var> + <var>CONSTANT</var> = (x + <var>-A</var>)(x + <var>-B</var>)</code>
+ <code><var>X</var>^2 + <var>plus( LINEAR + X )</var> + <var>CONSTANT</var> = (<var>X</var> + <var>-A</var>)(<var>X</var> + <var>-B</var>)</code>
</p>
<p>
So we can rewrite the expression as:
- <code>\dfrac{(x + <var>-A</var>)(x + <var>-B</var>)}{x + <var>-A</var>}</code>
+ <code>\dfrac{(<var>X</var> + <var>-A</var>)(<var>X</var> + <var>-B</var>)}{<var>X</var> + <var>-A</var>}</code>
</p>
- <p>We can now divide the numerator and denominator by <code>(x + <var>-A</var>)</code>.</p>
+ <p>We can now divide the numerator and denominator by <code>(<var>X</var> + <var>-A</var>)</code>.</p>
- <p>Which leaves us with <code>x + <var>-B</var></code>.</p>
+ <p>Which leaves us with <code><var>X</var> + <var>-B</var></code>.</p>
</div>
</div>
</div>
Oops, something went wrong.

0 comments on commit ba18a06

Please sign in to comment.