Take a price through a discount and then sales tax, or through the tax first. This lesson shows how to feed one function into another, at one number and as a formula, and how to work back to the input.
Core idea
Adding or multiplying two functions combines their outputs at the same input. Here one function works on the output of the other.
One function inside another
Take two functions, and . Each one turns an input number into an output.
Give the input , and it outputs .
Now feed that into . That gives .
Using the output of one function as the input of the next is called composition. It is written . Read it as " first, then ".
The function that acts first is the inner function. The one that acts on its output is the outer function.
A function can also follow itself. Here .
Order matters
Swap the order and use the same input . Now goes into . That gives .
So but . The two orders give different answers.
Composition is also not multiplication. The product is a third number.
Composition as a formula
To write a composite as one formula, put all of the inner formula in brackets wherever the outer one has an . Here .
The other order gives . The bracket gets squared as a whole, so it produces a middle term.
You can also read a composite backwards. In , the inner part is and the outer part is squaring.
Working backwards to the input
Sometimes you know the final output and want the input. Say .
Undo the outer function first. The outer gives when its input is , so the inner must be .
Then undo the inner function. From you get .
Most people start with the function written first, so in they use first. The inner acts first, which is why that order gives the wrong number.
Worked example
Let and . Find .
Start with the inner function, then feed its output into the outer one:
So . The function never saw itself, only the output of .
Problems
Let and . Write as a single expanded formula.
Hint
Put the formula of , in brackets, into . Expand the square before multiplying.
Let and . Solve .
Hint
Undo the outer function first, to find what must be.