TExcelTAD
Home › Algebra › Simple Word Problems

Simple Word Problems

A word problem is solved in four moves: name the unknown, write down what the text says about it as an equation, solve the equation, and check the answer against the original story. This lesson works through the common patterns (consecutive numbers, ages, money, distance–rate–time and mixtures) and shows how to check them in Python.

The four-step method

Step Question to ask Example: "A shop sells 3 times as many mugs as plates; 84 items in total."
1. Name What exactly is unknown? Give it a letter. p=number of platesp = \text{number of plates}
2. Express Write every other quantity in terms of that letter. mugs=3p\text{mugs} = 3p
3. Equate Which sentence gives an equation? p+3p=84p + 3p = 84
4. Solve and check Does the answer fit the story? p=21p = 21, mugs=63\text{mugs} = 63, 21+63=8421 + 63 = 84 ✓

Tip: Write a "let" line (let p=number of plates\text{let } p = \text{number of plates}) every time. Half the battle in word problems is being clear about what the letter means, including its unit.

Consecutive numbers

"Three consecutive whole numbers add up to 72." Consecutive numbers differ by 1, so if the first is nn, the others are n+1n + 1 and n+2n + 2.

n+(n+1)+(n+2)=723n+3=723n=69n=23→ 23,24,25\begin{aligned} n + (n + 1) + (n + 2) &= 72 \\ 3n + 3 &= 72 \\ 3n &= 69 \\ n &= 23 && \to\ 23, 24, 25 \end{aligned}

For consecutive even or odd numbers the step is 2: nn, n+2n + 2, n+4n + 4.

Ages

"Lena is 4 times as old as her brother. In 6 years she will be twice as old as him. How old are they now?"

let b=brother’s age now; Lena=4bin 6 years: Lena 4b+6, brother b+64b+6=2(b+6)4b+6=2b+122b=6b=3, Lena=12check: in 6 years 18 and 9, and 18=2⋅9 ✓\begin{aligned} &\text{let } b = \text{brother's age now};\ \text{Lena} = 4b \\ &\text{in 6 years: Lena } 4b + 6,\ \text{brother } b + 6 \\ 4b + 6 &= 2(b + 6) \\ 4b + 6 &= 2b + 12 \\ 2b &= 6 \\ b &= 3,\ \text{Lena} = 12 && \text{check: in 6 years 18 and 9, and } 18 = 2 \cdot 9\ \checkmark \end{aligned}

Money and rates

"A streaming plan costs €8 per month; a rival costs €5 per month plus a €27 setup fee. After how many months do they cost the same?"

8m=5m+273m=27m=9\begin{aligned} 8m &= 5m + 27 \\ 3m &= 27 \\ m &= 9 \end{aligned}

After 9 months both have cost €72; after that, the rival is cheaper. A "break-even" question is always an equation that sets two costs equal.

Distance, rate and time

The rule is distance=rate×time\text{distance} = \text{rate} \times \text{time} (d=rtd = rt). "Two cyclists start 54 km apart and ride toward each other at 20 km/h and 16 km/h. When do they meet?" Together they close the gap at 20+16=36 km/h20 + 16 = 36\ \text{km/h}:

20t+16t=5436t=54t=1.5 hours\begin{aligned} 20t + 16t &= 54 \\ 36t &= 54 \\ t &= 1.5\ \text{hours} \end{aligned}

SymPy can check all four problems in one go:

python · try it yourself
from sympy import symbols, Eq, solve

n, b, m, t = symbols("n b m t")
print("consecutive:", solve(Eq(n + (n + 1) + (n + 2), 72), n))
print("ages:       ", solve(Eq(4*b + 6, 2*(b + 6)), b))
print("break-even: ", solve(Eq(8*m, 5*m + 27), m))
print("cyclists:   ", solve(Eq(20*t + 16*t, 54), t))
consecutive: [23]
ages:        [3]
break-even:  [9]
cyclists:    [3/2]

Mixtures and averages

"A student scored 72 and 85 on two tests. What score on the third gives an average of 80?"

72+85+s3=80157+s=240s=83\begin{aligned} \frac{72 + 85 + s}{3} &= 80 \\ 157 + s &= 240 \\ s &= 83 \end{aligned}

Checking by simulation

A good habit for programmers: check an answer by simulating the story rather than re-solving the equation. Here the break-even problem is simulated month by month:

python · try it yourself
plan_a, plan_b = 0, 27
for month in range(1, 13):
    plan_a += 8
    plan_b += 5
    marker = "  <- equal" if plan_a == plan_b else ""
    if month in (8, 9, 10):
        print(f"month {month}: A = {plan_a}, B = {plan_b}{marker}")
month 8: A = 64, B = 67
month 9: A = 72, B = 72  <- equal
month 10: A = 80, B = 77

In software

Word problems are what product requirements look like. "Free tier allows 1000 requests per day; paid tier is €0.002 per request above that; at what usage does a €10 flat plan win?" is the break-even pattern. "Two players move toward each other at known speeds; when do they collide?" is distance–rate–time, which the collision timing lesson extends to quadratic motion.

Exercises

Exercise 1: Consecutive odd numbers

Three consecutive odd numbers add up to 99. Find them.

Answer

31, 33, 35

Solution
n+(n+2)+(n+4)=993n+6=993n=93n=31check: 31+33+35=99 ✓\begin{aligned} n + (n + 2) + (n + 4) &= 99 \\ 3n + 6 &= 99 \\ 3n &= 93 \\ n &= 31 \\[1ex] &\text{check: } 31 + 33 + 35 = 99\ \checkmark \end{aligned}

Exercise 2: Coins

A jar has only 20-cent and 50-cent coins, 30 coins in all, worth €10.20. How many of each?

Answer

14 coins of 50 cents and 16 coins of 20 cents.

Solution

Work in cents. Let f=number of 50-cent coinsf = \text{number of 50-cent coins}, so 30−f30 - f are 20-cent coins.

50f+20(30−f)=102050f+600−20f=102030f=420f=14\begin{aligned} 50f + 20(30 - f) &= 1020 \\ 50f + 600 - 20f &= 1020 \\ 30f &= 420 \\ f &= 14 \end{aligned}

So there are 14 coins of 50 cents and 30−14=1630 - 14 = 16 coins of 20 cents. Check: 14⋅50+16⋅20=700+320=102014 \cdot 50 + 16 \cdot 20 = 700 + 320 = 1020 cents ✓.

python · try it yourself
from sympy import symbols, Eq, solve
f = symbols("f")
fifty = solve(Eq(50*f + 20*(30 - f), 1020), f)[0]
print(fifty, 30 - fifty)
14 16

Exercise 3: Catch-up

A delivery van leaves a depot at 60 km/h. Half an hour later a car leaves the same depot on the same road at 90 km/h. How long after the car starts does it catch the van?

Answer

1 hour (both are 90 km from the depot).

Solution

Let t=hours the car has drivent = \text{hours the car has driven}. The van has driven t+0.5t + 0.5 hours. They meet when distances are equal:

90t=60(t+0.5)90t=60t+3030t=30t=1car: 90 km, van: 60⋅1.5=90 km ✓\begin{aligned} 90t &= 60(t + 0.5) \\ 90t &= 60t + 30 \\ 30t &= 30 \\ t &= 1 && \text{car: 90 km, van: } 60 \cdot 1.5 = 90\ \text{km}\ \checkmark \end{aligned}

Exercise 4: Simulate the story

Write a loop that simulates Exercise 3 in steps of 0.25 h of the car's driving time and prints the first time the car's distance is at least the van's.

Answer

1.0 hours

Solution
python · try it yourself
t = 0.0
while 90 * t < 60 * (t + 0.5):
    t += 0.25
print(t, "hours")
1.0 hours

Test yourself

If nn is the first of three consecutive even numbers, the third is:

  1. n+2n + 2
  2. n+3n + 3
  3. n+4n + 4
  4. 2n2n

Plan A costs €12/month. Plan B costs €7/month plus €40 up front. When are they equal?

  1. After 5 months
  2. After 8 months
  3. After 4 months
  4. Never

Two trains 300 km apart approach each other at 70 km/h and 80 km/h. When do they meet?

  1. 1.5 h
  2. 2 h
  3. 3 h
  4. 4.3 h