# Khan/khan-exercises

```Summary:
new problem type in graphing_inequalities

fixed inequality hints

added more hints for point-slope formula in inequalities

removed transformations exercises...

1 parent 08eebf3 commit 78e885f232cd3ce071afb60e3c3f65694d0a25de beneater committed Sep 25, 2012
Showing with 125 additions and 0 deletions.
1. +125 −0 exercises/graphs_of_inequalities.html
 @@ -0,0 +1,125 @@ + + + + + Graphs of inequalities + + + + +
+
+
+
+ reduce( randRangeNonZero( -5, 5 ), randRange( 1, 5 ) ) + randRangeNonZero( max( -10, -10 - SLOPE_FRAC[0] ), min( 10, 10 - SLOPE_FRAC[0] ) ) + SLOPE_FRAC[0] / SLOPE_FRAC[1] + SLOPE === 1 ? "" : ( SLOPE === -1 ? "-" : fraction( SLOPE_FRAC[0], SLOPE_FRAC[1], true, true ) ) + randRangeNonZero( -3, 3 ) + SLOPE_FRAC[0] * -MULT + SLOPE_FRAC[1] * MULT + SLOPE_FRAC[1] * YINT * MULT + randFromArray([ true, false ]) + randFromArray([ "<", ">", "≤", "≥" ]) + B < 0 ? { "<": ">", ">": "<", "≤": "≥", "≥": "≤" }[ COMP ] : COMP + COMP === "<" || COMP === "≤" + COMP === "≥" || COMP === "≤" + SLOPE_FRAC[1] + YINT + SLOPE_FRAC[0] + -SLOPE_FRAC[1] + YINT - SLOPE_FRAC[0] + (YINT < 0 && !LESS_THAN) || (YINT > 0 && LESS_THAN) +
+ +

What is the inequality represented by this graph?

+ +
+
+ graphInit({ + range: 11, + scale: 20, + axisArrows: "<->", + tickStep: 1, + labelStep: 1, + gridOpacity: 0.05, + axisOpacity: 0.2, + tickOpacity: 0.4, + labelOpacity: 0.5 + }); + + label( [ 0, -11 ], "y", "below" ); + label( [ 11, 0 ], "x", "right" ); + + var dash = INCLUSIVE ? "" : "- "; + style({ stroke: BLUE, strokeWidth: 2, strokeDasharray: dash }, function() { + line( [ -11, -11 * SLOPE + YINT ], [ 11, 11 * SLOPE + YINT ] ).toBack(); + }); + graph.shadeEdge = (LESS_THAN ? 11 < YINT : 11 > YINT) ? 11: -11; + + style({ fill: BLUE, stroke: null, opacity: KhanUtil.FILL_OPACITY }, function() { + graph.shading = path([ [ 11, graph.shadeEdge ], [ 11, 11 * SLOPE + YINT ], [ -11, -11 * SLOPE + YINT ], [ -11, graph.shadeEdge ] ]); + }); + +
+
+
+

yCOMP + SLOPE\space x + + YINT

+
+ +
+

+ To find the equation of a linear inequality you should first find the equation of the line that forms the boundary of the solution set. + This line is shown on the graph above. +

+

+ One way to find the equation of this line is to choose two points on the line and find the slope and y-intercept from there. + Two points on this line are (X1,Y1) and (X2,Y2). +

+
+

Substitute both points into the equation for the slope of a line.

+

m = \dfrac{Y2 - negParens(Y1)}{X2 - negParens(X1)} = fractionReduce( Y2 - Y1, X2 - X1 )

+
+

To find b, we can substitute in either of the two points into the equation with solved slope.

+
+

Using the first point (X1, Y1), substitute y = Y1 and x = X1:

+

Y1 = (fractionReduce( Y2 - Y1, X2 - X1 ))(X1) + b

+

b = Y1 - fractionReduce( X1 * ( Y2 - Y1 ), X2 - X1 ) = fractionReduce( Y1 * (X2 - X1) - X1 * ( Y2 - Y1 ), X2 - X1 )

+
+

+ The equation of the line is y = ( SLOPE === -1 ? "-" : ( SLOPE === 1 ? "" : fractionReduce( Y2 - Y1, X2 - X1 ))) x + fractionReduce( Y1 * (X2 - X1) - X1 * ( Y2 - Y1 ), X2 - X1 ) (the value of m is SLOPE). +

+

+ Now that we have the equation for the boundary line, we need to decide which inequality sign to use. +

+

+ If we pick a point on the line, let's say (X1,Y1), we can see that points LESS_THAN ? "below" : "above" that point are all shaded in. These are the points where x = X1 but y is + LESS_THAN ? "less than" : "greater than" Y1 . So we should use a LESS_THAN ? "< or ≤" : "> or ≥" sign. +

+
+ Another way to see this is to try plugging in a point. The easiest point to plug in is (0,0): +

y \; ? \; ( SLOPE === -1 ? "-" : ( SLOPE === 1 ? "" : fractionReduce( Y2 - Y1, X2 - X1 ))) x + fractionReduce( Y1 * (X2 - X1) - X1 * ( Y2 - Y1 ), X2 - X1 )

+

0 \; ? \; ( SLOPE === -1 ? "-1*" : ( SLOPE === 1 ? "" : fractionReduce( Y2 - Y1, X2 - X1 ) + "*")) 0 + fractionReduce( Y1 * (X2 - X1) - X1 * ( Y2 - Y1 ), X2 - X1 )

+ Since (0,0) is ORI_IN ? "" : "not" in the shaded area, this expression must be ORI_IN ? "true" : "false" So, the ? must be either LESS_THAN ? "< or ≤" : "> or ≥" . +
+
+

+ The line of the graph is INCLUSIVE ? "solid" : "dashed", so the points on the boundary are INCLUSIVE ? "" : "not" + in the set of solutions for this inequality. +

+

+ So, we choose the COMP sign, and the final inequality is + y COMP PRETTY_SLOPE x + YINT. +

+
+
+
+ +
+ +