Skip to content
IGCSE·Tuition
Mathematics · Lessons

Interpret a function machine in context

A word problem can hide a perfectly ordinary function, and the trick is to see the machine inside it.

On this page
  1. How do you spot the machine in a word problem?
  2. Step by step
  3. Worked example
  4. The mistake to watch for
  5. Check yourself
  6. Where this leads next

A function machine in context is a real rule with an input, a few steps and an output. Name the input and output with their units first, then write the rule, then calculate. Finally check that the answer fits the situation.

This final lesson in functions and mappings uses everything from evaluating, composing, reversing and restricting.

How do you spot the machine in a word problem?

A courier charges RM6 for any parcel, plus RM2.50 for every kilogram. Parcels above 5 kg are not accepted.

  • Input: weight w in kg.
  • Steps: multiply by 2.5, then add 6.
  • Output: charge in RM.
  • Domain: 0 ≤ w ≤ 5.

The rule is f(w) = 6 + 2.5w.

Step by step

  1. Name the input and the output, with units.
  2. Write the rule in symbols.
  3. State the allowed inputs from the situation.
  4. Forward question: substitute the input.
  5. Backward question: set the rule equal to the output and solve.
  6. Check the answer against the domain and the units.

Worked example

Using f(w) = 6 + 2.5w for 0 ≤ w ≤ 5:

(a) Charge for 3.2 kg. f(3.2) = 6 + 2.5 × 3.2 = 6 + 8 = RM14.

(b) Weight for a charge of RM18.50. Solve 6 + 2.5w = 18.5. Subtract 6: 2.5w = 12.5. Divide by 2.5: w = 5 kg. This is on the boundary of the domain, so it is allowed.

(c) A 6% service tax is added to the charge. Let g(c) = 1.06c. For 3.2 kg, gf(3.2) = g(14) = 14 × 1.06 = RM14.84.

Check: 6% of 14 is 0.84, and 14 + 0.84 = 14.84. The weight in (b) is at most 5, so it is within the domain.

The mistake to watch for

A common slip when working backwards is to stop after subtracting the fixed charge.

Mistaken working: 18.50 = 6 + 2.5w, so w = 18.50 − 6 = 12.5 kg

The student subtracted 6 but forgot that 12.5 is the cost of the weight, not the weight.

The correct step is to divide by 2.5, giving w = 5. The units give it away: 12.5 is in RM, yet the question asked for kg, and 12.5 kg would be far outside the domain. Always check units and domain before writing the answer.

Check yourself

Use f(w) = 6 + 2.5w for 0 ≤ w ≤ 5.

1. Find the charge for a 4 kg parcel.

Show answer

f(4) = 6 + 2.5 × 4 = 6 + 10 = RM16.

2. A parcel is charged RM13. What does it weigh?

Show answer

6 + 2.5w = 13, so 2.5w = 7 and w = 7 ÷ 2.5 = 2.8 kg. Check: 6 + 2.5 × 2.8 = 6 + 7 = 13.

3. Could a parcel be charged RM21 under this service?

Show answer

6 + 2.5w = 21, so 2.5w = 15 and w = 6. Since 6 is greater than 5, this weight is not accepted. No, RM21 is not possible for any parcel the service takes.

Where this leads next

Try the whole module in the functions and mappings practice set. The function composition and inverse explorer lets you test a context rule with different inputs, and the non-calculator working trainer helps with the arithmetic.

If word problems are where your marks slip, our teachers can work through them with you in online one-to-one Mathematics tuition.

Questions people ask

How do I turn a word problem into a function?

Identify the input, the output and the steps in between. For a delivery charge of RM6 plus RM2.50 per kg, the input is weight w, and the rule is f(w) = 6 + 2.5w. Write the rule in symbols before calculating anything.

What does the domain mean in a real situation?

It is the set of inputs that make sense. If a parcel service only accepts parcels up to 5 kg, the domain is 0 ≤ w ≤ 5. A mathematically correct answer outside this range, such as w = 7.6, does not fit the situation.

When do I use the inverse in a context question?

When you are given the output and asked for the input. If the charge is RM18.50 and you want the weight, you solve 6 + 2.5w = 18.50. That is exactly the same as evaluating the inverse function at 18.50.

How do I show a composite in context?

When the output of one rule feeds another, such as a charge followed by 6% tax, apply them in order. First the delivery charge, then multiply by 1.06. Write it out as gf(w) so the order is clear.

Updated:

Your next step

If word problems about charges and rates make you unsure which step to do first, a one-to-one teacher can help you turn each sentence into a machine you can test.

Paid one-hour trial at your assigned teacher’s confirmed rate, starting from RM80. Other fees, schedules and ongoing arrangements are confirmed directly with your teacher after the trial class.

Tuition is arranged with a parent or guardian. Send them this page on WhatsApp and they can enquire for you.

Parent or guardian? Enquire here

9,000+ students helped through our service