Graph the following inequality:
expr([ "+", [ "*", A, "x" ], [ "*", B, "y" ] ]) STD_FORM_COMP C
y COMP PRETTY_SLOPE + YINT
Is (POINT[0], POINT[1])
a solution of the inequality?
Let's first convert the inequality into slope-intercept form,
which allows us to determine the y
-intercept and the slope of the line in order to graph it.
\qquad\begin{eqnarray}
expr(["+", ["*", A, "x"], ["*", B, "y"]]) &STD_FORM_COMP& C \\
coefficient(B)y &STD_FORM_COMP& expr([ "+", [ "*", -A, "x" ], C ]) \\
y &COMP& PRETTY_SLOPE + YINT
\end{eqnarray}
Since the inequality is in slope-intercept form, we can use the
y
-intercept and the slope of the line in order to graph it.
The inequality sign then tells us which side of the line is to be shaded and whether the line is solid or dashed.
Finally, we can see whether or not our given point lies in the shaded area to check if it's a solution of the inequality.
Based on the inequality, we can see that the y
-intercept
of the boundary line is the point (0, YINT)
.
We can also see that the slope of the line is fractionReduce(SLOPE_FRAC[0], SLOPE_FRAC[1])
.
This means that for every \blue{SLOPE_FRAC[1]}
plural_form(genericUnit[1], SLOPE_FRAC[1])
we increase along the x
-axis, we move \pink{abs(SLOPE_FRAC[0])}
plural_form(genericUnit[1], SLOPE_FRAC[0]) down the y
-axis to find another point on the boundary line:
This means that for every \blue{SLOPE_FRAC[1]}
plural_form(genericUnit[1], SLOPE_FRAC[1])
we increase along the x
-axis, we move \pink{abs(SLOPE_FRAC[0])}
plural_form(genericUnit[1], SLOPE_FRAC[0]) up the y
-axis to find another point on the boundary line:
(0 + \blue{SLOPE_FRAC[1]}, YINT + \pink{SLOPE_FRAC[0]}) =
(SLOPE_FRAC[1], YINT + SLOPE_FRAC[0])
We can now connect these points to graph the line.
The inequality is y COMP PRETTY_SLOPE + YINT
.
(x, y)
in the solution set,
the y
-value is less than or equal PRETTY_SLOPE + YINT
.
Therefore, the solution set lies below the line and the line should be solid.
(x, y)
in the solution set,
the y
-value is strictly less than PRETTY_SLOPE + YINT
.
Therefore, the solution set lies below the line and the line should be dashed.
(x, y)
in the solution set,
the y
-value is greater than or equal PRETTY_SLOPE + YINT
.
Therefore, the solution set lies above the line and the line should be solid.
(x, y)
in the solution set,
the y
-value is strictly greater than PRETTY_SLOPE + YINT
.
Therefore, the solution set lies above the line and the line should be dashed.
We can see that (POINT[0], POINT[1])
lies within the shaded area,
which means that it is a solution of the inequality.
We can see that (POINT[0], POINT[1])
lies outline of the shaded area,
which means that it is not a solution of the inequality.