Sub topic 6
Checking Your Answer Against the Words
What this chapter assumes
You can already define a variable, write an equation from a stated relationship, and solve a one-variable linear equation. This chapter covers the step after solving: testing the result against the original problem. It also covers what to do when the test fails.
Why the equation is not the thing to check
Most students check by putting the answer back into the equation they wrote. That catches arithmetic slips, but it cannot catch a wrong equation. If the equation misstates the problem, a correct solution to it is still a wrong answer to the problem.
Take this problem: "Three less than twice a number is 11."
A common wrong translation is 3 - 2n = 11, which reverses the subtraction. Solving gives -2n = 8, so n = -4. Substituting into the equation passes:
3 - 2(-4) = 3 + 8 = 11
Now read the words with n = -4. Twice the number is -8. Three less than -8 is -8 - 3 = -11. That is not 11, so the answer fails.
The correct equation is 2n - 3 = 11, which gives 2n = 14 and n = 7. Check in words: twice 7 is 14, and three less than 14 is 11.
A checking procedure
Use the same steps each time:
- Reread the original problem, not your notes.
- Substitute the solution for the variable everywhere the unknown appears in the story, not only in the equation.
- Compute every quantity the problem mentions, including ones you never put in the equation, such as the other unknown or a discount amount.
- Compare each computed quantity with the fact the problem states.
- Test the answer against the context: units, sign, whole-number requirements, and size.
Worked example: tickets
A theater sells 10 tickets in total. Adult tickets cost $8 and child tickets cost $5. The total is $62. How many of each were sold?
Let a be the number of adult tickets. Then 10 - a is the number of child tickets. The equation is 8a + 5(10 - a) = 62, which simplifies to 3a + 50 = 62.
from fractions import Fraction
# 10 tickets total, adult $8, child $5, total $62. Let a = number of adults.
# 8a + 5(10 - a) = 62 -> 3a + 50 = 62
a = Fraction(62 - 50, 3)
print(a, 10 - a) # 4 6
print(8 * a + 5 * (10 - a) == 62) # TrueSo 4 adults and 6 children. Checking against the words means computing each fact the problem gives:
- Total tickets: 4 + 6 = 10. This matches.
- Adult revenue: 4 × $8 = $32.
- Child revenue: 6 × $5 = $30.
- Total revenue: $32 + $30 = $62. This matches.
Notice that the check computed the child count, 10 - a, as a separate quantity. If you had mislabeled a as the number of children, the ticket total would still be 10, but the revenue check would fail.
Checking context: more than matching numbers
An answer can satisfy every stated equation and still be impossible. Four context checks come up often:
| Check | Question to ask | Example of failure |
|---|---|---|
| Sign | Can this quantity be negative? | A length of -3 cm, or -2 children |
| Whole number | Does the problem count objects? | 4.5 adult tickets |
| Units | Is the number in the units the question asks for? | Answering in minutes when asked for hours |
| Size | Is the magnitude plausible? | A car travelling at 900 mph |
Here is a small checker for the ticket problem that tests the words and the context separately. It uses Fraction so there is no rounding noise.
from fractions import Fraction
def check_tickets(adults):
adults = Fraction(adults)
children = 10 - adults
problems = []
if adults.denominator != 1 or children.denominator != 1:
problems.append("ticket counts must be whole numbers")
if adults < 0 or children < 0:
problems.append("counts cannot be negative")
if 8 * adults + 5 * children != 62:
problems.append("cost is not $62")
return problems
for candidate in (4, Fraction(9, 2), 12):
print(candidate, check_tickets(candidate))
# 4 []
# 9/2 ['ticket counts must be whole numbers', 'cost is not $62']
# 12 ['counts cannot be negative', 'cost is not $62']The value 12 shows a typical pattern. A wrong equation can produce a count larger than the total, and the negative child count exposes it at once.
Worked example: percent
A jacket costs $48 after a 20% discount. What was the original price?
Let p be the original price in dollars. A 20% discount leaves 80% of the price, so 0.8p = 48.
from fractions import Fraction
# A jacket costs $48 after a 20% discount. Let p = original price.
# 0.8p = 48 -> p = 48 / 0.8
p = Fraction(48) / Fraction(4, 5)
print(p) # 60
print(p * Fraction(4, 5) == 48) # TrueThe code's last line only repeats the equation. To check against the words, apply the story: 20% of $60 is $12, and $60 - $12 = $48. This matches the sale price.
Now see why this matters. A common wrong approach adds 20% to the sale price: 48 + 0.2 × 48 = 57.60. Check that against the words. A 20% discount on $57.60 is $11.52, and $57.60 - $11.52 = $46.08. That is not $48, so the approach fails. The discount applies to the original price, not the sale price.
Worked example: rates
Car A leaves at 60 mph. Car B leaves 1 hour later at 80 mph. When does B catch up?
Let t be the hours Car A has travelled when B catches up. Car B has travelled t - 1 hours. The distances are equal at that moment, so 60t = 80(t - 1).
# Car A leaves at 60 mph. Car B leaves 1 hour later at 80 mph.
# Let t = hours Car A has travelled when B catches up.
# 60t = 80(t - 1) -> 20t = 80
t = 80 / 20
print(t) # 4.0
print(60 * t == 80 * (t - 1)) # TrueSo t = 4. Check each part of the story:
- Car A has driven 4 hours at 60 mph, so 240 miles.
- Car B has driven 4 - 1 = 3 hours at 80 mph, so 240 miles.
- B left after A, which the setup
t - 1already reflects. - The context holds:
t - 1 = 3is positive, so B really did start before the catch-up.
A useful context test is the sign of t - 1. If your answer had been t = 0.5, then B's travel time would be negative. That would mean B had not yet left, so the answer would be impossible.
When the check fails
A failed check tells you something, so use it:
- If the equation check fails, you made an arithmetic or algebra error while solving. Redo the steps.
- If the equation check passes but the words check fails, the equation is wrong. Reread each phrase and retranslate it, paying attention to order in phrases like "less than" and "more than".
- If the words check passes but the context check fails, the problem may have inconsistent data, or you answered a different question than the one asked. Reread the final sentence.
Short checklist
- Did you substitute into the words, not only the equation?
- Did you compute every quantity the problem mentions, including the other unknown?
- Is the answer allowed by sign, whole-number, and unit requirements?
- Is the size believable?
Exercise
"Five more than three times a number is 26." A student writes 3n + 5 = 26 and finds n = 7. Another writes 3(n + 5) = 26 and finds n = 11/3. Check both answers against the words and say which equation matches the problem.
Show answer
For n = 7, three times the number is 21, and five more than that is 26. This matches. For n = 11/3, three times the number is 11, and five more than that is 16, not 26, so the second answer fails (the equation 3(n + 5) = 26 actually describes "three times the sum of the number and five", so its solution fits that sentence but not this one). The correct equation is 3n + 5 = 26.
Exercise
A store sells notebooks at $3 each and pens at $2 each. Lena buys 12 items and pays $31. A student sets n = number of notebooks and solves 3n + 2(12 - n) = 31, getting n = 7. Check the answer against the words and against the context.
Show answer
Notebooks: 7 × $3 = $21. Pens: 12 - 7 = 5, and 5 × $2 = $10. Total items: 7 + 5 = 12, which matches. Total cost: $21 + $10 = $31, which matches. Context: 7 and 5 are whole, nonnegative counts, so they are valid. Lena bought 7 notebooks and 5 pens.