reduce( randRange( -20, 20 ), rand( 3 ) > 0 ? 1 : randRange( 2, 20 ) ) fractionReduce( NUM, DEN ) fractionReduce( DEN, NUM ) randRangeNonZero( -20, 20 ) randFromArray([ "<", ">", "≤", "≥" ]) (function() { if ( NUM > 0 ) { return COMP; } switch ( COMP ) { case "<": return ">"; case ">": return "<"; case "≤": return "≥"; case "≥": return "≤"; } })() fraction( RIGHT_INT * DEN, NUM ) fractionReduce( RIGHT_INT * DEN, NUM ) RIGHT_INT * DEN / NUM

Solve for x:

COEFx COMP RIGHT_INT

x COMP_SOLUTION SOLUTION_REAL an integer, like 6 a proper fraction, like 1/2 or 6/10 an improper fraction, like 10/7 or 14/8 a mixed number, like 1\ 3/4 an exact decimal, like 0.75

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 by ONE_OVER_COEF.

(ONE_OVER_COEF) \cdot (COEFx) COMP_SOLUTION (ONE_OVER_COEF) \cdot (RIGHT_INT)

Simplify.

x COMP_SOLUTION SOLUTION_NOT_REDUCED

Reduce.

x COMP_SOLUTION SOLUTION

We can see that all values of x COMP_SOLUTION SOLUTION satisfy the original inequality.

init({ range: [ [-1, 11], [-1, 1] ], }); var start = SOLUTION_REAL - 4.5; var end = SOLUTION_REAL + 4.5; numberLine( start, end ); var offset; var fill; var startOffset = 0.12; switch ( COMP_SOLUTION ) { case ">": fill = null; offset = 5; break; case "≥": fill = "#6495ED"; offset = 5; break; case "<": fill = null; offset = -5; startOffset *= -1; break; case "≤": fill = "#6495ED"; offset = -5; startOffset *= -1; break; } var x = SOLUTION_REAL - start; style({ stroke: "#FFA500", fill: "#FFA500", strokeWidth: 3.5, arrows: "->" }); path([ [ x + startOffset, 0 ], [ x + offset, 0 ]]); style({ stroke: "#6495ED", strokeWidth: 2.0, fill: fill }); circle([ x, 0 ], 0.15 );