randRange( 2, 9 ) * ( rand( 3 ) > 0 ? 1 : -1 ) fraction( 1, Y_COEF ) randRangeExclude( -9, 9, [ -1, 0, 1 ] ) randRangeNonZero( -20, 20 ) -X_COEF / Y_COEF fractionReduce( -X_COEF, Y_COEF ) RIGHT_INT / Y_COEF fractionReduce( RIGHT_INT, Y_COEF ) randFromArray([ "<", ">", "≤", "≥" ]) getComp( Y_COEF, COMP ) COMP_SOLUTION == "<" || COMP_SOLUTION == "≤" COMP_SOLUTION == "≥" || COMP_SOLUTION == "≤" M * -10 + B M * 10 + B
[ randRangeExclude( -9, 9, [ -3, -2, -1, 0 ] ), randRangeExclude( -9, 9, [ -1, -2 ] ) ] [ randRangeExclude( -9, 9, [ -3, -2, -1, 0 ] ), randRangeExclude( -9, 9, [ -1, -2 ] ) ] (((COMP == "<") && (Y_COEF * POINT_1[1] + X_COEF * POINT_1[0] < RIGHT_INT)) || ((COMP == "≤") && (Y_COEF * POINT_1[1] + X_COEF * POINT_1[0] <= RIGHT_INT)) || ((COMP == ">") && (Y_COEF * POINT_1[1] + X_COEF * POINT_1[0] > RIGHT_INT)) || ((COMP == "≥") && (Y_COEF * POINT_1[1] + X_COEF * POINT_1[0] >= RIGHT_INT))) (((COMP == "<") && (Y_COEF * POINT_2[1] + X_COEF * POINT_2[0] < RIGHT_INT)) || ((COMP == "≤") && (Y_COEF * POINT_2[1] + X_COEF * POINT_2[0] <= RIGHT_INT)) || ((COMP == ">") && (Y_COEF * POINT_2[1] + X_COEF * POINT_2[0] > RIGHT_INT)) || ((COMP == "≥") && (Y_COEF * POINT_2[1] + X_COEF * POINT_2[0] >= RIGHT_INT)))

Which of the following ordered pairs printPoint( POINT_1 ) and printPoint( POINT_2 ) are solutions to the inequality Y_COEFy + X_COEFx COMP + RIGHT_INT?

printPoint( POINT_1 )
and
printPoint( POINT_2 )
None of the above.
  1. printPoint( POINT_1 )
  2. printPoint( POINT_2 )
  3. printPoint( POINT_1 ) and printPoint( POINT_2 )
  4. None of the above.

To graph the inequality, we need to first put it in slope-intercept form (yCOMPmx + b).

Add -X_COEFx to both sides of the inequality.

Y_COEFy + X_COEFx +-X_COEFxCOMP + RIGHT_INTy +-X_COEFx

Y_COEFyCOMP + (-X_COEF)x + RIGHT_INT

When multiplying or dividing both sides of an inequality by a negative number you have to flip the inequality. Therefore COMP becomes COMP_SOLUTION.

Multiply both sides of the inequality by ONE_OVER_Y_COEF.

(Y_COEFy) \cdot (ONE_OVER_Y_COEF)COMP_SOLUTION(-X_COEFx + RIGHT_INT) \cdot (ONE_OVER_Y_COEF)

y COMP_SOLUTION + M_FRACx + B_FRAC

Graph the line.

graphInit({ range: 10, scale: 20, tickStep: 1, labelStep: 1, labelFormat: function( s ) { return "\\small{" + s + "}"; }, axisArrows: "<->" }); if ( !INCLUSIVE ) { style ({ "stroke-dasharray": "-" }); } line( [ -10, NEG_10_INTERCEPT ], [ 10, POS_10_INTERCEPT ] , { stroke: "#28AE7B", });

Since our inequality has a LESS_THAN ? "less-than" : "greater-than"INCLUSIVE ? " or equal to" : "" sign, that means that any point LESS_THAN ? "below" : "above" the line is a solution to the inequality.

Note that since the sign is LESS_THAN ? "less-than" : "greater-than" or equal to, any point on the line is also a solution.

Note that since the sign is LESS_THAN ? "less-than" : "greater-than" (and not equal to), any point on the line is not part of the solution.

// Highlight solution space var x_start = -10; var x_end = 10; if ( ( NEG_10_INTERCEPT < POS_10_INTERCEPT && !LESS_THAN ) || ( POS_10_INTERCEPT < NEG_10_INTERCEPT && LESS_THAN ) ) { var temp = NEG_10_INTERCEPT; NEG_10_INTERCEPT = POS_10_INTERCEPT; POS_10_INTERCEPT = temp; temp = x_start; x_start = x_end; x_end = temp; } style( { "fill": "#FF0000", "fill-opacity": 0.1, "stroke": null }); path([ [ x_end, POS_10_INTERCEPT ], [ x_end, NEG_10_INTERCEPT ], [ x_start, NEG_10_INTERCEPT ] ]); var vertical_end = 10; if ( NEG_10_INTERCEPT < POS_10_INTERCEPT ) { vertical_end = -10; } path([ [ -10, NEG_10_INTERCEPT ], [ -10, vertical_end ], [ 10, vertical_end ], [ 10, NEG_10_INTERCEPT ] ]);

After plotting the points, we can see that printPoint( POINT_1 ) is the only solution printPoint( POINT_2 ) is the only solution printPoint( POINT_1 ) andprintPoint( POINT_2 ) are both solutions there are no solutions to the inequality.

style({ fill: "#000", "fill-opacity": 1, stroke: "none" }); circle( POINT_1, 3/20 ); circle( POINT_2, 3/20 ); label( POINT_1, printPoint( POINT_1 ), "above right" ); label( POINT_2, printPoint( POINT_2 ), "above right" );