Sub topic 10
Checking your solution set
This chapter assumes you can solve linear inequalities, including reversing the symbol when you multiply or divide by a negative number. It also assumes you can write a solution set in interval notation and can graph it on a number line. Here you learn a short routine that tells you whether the set you wrote is right.
Why checking is different for inequalities
With an equation such as 3x + 1 = 10, one value of x makes it true, and you substitute that value to confirm it. An inequality usually has infinitely many solutions. You cannot test them all, and a single passing value does not prove the whole set is correct.
The routine below works because of one fact about linear inequalities. The truth of the inequality can only change at a boundary value, the point where the two sides are equal. Between two boundaries, every number gives the same true or false result. So you do not need many tests. You need one test at each boundary and one test in each region the boundaries create.
What the boundary test tells you
The boundary is the number where you would have an equation instead of an inequality. Substitute it into the original inequality. The result depends on the symbol.
| Symbol in the original inequality | Does the boundary satisfy it? | Endpoint in your answer |
|---|---|---|
| < or > | No, the two sides are equal and a strict inequality fails | Open: parenthesis or open circle |
| ≤ or ≥ | Yes, equality is allowed | Closed: bracket or closed circle |
The boundary test checks the endpoint type, which is the most common place for notation errors. It does not check the direction of the solution set.
What the region tests tell you
Pick one convenient number from each region and substitute it into the original inequality. A region is any stretch of the number line between boundaries, or beyond the outermost one. Choose easy numbers such as 0 or a whole number. A true result means the whole region belongs in your solution set. A false result means none of it does.
Your answer must agree with every test. If the boundary and region results do not match the graph you drew, the work contains an error.
A worked check
Solve and check 2(x − 4) ≤ 5x + 1.
2(x - 4) ≤ 5x + 1
2x - 8 ≤ 5x + 1 (distribute)
-3x - 8 ≤ 1 (subtract 5x from both sides)
-3x ≤ 9 (add 8 to both sides)
x ≥ -3 (divide by -3 and reverse the inequality)
Interval notation: [-3, ∞)The boundary is −3. There are two regions: numbers less than −3, and numbers greater than −3.
- Boundary, x = −3: the left side is 2(−3 − 4) = −14. The right side is 5(−3) + 1 = −14. Since −14 ≤ −14 is true, the endpoint is included, which matches the bracket in [−3, ∞).
- Region to the right, x = 0: the left side is −8 and the right side is 1. Since −8 ≤ 1 is true, this region belongs to the solution set.
- Region to the left, x = −4: the left side is 2(−8) = −16 and the right side is 5(−4) + 1 = −19. Since −16 ≤ −19 is false, this region does not belong to the solution set.
All three results agree with [−3, ∞).
Catching the most common error
Suppose you forgot to reverse the inequality in the last step and wrote x ≤ −3 instead of x ≥ −3. The boundary test still passes, because −3 is included either way. The region tests expose the error. Your wrong answer says x = −4 is a solution, but step 3 above shows it is not. It also says x = 0 is not a solution, but step 2 shows it is.
This is why the boundary test alone is not enough. The boundary test verifies the endpoint. The region tests verify the direction.
Checking compound inequalities
A compound inequality can have several boundaries, so there are more regions to test. Take the chain from earlier in the tutorial.
-1 ≤ 2x + 3 < 9
-4 ≤ 2x < 6
-2 ≤ x < 3
Interval notation: [-2, 3)The boundaries are −2 and 3. They split the number line into three regions: left of −2, between −2 and 3, and right of 3. Test the original chain at five numbers.
| Test value | 2x + 3 | Is −1 ≤ 2x + 3 < 9 true? | Expected from [−2, 3) |
|---|---|---|---|
| x = −3 (left region) | −3 | No | Outside |
| x = −2 (boundary) | −1 | Yes | Included, closed end |
| x = 0 (middle region) | 3 | Yes | Inside |
| x = 3 (boundary) | 9 | No | Excluded, open end |
| x = 4 (right region) | 11 | No | Outside |
Every row matches. For an "and" compound inequality, the solution set is the middle region plus whichever boundaries pass. For an "or" compound inequality or an absolute value inequality, you may find two solution regions, and the check works the same way.
Here is the check for an absolute value inequality, |x − 1| ≥ 3, with answer (−∞, −2] ∪ [4, ∞). The boundaries are −2 and 4, so the regions are x < −2, −2 < x < 4, and x > 4.
- x = −2: |−3| = 3 and 3 ≥ 3 is true, which matches the bracket.
- x = 4: |3| = 3 and 3 ≥ 3 is true, which matches the bracket.
- x = −3: |−4| = 4 and 4 ≥ 3 is true, so the left region is included.
- x = 1: |0| = 0 and 0 ≥ 3 is false, so the middle region is excluded.
- x = 5: |4| = 4 and 4 ≥ 3 is true, so the right region is included.
Checking the special cases
Two special cases have no boundary value at all. These are the cases where the variable cancels.
- All real numbers: 2x + 1 > 2x reduces to 1 > 0, which is always true. Test a negative number, zero, and a positive number. All three pass, which supports the answer (−∞, ∞).
- No solution: 3x + 2 < 3x − 1 reduces to 2 < −1, which is always false. The same three tests all fail, which supports the empty set.
Because there is no boundary, the tests do not come from a boundary value. You test several numbers of different signs instead, and you also read the reduced statement. A true statement such as 1 > 0 means every number works, and a false statement such as 2 < −1 means none does.
The checking routine as a flow
Automating the check
You can run the same routine in code. The program below uses exact fractions so that a boundary value such as 1/3 is not damaged by rounding. It takes a function that says whether a number satisfies the inequality, plus the list of boundaries. It tests each boundary, then one number to the left of all boundaries, one between each pair, and one to the right.
from fractions import Fraction
def sample_points(boundaries):
b = sorted(set(boundaries))
regions = [b[0] - 1]
regions += [(lo + hi) / 2 for lo, hi in zip(b, b[1:])]
regions.append(b[-1] + 1)
return b, regions
def report(name, holds, boundaries):
b, regions = sample_points([Fraction(v) for v in boundaries])
print(name)
for x in b:
print(" boundary", x, "->", holds(x))
for x in regions:
print(" region ", x, "->", holds(x))
report("-3x + 5 > 11", lambda x: -3 * x + 5 > 11, [-2])
report("|x - 1| >= 3", lambda x: abs(x - 1) >= 3, [-2, 4])Running it prints:
-3x + 5 > 11
boundary -2 -> False
region -3 -> True
region -1 -> False
|x - 1| >= 3
boundary -2 -> True
boundary 4 -> True
region -3 -> True
region 1 -> False
region 5 -> TrueRead the first block against the answer (−∞, −2). The boundary fails, so the parenthesis is correct. The region to the left passes and the region to the right fails, so the direction is correct. The second block matches the union (−∞, −2] ∪ [4, ∞).
The program only evaluates what you give it. You still must supply the boundaries, which come from solving the corresponding equation, and you must decide whether the printed pattern matches your answer.
Limits of the method
- The method relies on the inequality being linear, or a combination of linear pieces such as an absolute value. For other expressions, such as those with squared terms, the truth can change at more places than you expect, and one test per region may not be enough.
- Only the original inequality is trustworthy. Arithmetic slips in your own steps will not show up if you test against those steps.
- A passing check on a few numbers confirms the pattern you tested. With the one-test-per-region rule it is enough for the linear cases in this tutorial.
Exercise
A student solves -4x + 3 ≥ 15 and writes the answer x ≥ -3, in interval notation [-3, ∞). Use a boundary test and a region test to decide whether the answer is correct, and give the correct answer if it is not.
Show answer
Boundary: the boundary is where -4x + 3 = 15, so x = -3. Testing x = -3: -4(-3) + 3 = 15, and 15 ≥ 15 is true, so the endpoint is closed. Region test: try x = 0, which lies in the claimed solution set. -4(0) + 3 = 3, and 3 ≥ 15 is false. The claimed direction is wrong, because the student did not reverse the inequality when dividing by -4. The correct work is -4x ≥ 12, so x ≤ -3, with interval notation (-∞, -3]. Confirm with x = -4: -4(-4) + 3 = 19, and 19 ≥ 15 is true.
Exercise
The answer to 1 < 3x - 2 ≤ 7 is claimed to be (1, 3]. List the boundaries and the regions, test each against the original chain, and say whether the answer is correct.
Show answer
Solving gives 3 < 3x ≤ 9, so 1 < x ≤ 3. The boundaries are 1 and 3. Testing x = 1: 3(1) - 2 = 1, and 1 < 1 is false, so the open end at 1 is correct. Testing x = 3: 3(3) - 2 = 7, and 7 ≤ 7 is true, so the closed end at 3 is correct. Testing x = 0 (left region): -2, which fails the chain, so the left region is excluded. Testing x = 2 (middle region): 4, which satisfies 1 < 4 ≤ 7, so the middle is included. Testing x = 4 (right region): 10, which fails 10 ≤ 7, so the right region is excluded. Every result matches (1, 3], so the answer is correct.
Exercise
Reduce 5(x + 2) - 5x < 8 and decide whether the solution set is all real numbers, the empty set, or something else. Describe how you would check it.
Show answer
Distribute: 5x + 10 - 5x < 8, which simplifies to 10 < 8. This statement is false for every x, so there is no solution and the solution set is empty. To check, substitute several numbers of different signs, such as -4, 0, and 6. Each gives 10 < 8 after simplifying, which is false each time, which matches the empty set.