Adding, multiplying and dividing functions
New functions built from old ones, and what happens to the domain when you do.
A shop tracks the money coming in and the money going out, each as a function of the day. The profit is one minus the other, and it is a function of the day too. Combining functions is that everyday operation, done carefully enough to keep the domain straight.
Run this and check any one row by hand before reading on.
Swap the order in the subtraction column to g(x) - f(x) and run it again. Every entry changes sign, which is why the order in a difference is part of the question.
Nothing surprising happened, and that is the point: combining functions means combining their outputs, one input at a time. The notation gives the combination a name.
The brackets on the left are doing something worth noticing. is the name of a new function, and is that new function evaluated at . With and , the new rule is .
Multiplying means expanding: . Check it at : the rule gives , and the table gives .
Subtraction needs one extra piece of care, because the minus sign applies to the whole of the second rule and not merely to its first term. With the same two functions, , and removing the bracket gives . Writing instead is the standard error, and it is out by 6 at every input.
What happens to the domain
Adding two functions cannot invent an input that either one refuses. Run this and watch where the combination gives up.
Change the rule in g to 1 / (x - 9) and change the test x == 4 to x == 9. A different input drops out of the combined domain.
An input has to be acceptable to both functions before the combination can say anything about it. So the domain of , and is the overlap of the two domains, and nothing else. Here that is .
Division adds one more restriction of its own, and it has nothing to do with either original domain.
Change g to return x * x - 4 and run it again. Now two inputs have to be thrown out rather than one.
So the domain of is the overlap of the two domains with every input where removed as well. Both functions accept 2 quite happily; it is the division that fails there.
| Combination | Domain |
|---|---|
| , , | Everything in both and |
| Everything in both, except inputs where |
One worked example in full. With and , find and its domain.
- The rule is .
- Both and accept every real number, so the overlap is all of them.
- Ask where the bottom is zero: when , so at and at .
- Remove both: the domain is .
has domain and has domain . What is the domain of ?
. An input must be acceptable to both, so it must be at least 2 and at most 6. Both endpoints survive, because 2 is in 's domain and also at most 6, and 6 is in 's domain and also at least 2.