# Khan/khan-exercises

White space clean up

1 parent 27ab447 commit 41941b33d97405d3d49e783ee74eecb36dc63139 marcia committed Jul 8, 2011
4 exercises/absolute_value_equations.html
 @@ -31,15 +31,15 @@ (function() { var choices = []; - + for ( var i = 0; i < 4; i++ ) { var choice = "<code>"; var nOffset = randRange( 1, 10 ); var dOffset = randRangeExclude( 1, 10, [ C - A ] ); if ( D - B + nOffset === 0 ) { choice += "x = 0"; } else { - choice += "x = " + choice += "x = " + fractionReduce( -1 * abs( D - B + nOffset ), abs( A - C + dOffset ) ) + "\\text{ or }" + "x = "
 @@ -19,7 +19,7 @@ stroke: color, fill: color }); - + for ( var i = numRows; i > 0; i-- ) { for (var j = numCols; j > 0; j-- ) { circle( [ j, i ], 0.25 ); @@ -48,7 +48,7 @@ range: [ [0, 0], [0, 1] ] }); - label( [0, 0], + label( [0, 0], "\\Huge{\\color{ #6495ED }{ A } + \\color{ #28AE7B }{ B } = ?}", "right" );
 @@ -21,7 +21,7 @@ randRange( 1, 99 ) digits( A ) digits( B ) - + 0 [] 3 @@ -70,21 +70,21 @@ sum = A_DIGITS[ index ] + CARRY; - HIGHLIGHTS.push( label( [ X_MAX - index, Y_FIRST ], + HIGHLIGHTS.push( label( [ X_MAX - index, Y_FIRST ], "\\Huge{\\color{#6495ED}{" + A_DIGITS[ index ] + "}}" ) ); if ( index < B_DIGITS.length ) { - HIGHLIGHTS.push( label( [ X_MAX - index, Y_SECOND ], + HIGHLIGHTS.push( label( [ X_MAX - index, Y_SECOND ], "\\Huge{\\color{#6495ED}{" + B_DIGITS[ index ] + "}}" ) ); addendStr = " + \\color{#6495ED}{" + B_DIGITS[ index ] + "}"; sum += B_DIGITS[ index ]; } label( [ X_MAX - index, 0 ], "\\Huge{" + sum % 10 + "}"); - HIGHLIGHTS.push( label( [ X_MAX - index, Y_SUM ], + HIGHLIGHTS.push( label( [ X_MAX - index, Y_SUM ], "\\Huge{\\color{#28AE7B}{" + sum % 10 + "}}" ) ); CARRY = floor( sum / 10 ); if ( CARRY !== 0 ) { - HIGHLIGHTS.push( label( [ X_MAX - index - 1, Y_CARRY ], + HIGHLIGHTS.push( label( [ X_MAX - index - 1, Y_CARRY ], "\\color{#FFA500}{" + CARRY + "}", "below" ) ); carryStr = "\\color{#FFA500}{" + CARRY + "}"; } @@ -103,13 +103,13 @@ while( HIGHLIGHTS.length ) { HIGHLIGHTS.pop().remove(); } - HIGHLIGHTS.push( label( [ 0, Y_CARRY ], + HIGHLIGHTS.push( label( [ 0, Y_CARRY ], "\\color{#6495ED}{" + CARRY + "}", "below" ) ); label( [ 0, Y_SUM ], "\\Huge{" + CARRY + "}" ); - HIGHLIGHTS.push( label( [ 0, Y_SUM ], + HIGHLIGHTS.push( label( [ 0, Y_SUM ], "\\Huge{\\color{#28AE7B}{" + CARRY + "}}" ) ); - - HIGHLIGHTS.push( label( [ X_SIDE, Y_SIDE ], + + HIGHLIGHTS.push( label( [ X_SIDE, Y_SIDE ], "\\Large{" + "\\color{#6495ED}{" + CARRY + "}" + " = "
 @@ -70,21 +70,21 @@ sum = A_DIGITS[ index ] + CARRY; - HIGHLIGHTS.push( label( [ X_MAX - index, Y_FIRST ], + HIGHLIGHTS.push( label( [ X_MAX - index, Y_FIRST ], "\\Huge{\\color{#6495ED}{" + A_DIGITS[ index ] + "}}" ) ); if ( index < B_DIGITS.length ) { - HIGHLIGHTS.push( label( [ X_MAX - index, Y_SECOND ], + HIGHLIGHTS.push( label( [ X_MAX - index, Y_SECOND ], "\\Huge{\\color{#6495ED}{" + B_DIGITS[ index ] + "}}" ) ); addendStr = " + \\color{#6495ED}{" + B_DIGITS[ index ] + "}"; sum += B_DIGITS[ index ]; } label( [ X_MAX - index, 0 ], "\\Huge{" + sum % 10 + "}"); - HIGHLIGHTS.push( label( [ X_MAX - index, Y_SUM ], + HIGHLIGHTS.push( label( [ X_MAX - index, Y_SUM ], "\\Huge{\\color{#28AE7B}{" + sum % 10 + "}}" ) ); CARRY = floor( sum / 10 ); if ( CARRY !== 0 ) { - HIGHLIGHTS.push( label( [ X_MAX - index - 1, Y_CARRY ], + HIGHLIGHTS.push( label( [ X_MAX - index - 1, Y_CARRY ], "\\color{#FFA500}{" + CARRY + "}", "below" ) ); carryStr = "\\color{#FFA500}{" + CARRY + "}"; } @@ -103,13 +103,13 @@ while( HIGHLIGHTS.length ) { HIGHLIGHTS.pop().remove(); } - HIGHLIGHTS.push( label( [ 0, Y_CARRY ], + HIGHLIGHTS.push( label( [ 0, Y_CARRY ], "\\color{#6495ED}{" + CARRY + "}", "below" ) ); label( [ 0, Y_SUM ], "\\Huge{" + CARRY + "}" ); - HIGHLIGHTS.push( label( [ 0, Y_SUM ], + HIGHLIGHTS.push( label( [ 0, Y_SUM ], "\\Huge{\\color{#28AE7B}{" + CARRY + "}}" ) ); - - HIGHLIGHTS.push( label( [ X_SIDE, Y_SIDE ], + + HIGHLIGHTS.push( label( [ X_SIDE, Y_SIDE ], "\\Large{" + "\\color{#6495ED}{" + CARRY + "}" + " = " @@ -125,4 +125,4 @@ - +
 @@ -70,21 +70,21 @@ sum = A_DIGITS[ index ] + CARRY; - HIGHLIGHTS.push( label( [ X_MAX - index, Y_FIRST ], + HIGHLIGHTS.push( label( [ X_MAX - index, Y_FIRST ], "\\Huge{\\color{#6495ED}{" + A_DIGITS[ index ] + "}}" ) ); if ( index < B_DIGITS.length ) { - HIGHLIGHTS.push( label( [ X_MAX - index, Y_SECOND ], + HIGHLIGHTS.push( label( [ X_MAX - index, Y_SECOND ], "\\Huge{\\color{#6495ED}{" + B_DIGITS[ index ] + "}}" ) ); addendStr = " + \\color{#6495ED}{" + B_DIGITS[ index ] + "}"; sum += B_DIGITS[ index ]; } label( [ X_MAX - index, 0 ], "\\Huge{" + sum % 10 + "}"); - HIGHLIGHTS.push( label( [ X_MAX - index, Y_SUM ], + HIGHLIGHTS.push( label( [ X_MAX - index, Y_SUM ], "\\Huge{\\color{#28AE7B}{" + sum % 10 + "}}" ) ); CARRY = floor( sum / 10 ); if ( CARRY !== 0 ) { - HIGHLIGHTS.push( label( [ X_MAX - index - 1, Y_CARRY ], + HIGHLIGHTS.push( label( [ X_MAX - index - 1, Y_CARRY ], "\\color{#FFA500}{" + CARRY + "}", "below" ) ); carryStr = "\\color{#FFA500}{" + CARRY + "}"; } @@ -103,13 +103,13 @@ while( HIGHLIGHTS.length ) { HIGHLIGHTS.pop().remove(); } - HIGHLIGHTS.push( label( [ 0, Y_CARRY ], + HIGHLIGHTS.push( label( [ 0, Y_CARRY ], "\\color{#6495ED}{" + CARRY + "}", "below" ) ); label( [ 0, Y_SUM ], "\\Huge{" + CARRY + "}" ); - HIGHLIGHTS.push( label( [ 0, Y_SUM ], + HIGHLIGHTS.push( label( [ 0, Y_SUM ], "\\Huge{\\color{#28AE7B}{" + CARRY + "}}" ) ); - - HIGHLIGHTS.push( label( [ X_SIDE, Y_SIDE ], + + HIGHLIGHTS.push( label( [ X_SIDE, Y_SIDE ], "\\Large{" + "\\color{#6495ED}{" + CARRY + "}" + " = " @@ -125,4 +125,4 @@ - +
267 exercises/angles_2.html
 @@ -9,41 +9,41 @@
rand(20) + 90 - 180 - Y - + 180 - Y + rand(25) + 20 rand(45) + 60 180 - Tri_Y - Tri_Z - + rand(2) - rand(3) - RAND_SWITCH2 + 10*RAND_SWITCH3 + rand(3) + RAND_SWITCH2 + 10*RAND_SWITCH3
- +
init({ range: [[-5, 5], [-3, 5]], scale: [40, 40] }); - + style({ stroke: "#888", strokeWidth: 2 }); - - // Draw a horizontal line and a crossing line + + // Draw a horizontal line and a crossing line // to form 2 opposing angles. path([ [-5, 0], [5, 0] ]); path([ [-5, -3], [5, 5] ]); path([ [-5, 3], [5, 3] ]); path([ [-1.2, 0], [-4, 3] ]); - + style({ fill: "grey" }, function() { @@ -61,100 +61,99 @@ label([-3.75, -2], "F", "above"); circle([-3.75,-2], 0.05); }); - + // label angle ABC arc([-4,3], .75, 312, 360, { stroke: "green" }); - label([-3.2, 3], "\\color{green}{Tri_Y°}", - "below right", {color: "green"}); - + label([-3.2, 3], "\\color{green}{Tri_Y°}", + "below right", {color: "green"}); + // label angle BAC arc([-1.3,0], .75, 38, 125, { stroke: "purple" }); - label([-1.3, .7], "\\color{purple}{Tri_Z°}", + label([-1.3, .7], "\\color{purple}{Tri_Z°}", "above", {color: "purple"}); - // Label X according to problem variation + // Label X according to problem variation if(RAND_SWITCH2 == 0 ) { //problem variation 1 arc([-1, 0], 1, 180, 210, { stroke: "blue"}); - label([-3.3, 0], "\\color{blue}{∠DAF} = ?", + label([-3.3, 0], "\\color{blue}{∠DAF} = ?", "below", { color: "blue"}); } else { //problem variation 2 arc([-1, 0], 1, 0, 45, { stroke: "blue"}); - label([1, 0], "\\color{blue}{∠CAE} = ?", + label([1, 0], "\\color{blue}{∠CAE} = ?", "above", { color: "blue"}); - } + }
- -

NOTE: + +

NOTE: Angles not drawn to scale.

- - + + Given the following:
• \color{green}{\angle{ABC}} = Tri_Y°
• \color{purple}{\angle{BAC}} = Tri_Z°
• \overline{DE} \parallel \overline{BC}
- - + -
+

What is \color{blue}{\angle{DAF}} = ?

-
+

What is \color{blue}{\angle{CAE}} = ?

-
- +
+
Tri_X
- +

- Solve for \color{orange}{\angle{BCA}} by subtracting angles - \color{purple}{\angle{BAC}} and - \color{green}{\angle{ABC}} - from 180°. We find out that - \color{orange}{\angle{BCA}} = + Solve for \color{orange}{\angle{BCA}} by subtracting angles + \color{purple}{\angle{BAC}} and + \color{green}{\angle{ABC}} + from 180°. We find out that + \color{orange}{\angle{BCA}} = Tri_X° // label angle BAC arc([2.5, 3], .75, 180, 220, { stroke: "orange" }); - label([1.8, 3], "\\color{orange}{Tri_X°}", + label([1.8, 3], "\\color{orange}{Tri_X°}", "below left", {color: "orange"}); - +

-

- Solve for - +

+ Solve for + \color{blue}{\angle{DAF}} by using the fact - that it a corresponding angle to + that it a corresponding angle to - + \color{blue}{\angle{CAE}} by using the fact that it is an alternate interior angle to - - \color{orange}{\angle{BCA}}. That means those + + \color{orange}{\angle{BCA}}. That means those angles are equal because they are both created by the same set of parallel lines \overline{BC} - and \overline{DE}, and transversal line + and \overline{DE}, and transversal line \overline{CF}.

- +
init({ range: [[-7, 6], [-5, 5.2]], scale: [40, 40] }); - + style({ stroke: "#888", strokeWidth: 2 }); - + style({ fill: "grey" }, function() { @@ -164,13 +163,13 @@ circle([-5,2], 0.05); label([5, 2], "B", "below"); circle([5,2], 0.05); - + path([ [-5, -2], [5, -2] ]); label([-5, -2], "C", "below"); circle([-5,-2], 0.05); label([5, -2], "D", "below"); circle([5, -2], 0.05); - + // Draw a transversal line. path([ [-5, -4], [4, 5] ]); label([4, 5], "E", "below"); @@ -182,40 +181,40 @@ label([-3, -2], "H", "below right"); circle([-3, -2], 0.05); }); - - + + // label angle X if(RAND_SWITCH2 == 0) { arc([-2.9, -2], 1, 0, 50, { stroke: "blue"}); label([-2, -2], "\\color{blue}{\\angle{GHD}}=?", "above right"); } else { arc([-2.9, -2], 1, 180, 220, { stroke: "blue"}); label([-4, -2.5], "\\color{blue}{\\angle{CHF}}=?", "below left"); - } - + } + // label angle Y if(RAND_SWITCH3 == 0) { arc([1.2, 2], 1.5, 0, 50, { stroke: "purple" }); - label([3.1, 2], "\\color{purple}{\\angle{EGB}}=X°", + label([3.1, 2], "\\color{purple}{\\angle{EGB}}=X°", "above right"); } else if (RAND_SWITCH3 == 1) { arc([1.2, 2], 1.5, 180, 220, { stroke: "purple" }); - label([-1, 2], "\\color{purple}{\\angle{AGH}}=X°", + label([-1, 2], "\\color{purple}{\\angle{AGH}}=X°", "below left"); } else { arc([1.2, 2], 1, 220, 0, { stroke: "purple" }); - label([1.5, 1.2], "\\color{purple}{\\angle{BGH}}=180 - X°", + label([1.5, 1.2], "\\color{purple}{\\angle{BGH}}=180 - X°", "below right"); }
-

NOTE: +

NOTE: Angles not drawn to scale.

- +

Given

• - \overline{AB} \parallel \overline{CD} + \overline{AB} \parallel \overline{CD} (line AB is parallel to line CD)
• @@ -229,85 +228,85 @@ \color{purple}{\angle{BGH}} = 180 - X°
• - -
- + + +
- What is + What is \angle{GHD} = ? \angle{CHF} = ? - +

X
\color{blue}{\angle{GHD}} = \color{purple}{\angle{EGB}}. - We know this because they are 2 complementray angles of a set of + We know this because they are 2 complementray angles of a set of parallel lines bisected by a single line.
- First solve for \color{orange}{\angle{AGH}}. We know that - \color{orange}{\angle{AGH}} = \color{purple}{\angle{EGB}}, - because angles opposite one another are equal. + First solve for \color{orange}{\angle{AGH}}. We know that + \color{orange}{\angle{AGH}} = \color{purple}{\angle{EGB}}, + because angles opposite one another are equal. arc([1,2], .88, 180, 225, {stroke:"orange"}); label([0,2], "\\color{orange}{X°}", "below left");
\color{blue}{\angle{GHD}} = \color{purple}{\angle{AGH}} - We know this because they are 2 alternate interior angles of a set of + We know this because they are 2 alternate interior angles of a set of parallel lines bisected by a single line.
\color{blue}{\angle{CHF}} = \color{purple}{\angle{AGH}}. - We know this because they are 2 complementray angles of a set of + We know this because they are 2 complementray angles of a set of parallel lines bisected by a single line.
- First solve for \color{orange}{\angle{AGH}}. We know that - \color{orange}{\angle{AGH}} = 180° - \color{purple}{\angle{BGH}}, because angles along a flat line or plane adds up to 180°. + First solve for \color{orange}{\angle{AGH}}. We know that + \color{orange}{\angle{AGH}} = 180° - \color{purple}{\angle{BGH}}, because angles along a flat line or plane adds up to 180°. arc([1,2], .88, 180, 225, {stroke:"orange"}); label([0,2], "\\color{orange}{X°}", "below left"); -
+
- \color{blue}{\angle{GHD}} = \color{orange}{\angle{AGH}}. + \color{blue}{\angle{GHD}} = \color{orange}{\angle{AGH}}. We know those 2 angles are equal because they are alternate interior angles of 2 parallel lines.
\color{blue}{\angle{CHF}} = \color{orange}{\angle{AGH}}. - We know those 2 angles are equal because they are corresponding angles + We know those 2 angles are equal because they are corresponding angles formed by parallel lines, and a single bisecting lines.
- +
- -
init({ range: [[-10, 10], [-7, 10]], scale: [30, 30] }); - - + + style({ stroke: "#888", strokeWidth: 2 }); - + // Draw A Star path([ [-8, 5], [8, 5], [-6, -6], [0, 9], [0, 9], [6,-6], [-8, 5] ]); - + // Label pts on the star. label([-8, 5], "A", "left"); label([0, 9], "B", "above"); @@ -321,13 +320,13 @@ label([-3.2, 1.3], "J", "below left"); // Label the given angles - label([-5.5, -5.2], "\\color{green}{Tri_Y°}", + label([-5.5, -5.2], "\\color{green}{Tri_Y°}", "above right"); arc([-6, -6], 1.3, 40, 71, { stroke: "green" }); - label([0, 7.4], "\\color{orange}{Tri_X°}", + label([0, 7.4], "\\color{orange}{Tri_X°}", "below"); arc([0, 9], 1.3, 245, 290, { stroke: "orange" }); - + // Label X according to variation on the problem if(RAND_SWITCH3 == 0) { label([4.8, 1.0], "\\color{blue}{\\angle{CHE}}=?", "right"); @@ -337,49 +336,49 @@ arc([3.2, 1.3], 1, 35, 118, { stroke: "blue" }); } else { label([2.5, -0.5], "\\color{blue}{\\angle{DHE}}=?", "below"); - arc([3.2, 1.3], 1.1, 219, 286, { stroke: "blue" }); + arc([3.2, 1.3], 1.1, 219, 286, { stroke: "blue" }); }
-

NOTE: +

NOTE: Angles not drawn to scale.

- +

Given the following:

• \color{green}{\angle{BDC}°} = Tri_Y
• \color{orange}{\angle{DBE}°} = Tri_X
- - What is + + What is \color{blue}{\angle{CHE}} \color{blue}{\angle{CHG}} \color{blue}{\angle{DHE}} ?

Tri_Z
180-Tri_Z
- - + +

- \color{purple}{\angle{BHD}} = 180° - \color{green}{\angle{BDC}} - \color{orange}{\angle{DBE}}. + \color{purple}{\angle{BHD}} = 180° - \color{green}{\angle{BDC}} - \color{orange}{\angle{DBE}}. This is because interior angles of a triagle adds up to 180°. // label angle BHD arc([3.2, 1.3], .75, 118, 220, { stroke: "purple" }); - label([2.6, 2], "\\color{purple}{Tri_Z°}", + label([2.6, 2], "\\color{purple}{Tri_Z°}", "below left"); - +

- +

\color{blue}{\angle{CHE}} = \color{purple}{\angle{BHD}}. - This is because they are opposite each other, and opposite angles are - equal.
+ This is because they are opposite each other, and opposite angles are + equal.
\color{blue}{\angle{CHE}} = Tri_Z° -

+

@@ -390,8 +389,8 @@ \color{blue}{\angle{DHE}} = 180° - \color{purple}{\angle{BHD}}. - This is because angles alone a flat line of plane adds up to - 180°.
+ This is because angles alone a flat line of plane adds up to + 180°.
\color{blue}{\angle{GHC}} @@ -403,24 +402,24 @@

- +
init({ range: [[-10, 10], [-7, 10]], scale: [30, 30] }); - - + + style({ stroke: "#888", strokeWidth: 2 }); - + // Draw A Star path([ [-8, 5], [8, 5], [-6, -6], [0, 9], [0, 9], [6,-6], [-8, 5] ]); - + // Label pts on the star. label([-8, 5], "A", "left"); label([0, 9], "B", "above"); @@ -436,35 +435,35 @@ // Label Angles and X according to variation if( RAND_SWITCH2 == 0) { // Label the given angles - label([-5.5, -5.2], "\\color{green}{Tri_Y°}", + label([-5.5, -5.2], "\\color{green}{Tri_Y°}", "above right"); arc([-6, -6], 1.3, 40, 71, { stroke: "green" }); - label([0, -.2], "\\color{orange}{180 - Tri_Z°}", + label([0, -.2], "\\color{orange}{180 - Tri_Z°}", "above"); arc([0, -1], 1, 28, 152, { stroke: "orange" }); - + // Label X label([-3.7, 2.5], "\\color{blue}{\\angle{AJF}}=?", "above"); arc([-3.2, 1.3], 1, 65, 142, { stroke: "blue" }); - } else { + } else { // Label the given angles - label([6.5, 5], "\\color{green}{Tri_Y°}", + label([6.5, 5], "\\color{green}{Tri_Y°}", "below left"); arc([8, 5], 1.3, 180, 220, { stroke: "green" }); - label([1.3, 4.5], "\\color{orange}{180 - Tri_Z°}", + label([1.3, 4.5], "\\color{orange}{180 - Tri_Z°}", "below left"); arc([1.6, 5], 0.75, 180, 289, { stroke: "orange" }); - + // Label X - label([4.0, -0.3], "\\color{blue}{\\angle{IHE}}=?", + label([4.0, -0.3], "\\color{blue}{\\angle{IHE}}=?", "below left"); arc([3.1, 1.2], .75, 220, 290, { stroke: "blue" }); }
-

NOTE: +

NOTE: Angles not drawn to scale.

- +

Given the following:

@@ -479,15 +478,15 @@
• \color{orange}{\angle{FGH}°} = 180 - Tri_Z°
• - - - What is + + + What is \color{blue}{\angle{AJF}} = ? \color{blue}{\angle{IHE}} = ? - +

Tri_X
- +

@@ -496,9 +495,9 @@ // label angle JID arc([0, -1.2], .75, 143, 220, { stroke: "purple" }); - label([-.75, -1.2], "\\color{purple}{Tri_Z°}", + label([-.75, -1.2], "\\color{purple}{Tri_Z°}", "left"); - +

@@ -508,22 +507,22 @@ // label angle HGC arc([1.8, 5], 1, 280, 0, { stroke: "purple" }); - label([2.5, 4.3], "\\color{purple}{Tri_Z°}", + label([2.5, 4.3], "\\color{purple}{Tri_Z°}", "bottom right"); - +

- +

\color{teal}{\angle{DJI}} = 180° - \color{green}{\angle{BDC}} - \color{purple}{\angle{DIJ}}. We know this, because the sum of angles inside a triangle add up to 180°. // label angle JID arc([-3.2, 1.3], .75, 260, 320, { stroke: "teal" }); - label([-3.2, 0.50], "\\color{teal}{Tri_X°}", + label([-3.2, 0.50], "\\color{teal}{Tri_X°}", "bottom right"); - +

@@ -533,12 +532,12 @@ // label angle CHG arc([3.2, 1.3], .75, 38, 120, { stroke: "teal" }); - label([3.4, 1.78], "\\color{teal}{Tri_X°}", + label([3.4, 1.78], "\\color{teal}{Tri_X°}", "above"); - +

- +

@@ -555,7 +554,7 @@

- +
4 exercises/division_0.5.html
 @@ -36,7 +36,7 @@ scale: [ 50, 50 ] }); - LABEL = label( [ 0, A ], + LABEL = label( [ 0, A ], "\\Huge{\\color{ #6495ED }{ C } \\div \\color{ #FFA500 }{ B } = ?}", "right" );
A
@@ -69,7 +69,7 @@

LABEL.remove(); - label( [ 0, A ], + label( [ 0, A ], "\\Huge{\\color{ #6495ED }{" + C + "} \\div \\color{ #FFA500 }{" + B + "} = " + A + "}", "right" );
4 exercises/division_1.html
 @@ -36,7 +36,7 @@ scale: [ 50, 50 ] }); - LABEL = label( [ 0, A ], + LABEL = label( [ 0, A ], "\\Huge{\\color{ #6495ED }{ C } \\div \\color{ #FFA500 }{ B } = ?}", "right" );
A
@@ -69,7 +69,7 @@

LABEL.remove(); - label( [ 0, A ], + label( [ 0, A ], "\\Huge{\\color{ #6495ED }{" + C + "} \\div \\color{ #FFA500 }{" + B + "} = " + A + "}", "right" );
24 exercises/domain_of_a_function.html
 @@ -51,11 +51,11 @@
- +

f(x) = \dfrac{ x + A }{ ( x + A )( x - B ) }

What is the domain of f(x)?

- +

CHOICES["two-denom-simplify"]

• c
• @@ -88,7 +88,7 @@

So the only restriction on the domain is that x \neq -1*A.

Expressing this mathematically, the domain is CHOICES["two-denom-cond"].

- +
@@ -134,22 +134,22 @@
- +

f(x) = \begin{cases} \dfrac{ 1 }{ \sqrt{ x - A } } & \text{, if $x \geq A$} \\ \dfrac{ 1 }{ \sqrt{ A - x } } & \text{, if $x < A$} \end{cases}

CHOICES["inverse-sqrt-cond"]

• c
- +

f(x) is a piecewise function, so we need to examine where each piece is undefined.

The first piecewise definition of f(x), \frac{ 1 }{ \sqrt{ x - A } }, is undefined where the denominator is zero and where the radicand (the expression under the radical) is less than zero.

The denominator, \sqrt{ x - A }, is zero when x - A = 0, so we know that x \neq A.

-

The radicand, x - A, is less than zero when x < A, so we know that x \geq A. +

The radicand, x - A, is less than zero when x < A, so we know that x \geq A.

So the first piecewise definition of f(x) is defined when x \neq A and x \geq A. Combining these two restrictions, the first piecewise definition is defined when x > A. The first piecewise defintion applies when x \geq A, so this restriction is relevant.

The second piecewise definition of f(x), \frac{ 1 }{ \sqrt{ A - x } }, applies when x < A and is undefined where the denominator is zero and where the radicand is less than zero.

-

The denominator, \sqrt{ A - x }, is zero when A - x = 0, so we know that x \neq A. +

The denominator, \sqrt{ A - x }, is zero when A - x = 0, so we know that x \neq A.

The radicand, A - x, is less than zero when x > A, so we know that x \leq A.

So the second piecewise definition of f(x) is defined when x \neq A and x \leq A. Combining these two restrictions, the second piecewise definition is defined when x < A. However, the second piecewise definition of f(x) only applies when x < A, so restriction isn't actually relevant to the domain of f(x).

So the first piecewise definition is defined when x > A and applies when x \geq A; the second piecewise definition is defined when x < A and applies when x < A. Putting the restrictions of these two together, the only place where a definition applies and the value is undefined is at x = A. So the only restriction on the domain of f(x) is x \neq A.

@@ -200,11 +200,11 @@

So the first piecewise definition is defined when x \neq -1*A and x \neq C and applies when x \neq B; the second piecewise definition is defined always and applies when x = B. Putting the restrictions of these two together, the only places where a definition applies and is undefined are at x = -1*A and x = C. So the restriction on the domain of f(x) is that x \neq -1*A and x \neq C.

Expressing this mathematically, the domain is CHOICES["two-denom-cond-weird"].

- +
- +

f(x) = \dfrac{ \sqrt{ x - C } }{ x^2 + A+B x + A*B }

CHOICES["sqrt-poly-frac"]

@@ -226,7 +226,7 @@
- +

f(x) = \sqrt{ A - \lvert x \rvert }

CHOICES["sqrt-abs"]

@@ -245,7 +245,7 @@
- +

f(x) = \dfrac{ B }{ \sqrt{ A - \lvert x \rvert } }

CHOICES["inverse-sqrt-abs"]

@@ -272,4 +272,4 @@
- +
2 exercises/equation_of_a_circle_2.html
 @@ -27,7 +27,7 @@
-

The equation of a circle C is +

The equation of a circle C is expr(["+", "x^2", "y^2",

22 exercises/even_and_odd_functions.html
 @@ -88,24 +88,24 @@ - jQuery.grep( [1,2,3,4,5,6,7,8,9,10], - function( i ) { + jQuery.grep( [1,2,3,4,5,6,7,8,9,10], + function( i ) { return ( abs( valAt( WIDES, i ) ) > 1 || abs( valAt( WIDES, -i ) ) > 1 ) && abs( valAt( WIDES, i ) ) < 10 && abs( valAt( WIDES, -i ) ) < 10; - } + } ) - randFromArray( - jQuery.grep( PTS, - function( i ) { - return abs( abs( valAt( WIDES, i ) ) - abs( valAt( WIDES, -i ) ) ) > 0.5 - && abs( i ) < 10; - } - ) + randFromArray( + jQuery.grep( PTS, + function( i ) { + return abs( abs( valAt( WIDES, i ) ) - abs( valAt( WIDES, -i ) ) ) > 0.5 + && abs( i ) < 10; + } + ) ) @@ -197,7 +197,7 @@
- +
style({ stroke: "#7edb00" }, function() { path([ [ x, 0 ], [ x, valAt( WIDES, x ) ] ]);
10 exercises/exponents_1.html
 @@ -6,7 +6,7 @@
2 exercises/exponents_2.html
 @@ -73,7 +73,7 @@

= v

- +

= frac( SOL_N, SOL_D )

2 exercises/graphing_points.html
 @@ -100,4 +100,4 @@ - +
2 exercises/line_graph_intuition.html
 @@ -124,4 +124,4 @@ - +
2 exercises/logarithms_2.html
 @@ -48,4 +48,4 @@ - +
2 exercises/multiplication_0.5.html
 @@ -62,7 +62,7 @@
LABEL.remove(); - label( [ 0, B ], + label( [ 0, B ], "\\Huge{\\color{ #6495ED }{" + A + "} \\times \\color{ #28AE7B }{" + B + "} = " + ( A * B ) + "}", "right" );
2 exercises/multiplication_1.html
 @@ -62,7 +62,7 @@
LABEL.remove(); - label( [ 0, B ], + label( [ 0, B ], "\\Huge{\\color{ #6495ED }{" + A + "} \\times \\color{ #28AE7B }{" + B + "} = " + ( A * B ) + "}", "right" );
 @@ -30,7 +30,7 @@ var nOffset = randRange( 1, 10 ); var dOffset = randRangeExclude( 1, 10, [ C - A ] ); var choice = "<code>" - + "x = " + + "x = " + fractionReduce( ( D - B + nOffset ) * ( D - B + nOffset ), ( A - C + dOffset ) * ( A - C + dOffset ) ) + "</code>"; choices.unshift( choice );
2 exercises/simplifying_fractions.html
 @@ -24,7 +24,7 @@ hint += "= \\dfrac{" + factorDisplay + "\\cdot" + NUM / factorValue + "}{" + factorDisplay + "\\cdot" + DENOM / factorValue + "}"; }) hint += "= \\dfrac{" + NUM / GCD + "}{" + DENOM / GCD + "}"; - + return hint; })()
4 exercises/subtraction_1.html
 @@ -82,10 +82,10 @@ range: [ [0, 0], [0, 1] ] }); - label( [0, 0], + label( [0, 0], "\\Huge{\\color{ #6495ED }{ A } - \\color{ #FFA500 }{ B } = ?}", "right" ); - +
A - B
2 exercises/subtraction_2.html
 @@ -107,7 +107,7 @@ BORROW_LEVEL = Y_CARRY; borrow( index ); } else if ( A_DIGITS[ index ] === A_ORIG[ index ] ) { - HIGHLIGHTS[ index ].push( label( [ X_MAX - index, Y_FIRST ], + HIGHLIGHTS[ index ].push( label( [ X_MAX - index, Y_FIRST ], "\\Huge{\\color{#6495ED}{" + A_DIGITS[ index ] +"}}" ) ); } else { HIGHLIGHTS[ index ].push( label( [ X_MAX - index, Y_CARRY ],
2 exercises/subtraction_3.html
 @@ -107,7 +107,7 @@ BORROW_LEVEL = Y_CARRY; borrow( index ); } else if ( A_DIGITS[ index ] === A_ORIG[ index ] ) { - HIGHLIGHTS[ index ].push( label( [ X_MAX - index, Y_FIRST ], + HIGHLIGHTS[ index ].push( label( [ X_MAX - index, Y_FIRST ], "\\Huge{\\color{#6495ED}{" + A_DIGITS[ index ] +"}}" ) ); } else { HIGHLIGHTS[ index ].push( label( [ X_MAX - index, Y_CARRY ],
2 exercises/subtraction_4.html
 @@ -107,7 +107,7 @@ BORROW_LEVEL = Y_CARRY; borrow( index ); } else if ( A_DIGITS[ index ] === A_ORIG[ index ] ) { - HIGHLIGHTS[ index ].push( label( [ X_MAX - index, Y_FIRST ], + HIGHLIGHTS[ index ].push( label( [ X_MAX - index, Y_FIRST ], "\\Huge{\\color{#6495ED}{" + A_DIGITS[ index ] +"}}" ) ); } else { HIGHLIGHTS[ index ].push( label( [ X_MAX - index, Y_CARRY ],
6 exercises/units.html
 @@ -14,7 +14,7 @@ { str: "centi", math: "\\dfrac{1}{100}", inverse: "100" }, { str: "deci", math: "\\dfrac{1}{10}", inverse: "10" }, { str: "", math: "1" }, - { str: "deca", math: "10", inverse: "\\dfrac{1}{10}" }, + { str: "deca", math: "10", inverse: "\\dfrac{1}{10}" }, { str: "hecto", math: "100", inverse: "\\dfrac{1}{100}" }, { str: "kilo", math: "1000", inverse: "\\dfrac{1}{1000}" } ] shuffle( [ "meter", "liter", "gram", "watt" ] ).shift() @@ -52,7 +52,7 @@
- [ + [ { str: "mile", plural: "miles", multiplier: 63360 }, { str: "foot", plural: "feet", multiplier: 12 }, { str: "inch", plural: "inches", multiplier: 1 } ] @@ -123,4 +123,4 @@
- +