Combining functions
Theory
Combining functions forms a new function by adding, subtracting, multiplying or dividing the outputs of two functions: \((f+g)(x)=f(x)+g(x)\), and likewise for \(f-g\), \(fg\) and \(\dfrac{f}{g}\). The combined function is defined only where both functions are defined — the intersection of the domains — and for a quotient any \(x\) that makes the denominator zero is also excluded. The graph of a sum can be built by adding ordinates.
Two functions \(f\) and \(g\) can be combined pointwise: at each value of \(x\) you operate on the two outputs \(f(x)\) and \(g(x)\). This gives the sum \((f+g)(x)=f(x)+g(x)\), the difference \((f-g)(x)=f(x)-g(x)\), the product \((fg)(x)=f(x)\,g(x)\) and the quotient \(\left(\dfrac{f}{g}\right)(x)=\dfrac{f(x)}{g(x)}\).
A combined function only makes sense where both \(f\) and \(g\) are defined, so its domain is the intersection \(\operatorname{dom}f\cap\operatorname{dom}g\). For a quotient there is one further restriction: division by zero is undefined, so every \(x\) with \(g(x)=0\) must also be excluded from the domain.
The graph of a sum \(f+g\) can be sketched by adding ordinates — at each \(x\), add the height (the \(y\)-value, or ordinate) of \(f\) to the height of \(g\). Where one function is zero the sum equals the other function, which gives convenient points to plot.
The sum and difference — operate on the outputs term by term:
The product and quotient (the quotient needs \(g(x)\neq 0\)):
The domain of the combined function — an intersection, with the extra restriction for a quotient:
How to combine two functions
- Write the combined rule. Add, subtract, multiply or divide the two rules: \((f+g)(x)=f(x)+g(x)\), \((fg)(x)=f(x)g(x)\), and so on.
- Simplify. Expand brackets, collect like terms or factorise where it helps — but keep the original functions in mind for the domain.
- Find each domain, then intersect. The domain of the combined function is \(\operatorname{dom}f\cap\operatorname{dom}g\); watch for square roots (radicand \(\ge 0\)) and existing restrictions.
- Quotients: exclude zeros of the denominator. Solve \(g(x)=0\) and remove those \(x\)-values from the domain.
- To sketch a sum, add ordinates. Choose useful \(x\)-values (intercepts, and points where \(f\) or \(g\) is zero), add the two heights, and join the points.
| \((f+g)(x)\) | \(=\) | \(x^{2}+(3x-1)\) |
| \(=\) | \(x^{2}+3x-1\) |
| \((f-g)(x)\) | \(=\) | \(x^{2}-(3x-1)\) |
| \(=\) | \(x^{2}-3x+1\) |
| \((fg)(x)\) | \(=\) | \(\sqrt{x}\,(x-1)\) |
| \(\operatorname{dom}f\) | \(=\) | \([0,\infty)\) |
| \(\operatorname{dom}g\) | \(=\) | \(\mathbb{R}\) |
| \(\operatorname{dom}(fg)\) | \(=\) | \([0,\infty)\cap\mathbb{R}=[0,\infty)\) |
| \(\left(\dfrac{f}{g}\right)(x)\) | \(=\) | \(\dfrac{\sqrt{x+1}}{x-2}\) |
| \(\operatorname{dom}f\cap\operatorname{dom}g\) | \(=\) | \([-1,\infty)\cap\mathbb{R}=[-1,\infty)\) |
| \(x-2\) | \(=\) | \(0 \ \Rightarrow\ x=2\) |
| \((f+g)(x)\) | \(=\) | \(x+\dfrac{1}{x}\) |
| \(\operatorname{dom}(f+g)\) | \(=\) | \(\mathbb{R}\setminus\{0\}\) |
Common pitfalls
Frequently asked questions
How do you add two functions?
Add the outputs at each \(x\): \((f+g)(x)=f(x)+g(x)\). Add the two rules and simplify — e.g. \(x^{2}+(3x-1)=x^{2}+3x-1\).
What is the domain of a combined function?
For a sum, difference or product it is \(\operatorname{dom}f\cap\operatorname{dom}g\). For a quotient \(\dfrac{f}{g}\) you take that intersection and also exclude every \(x\) with \(g(x)=0\).
How do you find the domain of f divided by g?
Take \(\operatorname{dom}f\cap\operatorname{dom}g\), then remove every \(x\) with \(g(x)=0\). For \(\dfrac{\sqrt{x+1}}{x-2}\) the domain is \([-1,2)\cup(2,\infty)\).
How do you sketch the graph of a sum of two functions?
Add ordinates: at each \(x\), add the height of \(f\) to the height of \(g\). Useful points are the intercepts and any \(x\) where \(f\) or \(g\) is zero.
Is the product of two functions the same as composition?
No. The product multiplies outputs, \((fg)(x)=f(x)g(x)\); composition substitutes, \(f(g(x))\). They generally give different functions.
Can a combined function have a larger domain than the originals?
No. The domain is an intersection, so it can never exceed either original domain, and a quotient may be smaller once zeros of the denominator are removed.