An arcade doubles your voucher value and takes off £3. If you get £5, what went in?
At an arcade in Leeds, a voucher machine doubles the value you put in and then takes off three pounds. A five-pound voucher comes out. Can you work out what went in?
You already know how to use a function machine: put a number in and follow its rule. Call the voucher rule f. It doubles four and subtracts three to give five. Call the squaring rule g. It turns the same input, four, into sixteen.
Start at five, the output. The last thing f did was subtract three, so add three back to reach eight. Then undo the doubling by halving eight. You're back at four. This reverse rule is called the inverse of f.
This time, f gives an output of nine. You want to get back to the input. Think about what f did last, then pick the first move you should make.
Call the output y: y equals two x minus three. Add three to both sides, then divide by two to get the original input x. The inverse takes y back to x, so f inverse of y is y plus three, all over two. Now rename the inverse's input x.
Now try a new machine called h. It multiplies its input by three and then subtracts six. If you run it backwards, which rule do you get? Pick the inverse.
To undo f at five, add three and halve to get back to four. For the reciprocal at five, apply f to five to get seven, then take one over seven. Reading f inverse of five as one over f of five is a mistake: the two calculations give different results.
Send two into g first and you get four. Feed four into f and you get five. Using one function's output as the next function's input is called composition. Write f g of two for f of g of two. Read it from the inside out.
For f g of x, square x first, then double the result and subtract three. That gives two x squared minus three. For g f of x, double x and subtract three first. Now square the whole result: two x minus three, all squared.
An AQA Higher question could ask you to work out f g of minus two and g f of minus two. For f g, square minus two to get four, then double four and subtract three to get five. For g f, double minus two and subtract three, then square minus seven to get forty-nine.