Sub topic 12
From Word Problems to Equations
What this chapter assumes
You should already be able to solve equations such as 3(x - 2) + 4 = 2x + 5 by distributing, combining like terms, and moving variable terms to one side. You should also be able to check a solution by substitution. This chapter covers the step before solving: turning a situation described in words into an equation. After that, you solve the equation and interpret the result.
Most errors in word problems come from translating, not from the algebra. Before the final answer, check that the number you found answers the question and fits the story.
The modeling workflow
Use the same sequence for every problem. Each step produces something you can inspect, so a mistake is easy to locate.
- Define the unknown. Write a sentence such as "Let w be the width in meters." Include the unit.
- Express other quantities. If the length is described relative to the width, write it using w.
- Find the equality. Look for two expressions that the problem says are equal: equal costs, a total, a known perimeter.
- Solve. Use the methods from earlier chapters.
- Check against the story. Substitute into the words, not only into your equation. If your equation is wrong, substituting into it will still "work".
Translating phrases
Certain phrases map to operations. The table lists the common ones. The last two rows are where most mistakes happen.
| Phrase | Expression |
|---|---|
| a number increased by 7 | n + 7 |
| twice a number | 2n |
| 3 more than a number | n + 3 |
| 5 less than a number | n - 5 |
| 5 less than twice a number | 2n - 5 |
| a number less 5 | n - 5 |
| the sum of a number and 4, doubled | 2(n + 4) |
| x is 5 less than y | x = y - 5 |
The word "is" usually marks the equals sign. "The total is 78" gives ... = 78. Words such as "each", "per", and "of" usually signal multiplication.
Worked example 1: consecutive integers
Problem. The sum of three consecutive integers is 78. Find them.
Let n be the smallest integer. The next two are n + 1 and n + 2. The sum equals 78:
n + (n + 1) + (n + 2) = 78
3n + 3 = 78 combine like terms
3n = 75 subtract 3 from both sides
n = 25 divide both sides by 3
Check: 25 + 26 + 27 = 78The integers are 25, 26, and 27. The check uses the sentence in the problem (three consecutive integers with sum 78), not only the equation.
Worked example 2: geometry and a perimeter formula
Problem. A rectangle's length is 3 meters more than twice its width. Its perimeter is 54 meters. Find its dimensions.
Let w be the width in meters. Then the length is 2w + 3. The perimeter formula is P = 2(length + width), so:
2(w + (2w + 3)) = 54
2(3w + 3) = 54 combine like terms inside the parentheses
6w + 6 = 54 distribute
6w = 48 subtract 6
w = 8 divide by 6The width is 8 m and the length is 2(8) + 3 = 19 m. Check the story: 19 is 3 more than twice 8, and 2(19 + 8) = 54.
Worked example 3: two quantities that become equal
Problem. Plan A charges a $20 monthly fee plus $0.05 per minute. Plan B charges a $5 monthly fee plus $0.10 per minute. For how many minutes in a month do the two plans cost the same?
Let x be the number of minutes. The cost of Plan A is 20 + 0.05x. The cost of Plan B is 5 + 0.10x. "Cost the same" gives the equality:
0.05x + 20 = 0.10x + 5This has the variable on both sides. Subtract 0.10x and 20 from both sides:
-0.05x = -15
x = 300At 300 minutes, Plan A costs 20 + 15 = 35 dollars, and Plan B costs 5 + 30 = 35 dollars. Below 300 minutes Plan B is cheaper, because its fee is lower. Above 300 minutes Plan A is cheaper, because its per-minute rate is lower. Comparing the two plans this way is the usual use of an equation with variables on both sides.
You can confirm the arithmetic with exact fractions, so decimals do not introduce rounding error. This reuses the form a1*x + b1 = a2*x + b2 from earlier in the tutorial.
from fractions import Fraction
def solve_both_sides(a1, b1, a2, b2):
"""Solve a1*x + b1 = a2*x + b2 by moving x terms to the left."""
a = Fraction(a1) - Fraction(a2)
c = Fraction(b2) - Fraction(b1)
if a == 0:
return "infinitely many solutions" if c == 0 else "no solution"
return c / a
x = solve_both_sides("0.05", 20, "0.10", 5)
print(x) # 300
plan_a = Fraction("0.05") * x + 20
plan_b = Fraction("0.10") * x + 5
print(plan_a, plan_b, plan_a == plan_b) # 35 35 TruePassing the decimals as strings makes Fraction treat them as exactly 5/100 and 10/100. Passing the float 0.05 would carry a binary rounding error into the result.
Choosing the unknown
Often several choices of unknown work. The choice affects how many steps you need.
- Pick the quantity everything else is described from. In the rectangle problem, the length was described in terms of the width, so the width is the natural choice. Letting l be the length would give w = (l - 3)/2 and introduce a fraction.
- Split a total with one variable. If two numbers sum to 50 and one is x, the other is 50 - x. You do not need a second variable.
- Use a descriptive letter. Using t for time and d for dollars makes the equation easier to read and check.
For example, a 50-dollar bill is split between two people, and Ana gets 8 dollars more than Ben. Let b be Ben's share. Then Ana's share is b + 8, and:
b + (b + 8) = 50
2b + 8 = 50
2b = 42
b = 21Ben gets 21 dollars and Ana gets 29 dollars. The check is 21 + 29 = 50 and 29 - 21 = 8.
Checking that the answer makes sense
A solution of the equation is not automatically an answer to the problem. The story can place limits that the equation does not know about.
- Counts must be whole and non-negative. If 3p = 10 where p is a number of people, the equation has the solution 10/3, but the problem has no valid answer. Recheck the setup.
- Lengths, times, and prices are usually positive. A negative width means the model is wrong or the problem is inconsistent.
- Units must match. If speed is in kilometers per hour and time is in minutes, convert one before writing the equation. A rate of 60 km/h for 30 minutes is 60 × 0.5, not 60 × 30.
- Answer the question asked. In the rectangle problem, the solved variable is the width, but the question asks for both dimensions. Reread the question before writing the final sentence.
The special cases from the earlier chapter also appear in word problems. If setting two costs equal gives 0 = 15, the plans never cost the same. If it gives 0 = 0, they always cost the same. Both are valid findings and not signs that you made an error, though you should recheck the setup before trusting either.
Common errors
| Error | Example | Fix |
|---|---|---|
| Reversing "less than" | "7 less than n" written as 7 - n | Write n - 7 and test with a number |
| Forgetting parentheses | Doubling the sum of w and 2w + 3 written as 2w + 2w + 3 | Write 2(w + 2w + 3) |
| Mixing units | Minutes in one term, hours in another | Convert before writing the equation |
| Checking only the equation | Substituting into your own equation | Check against the original sentences |
| Stopping at the variable | Reporting w when the length is asked | Reread the question |
Exercise
Write an equation and solve it. A taxi charges a $4 base fare plus $2.50 per kilometer. A ride costs $19. How many kilometers was the ride?
Show answer
Let k be the number of kilometers. The cost equation is 4 + 2.50k = 19. Subtract 4: 2.50k = 15. Divide by 2.50: k = 6. Check: 4 + 2.50(6) = 4 + 15 = 19. The ride was 6 km.
Exercise
Tomas is 4 years older than twice his sister's age. Their ages sum to 31. How old is each?
Show answer
Let s be the sister's age. Tomas's age is 2s + 4. Then s + (2s + 4) = 31, so 3s + 4 = 31, 3s = 27, s = 9. Tomas is 2(9) + 4 = 22. Check: 9 + 22 = 31, and 22 is 4 more than twice 9.
Exercise
Gym X charges a $30 joining fee plus $20 per month. Gym Y charges no joining fee and $26 per month. After how many months have the two gyms cost the same in total? Which gym is cheaper before and after that point?
Show answer
Let m be the number of months. Then 30 + 20m = 26m. Subtract 20m: 30 = 6m, so m = 5. Check: 30 + 100 = 130 and 26(5) = 130. Before 5 months Gym Y is cheaper, because Gym X's joining fee has not yet been recovered. After 5 months Gym X is cheaper, because its monthly rate is lower.
Exercise
A student solves "5 less than three times a number is 22" by writing 5 - 3n = 22. Find the mistake, write the correct equation, and solve it.
Show answer
"5 less than three times a number" means 3n - 5, not 5 - 3n. The correct equation is 3n - 5 = 22. Add 5: 3n = 27. Divide by 3: n = 9. Check: 3(9) - 5 = 22.