Jump to a key chapter
In this article, we cover all things related to the combining and composing of functions.
- Arithmetic combinations of functions
- Function composition
- Combining piecewise functions
- Combining functions: examples and real-world applications
What does Combining Functions Means?
We can create a new function by adding, subtracting, multiplying, or dividing functions, just like how these operations form a new number.
The combination of functions is the act of combining multiple functions into a single function. This usually entails using basic mathematical operators such as addition or multiplication.
Arithmetic Combinations of Functions
To start, let's take a look at the easier way to combine functions: arithmetic combination of functions.
Arithmetic combination of functions is the creation of new functions by combining existing functions using basic arithmetic operations such as: addition, subtraction, multiplication, and division.
Just as numbers can be added, subtracted, multiplied, and divided, we can use these same operations on functions!
How to Combine Functions by Addition
Consider the functions \(f(x) = 2x + 1\) and \(g(x) = 3x +2\).
What happens when we combine them by addition?
\[(f+g)(x) = f(x) + g(x)\]
Now we can substitute each of the functions.
\[(f + g)(x) = (2x +1) + (3x +2)\]
And finally, collect like terms.
\[(f + g)(x) = 5x + 3\]
How to Combine Functions by Subtraction
Let's consider the same functions again, \(f(x) = 2x + 1\) and \(g(x) = 3x +2\).
What happens when we combine them by subtraction?
\[(f-g)(x) = f(x) - g(x)\]
Now we substitute the functions as before.
\[(f - g)(x) = (2x +1) - (3x +2)\]
And we can collect like terms.
\[(f - g)(x) = -x - 1\]
How to Combine Functions by Multiplication
Let's consider the functions \(f(x) = 2x + 4\) and \(g(x) = x + 2\)
What happens if we multiply them together.
\[(fg)(x) = f(x) \cdot g(x)\]
And substitute in the functions.
\[(fg)(x) = (2x + 4)(x+2)\]
We then multiply out the brackets.
\[(fg)(x) = 2x^2 + 4x + 4x + 8\]
And again we can collect like terms.
\[(fg)(x) = 2x^2 + 8x + 8\]
How to Combine Functions by Division
Let's consider the functions \(f(x) = 2x + 4\) and \(g(x) = x + 2\) once again.
What happens when we combine them by division.
\[(\frac{f}{g})(x) = \frac{f(x)}{g(x)}\]
And substitute in the functions.
\[(\frac{f}{g})(x) = \frac{2x+4}{x+2}\]
Then we simplify algebraically. In the case of these functions, we find a common factor and divide through.
\[(\frac{f}{g})(x) = \frac{2(x+2)}{x+2}\]
\[(\frac{f}{g})(x) = 2\]
In most precalculus maths, the main object we study is numbers. While we also study overall patterns as seen in functions and equations, this usually occurs through examining the numbers themselves.
This changes in calculus. In calculus, the fundamental objects being studied are the functions themselves, which are much more sophisticated mathematical objects than numbers.
It is often helpful to look at a function's formula and observe its algebraic structure. For instance, given the quadratic function,
\[f(x) = -3x^2 + 5x -7\]
we might benefit from thinking of this as the sum of three simpler functions:
- the constant function \(c(x) = -7\),
- the linear function \(l(x) = 5x\) that passes through the point (0, 0) with a slope of m = 5, and
- the concave down quadratic function \(q(x) = -3x^2\).
Each of the simpler functions: c, l, and q contribute to making f the function that it is.
Likewise, if we were interested in the function,
\[p(x) = (3x^2 + 4)(9-2x^2)\]
it might be natural for us to think about the two simpler functions:
- \(f(x) = 3x^2 + 4\)and
- \(g(x) = 9 -2x^2\)
that are multiplied together to produce p.
Combining Functions: A Note on Domain
When we arithmetically combine functions, the domain of the new function will contain the x-values that are common between the original functions. In other words, both functions must be defined at a point for their combination to be defined.
Additionally, when dividing functions, the domain is further restricted so that the denominator isn't equal to zero.
Basically, what this means is when we evaluate combined functions, we can either:
- Combine the functions and then evaluate, or
- We can evaluate the functions and then combine them.
Domain for addition and subtraction of functions
If the domain of a function, f, is the set, A, and the domain of the function, g, is the set, B, then the domain of f + g is the intersection \(A \cap B\) (note that the symbol, \(\cap\), just means "intersection") because both f(x) and g(x) have to be defined.
Let's say we have the functions:
\[f(x) = \sqrt x g(x) = \sqrt{2-x}\]
The domain of f(x) is \(A = [0, \infty )\).
The domain of g(x) is \(B = (-\infty, 2]\).
So, the domain of (f + g)(x) is:
\((f + g) (x) = \sqrt x + \sqrt{2-x}, \text{ Domain of } (f + g)(x) \text{ is }A \cap B = [0, 2]\)
Similarly, the domain of (f - g)(x) is:
\((f - g) (x) = \sqrt x - \sqrt{2-x}, \text{ Domain of } (f - g)(x) \text{ is }A \cap B = [0, 2]\)
Domain for multiplication and division of functions
As with the addition and subtraction of functions, the domain for the multiplication and division of functions is the intersection \(A \cap B\).
However, when we divide functions, we need to further restrict the domain of the combined function since we can't divide by zero. So, for the division of functions, the domain is \(x \in A \cap B \space | \space g(x) ≠ 0\) . This is read as "the set of all values of x such that x is an element of the intersection of A and B, as long as g(x) does not equal zero." (That is quite the mouthful!)
Let's say we have the functions:
\[f(x) = x^2; \space g(x) = x-1\]
The domain of f(x) is \(A = (-\infty, \infty)\).
The domain of g(x) is \(B = (-\infty, \infty)\).
So, the domain of \((f \cdot g) (x)\) is:
\((fg)(x) = x^2(x-1); \text{ Domain of } (fg)(x) \text{ is } A\cap B = (-\infty, \infty)\)
But, the domain of \((\frac{f}{g})(x)\) is:
\((\frac{f}{g})(x) = \frac{x^2}{x-1}; \text{ Domain of } (\frac{f}{g})(x) \text{ is } A \cap B= (-\infty, 1)\cup (1, \infty)\)
Combine Functions using Algebraic Operations: Summary
If we consider two functions: f(x) and g(x), then, for the values of x within the domain of both f(x) and g(x), the sum, difference, product, and quotient of the two functions are defined as:
- Sum: \((f + g) (x) = f(x) + g(x)\)
- Difference: \((f - g) (x) = f(x) - g(x)\)
- Product: \((f \cdot g) (x) = f(x) \cdot g(x)\)
- Quotient: \((\frac{f}{g}) (x) = \frac{f(x)}{g(x)}; g≠0\)
For these next four sections, let's consider the two functions:
\(f(x) = 5x + 2\) and \(g(x) = x^2-1\)
We will also solve each combination where x = 4.
\[f(4) = 5(4) + 2 = 20 + 2 = 22\]
\[g(4) = (4)^2 - 1 = 16-1 = 15\]
Combining Functions: Addition (Sum)
What is \((f+g)(x)\)?
Operation | Combine, then Evaluate | Evaluate, then Combine | Domain | ||||
\((f+g)(x)\) | \((f+g)(x)= f(x) +g(x)\) | \(= (5x+2) + (x^2 -1)\) | \(= 5x + 2+x^2 -1\) | \(=x^2+5x+1\) | --- | --- | \((-\infty, \infty)\) |
\((f+g)(4)= f(4) +g(4)\) | \(= (5(4)+2) + ((4)^2 -1)\) | \(= 5(4) + 2+(4)^2 -1\) | \(16 + 20 +1\) | \((f+g)(4)= f(4) +g(4)\) | \(=22+15 = 37\) |
Combining Functions: Subtraction (Difference)
What is \((f-g)(x)\)?
Operation | Combine, then Evaluate | Evaluate, then Combine | Domain | ||||
\((f-g)(x)\) | \((f-g)(x) = f(x)-g(x)\) | \(= (5x+2) - (x^2 -1)\) | \(=5x + 2 - x^2 + 1\) | \(-x^2+5x+3\) | --- | --- | \((-\infty, \infty)\) |
\((f-g)(4) = f(4)-g(4)\) | \(= -(4)^2 + 5(4) + 3\) | \(=-16 + 20 + 3\) | \(= 7\) | \(f(4) - g(4)\) | \(22-15 = 7\) |
Combining Functions: Multiplication (Product)
What is \((f \cdot g)(x)\)?
Operation | Combine, then Evaluate | Evaluate, then Combine | Domain | ||||
\((f \cdot g)(x)\) | \((f \cdot g)(x) = f(x) \cdot g(x)\) | \(= (5x+2) (x^2 -1)\) | \(=5x^3-5x+2x^2-2\) | \(=5x^3+2x^2-5x-2\) | --- | --- | \((-\infty, \infty)\) |
\((f \cdot g)(4) = f(4) \cdot g(4)\) | \(= 5(4)^3 + 2(4)^2-5(4)-2\) | \(320 +32-20-2\) | \(=330\) | \((f \cdot g)(4)\) | \(22 \cdot 15 = 330\) |
Combining Functions: Division (Quotient)
What is \((\frac{f}{g})(x)\)?
Operation | Combine, then Evaluate | Evaluate, then Combine | Domain | |||
\((\frac{f}{g})(x)\) | \((\frac{f}{g})(x) = \frac{5x+2}{x^2-1}\) | --- | --- | --- | --- | \((\infty, -1) \cup (-1, 1) \cup (1, \infty)\) |
\((\frac{f}{g})(4)\) | \((\frac{f}{g})(4)= \frac{5(4)+2}{(4)^2-1}\) | \(\frac{20+2}{16-1}= \frac{22}{15}\) | \(\frac{f(4)}{g(4)}\) | \(\frac{f(4)}{g(4)} = \frac{22}{15}\) |
When we divide functions, the domain is restricted so that the denominator does not equal zero.
Function Composition
Functions can also be combined by a process called function composition (or, the composition of functions, both mean the exact same thing), which is when one function is composed with another by plugging one function into the other and solving.
For instance, say we have the functions:
\[y = f(u) = \sqrt{u} \text{ and } u=g(x)=x^2+1\]
Since y is a function of u and u is a function of x, it follows that y is ultimately a function of x. We can compute this by substitution:
\[y = f(u)= f(g(x)) = f(x^2 +1) = \sqrt{x^2 +1}\]
This process is called composition because the new function is composed of the two original functions, f and g.
In general, if we want to compose any two functions, f and g:
- We start with a number x in the domain of gand find g(x).
- If g(x) is in the domain of f, then
- We can calculate the value of f(g(x)).
Note that the output of the first function (g(x) in this case) is used as the input to the next function (f(x) in this case).
The result of this composition is the new function \(h(x) = f(g(x))\) which is obtained by substituting g into f. This is called the composition (or composite) of f and g and is denoted by \((f \circ g)\) read as "fog" or "f circle g" or "f of g of x".
Function composition involves taking one function, say \(g(x)\), and plugging it into another function, say \(f(x)\), and either simplifying or solving for a value of x.
The composite function \((f \circ g)\) is defined as:
\((f \circ g)(x) = f(g(x))\)
An important note here: function composition is NOT multiplication!
The image below shows us how to picture \((f \circ g)\) in terms of machines.
Let's say we have two functions:
\(f(x) = 2 + 3x - x^2\) and \(g(x) = 2x -1\)
What is \((f \circ g)(x)\)?
Solution:
- The first step is to understand what \((f \circ g)(x)\) is telling us to do. Written in this order, we need to plug the function g(x) into the function f(x) and solve.
- From there, we need to remember the formula and write it down. So,
- \((f \circ g)(x) = f(g(x))\)
- Since we know the formula for g(x), let's plug it in:
- \(f(g(x)) = f(2x-1)\)
- Now, everywhere in the function f, replace x with 2x - 1:
- \((f \circ g)(x) = f(2x-1) = 2+3(2x-1)-(2x-1)^2\)
- And simplify:
- \((f \circ g)(x) = 2 + 3(2x-1) - (2x-1)^2 \rightarrow (f \circ g)(x) = 2 + 6x-3-(4x^2-4x+1)\rightarrow (f\circ g)(x) = -1 + 6x-4x^2 + 4x-1 \rightarrow (f \circ g)(x) = -4x^2 + 10x -2\)
It is important to note that when combining functions, the order of combination matters. In other words, f(g(x)) does not necessarily equal g(f(x)). In fact, it is a special case when these two are equal!
Function Composition: the order matters!
In the example above, we had two functions and combined them using function composition. What if we reversed the order of the composition of these two functions? Let's take a look!
Let's take the same two functions in the previous example: \(f(x) = 2 + 3x - x^2\) and \(g(x) = 2x -1\)
Only this time, let's find \((g \circ f)(x)\).
Solution:
- Again, we first need to understand what \((g \circ f)(x)\) is telling us to do. Written in this order, we need to plug the function f(x) into the function g(x) and solve.
- So let's write the formula:
- \((g \circ f)(x) = g(f(x))\)
- Since we know the formula for f(x), let's plug it in:
- \(g(f(x)) = g(2 + 3x - x^2)\)
- Now, everywhere in the function g, replace x with \(2+3x-x^2\):
- \((g \circ f)(x) = g(2+3x-x^2) = 2(2 + 3x - x^2) - 1\)
- And simplify:
- \((g \circ f)(x) = 2(2 + 3x - x^2) - 1 \rightarrow (g \circ f)(x) = 4 + 6x - 2x^2 -1 \rightarrow (g \circ f)(x) = -2x^2 + 6x + 3\)
As we can see, this solution is not the same as the solution from the previous example. When composing functions, the order matters!
Function Composition: Composing a Function with Itself
It is entirely possible to compose a function with itself!
This looks like: \((f \circ f)(x) = f(f(x))\)
So, if we have a function:
\[f(x) = 2x +3\]
and compose it with itself, we get:
\((f \circ f)(x) = f(f(x)) = f(2x + 3) = 2(2x+3)+3 = 4x + 6 +3 = 4x + 9\)
Function Composition: Considering the Domains
Don't forget! We need to consider two domains when composing functions. If we are trying to evaluate \((f \circ g)(x)\), we can see that g is evaluated at x, so xmust be in the domain of g. And since fis evaluated at g, g must be in the domain of f. In other words:
- For \((f \circ g)(x)\), x must be a value that can be plugged into g to give us a value of g(x) that can be plugged into f to get f(g(x)).
- For \((g \circ f)(x)\), x must be a value that can be plugged into f to give us a value of f(x) that can be plugged into g to get g(f(x)).
Let's consider the functions: \(f(x) = \sqrt{x}\) and \(g(x) = x^2\)
The domain of \(f(x) = \sqrt{x}\) is \([0, \text{ is } \infty)\).
The domain of \(g(x) = x^2\) is \((-\infty, \infty)\)
If we compose them as:
\((f \circ g)(x) = f(g(x))\)
we get:
\(f(g(x)) = f(x^2) = \sqrt{x^2} = x\)
- In this case, since both x and g(x) have a domain of all real numbers:
- The domain is all real numbers: \((-\infty, \infty)\)
But, if we compose them as:
\[(g \circ f)(x) = g(f(x))\]
we get:
\[g(f(x)) = g(\sqrt x) = (\sqrt{x})^2 = x\]
- In this case, while x would normally have a domain of all real numbers, we must consider f(x), which has a domain of all non-negative real numbers, so:
- The domain is all non-negative real numbers: \([0, \infty)\)
Function Composition: Decomposing Functions
With all this talk about composing functions, it is worth mentioning that we can go the other way and decompose functions as well. This can be helpful if we are working on a more complicated function. Function decomposition is the term for breaking up a function into multiple, simpler functions.
Much like there's no wrong way to eat a Reese's, there is often more than one way to decompose a function!
Let's write the function:
\[f(x) = \sqrt{5 -x^2}\]
as the composition of two simpler functions.
Solution 1:
We are trying to break up, or decompose, f(x) into two simpler functions that we will call g(x) and h(x). So,
\[f(x) = g(h(x))\]
- To break up the function, we first must look for a function inside a function within f(x).
- As one option, we might see that the inside function is \(5-x^2\), and the outside function is \(\sqrt x\).
- After observing this, we could decompose the function as
- \(h(x) = 5 -x^2; \space g(x) = \sqrt x\)
- The final step is to double-check our answer by recomposing the functions:
- \(g(h(x)) = g(5 -x^2) = \sqrt{5-x^2} = f(x)\)
Solution 2:
- Another option would be to break up f(x) into g(x) and h(x) as:
- \(h(x) = x^2g(x) = \sqrt{5-x}\)
- Again, we need to double-check our answer by recomposing the functions:
- \(g(h(x)) = g(x^2) = \sqrt{5-x^2} = f(x)\)
Function Composition: Common Mistakes
Function composition is not the same as multiplying functions
Despite what the notation looks like, when we compose functions, we are not simply multiplying them together. When we compose functions, we are replacing the variable of the "outer" function with the "inner" function and evaluating.
Say we want to compose two functions:
\[f(x) = \sqrt x; \space g(x) = x-1\]
If we want to compose them as \((f \circ g)(x)\):
- Write the formula - \((f \circ g)(x) = f(g(x))\)
- This makes it more clear that
- f(x) is the "outer" function and
- g(x) is the "inner" function
- This makes it more clear that
- Now, replace the variable, x, of the "outer" function, f(x), with the "inner" function, g(x) to get:
- \((f \circ g)(x) = f(g(x)) = f(x-1) = \sqrt{x-1}\)
- So, the composed function is: \(f(g(x)) = \sqrt{x-1}\)
If we compare the composition, \((f \circ g)(x)\), to the multiplication, \((f \cdot g)(x)\), (this could also be written as (fg)(x) we see that the answers are not the same.
- When we multiply \((f \cdot g)(x)\), we get:
- \((f \cdot g)(x) = \sqrt x \cdot (x-1) = (\sqrt x)(x) - \sqrt x = x \sqrt x - \sqrt x\)
- Which is not the same as the composition. So, \((f \circ g) (x) ≠ (f \cdot g)(x)\)!
The order in which functions are composed matters
Unlike combining functions, function composition is not commutative.
\[(f \circ g)(x) ≠ (g \circ f) (x)\]
Now, it must be said that there are some special cases where \((f \circ g)(x)\) does equal \((g \circ f)(x)\). If this is the case, that means the two functions are inverse functions.
Function composition is, however, associative.
If we have three functions that can be composed with each other, the associative property applies.
Given f, g, and h: \((f \circ (g \circ h))(x) = f((g \circ h)(x)) = f(g(h(x))) = (f \circ g)(h(x)) = ((f \circ g) \circ h)(x)\)
So, \(f \circ(g \circ h) = (f \circ g) \circ h\)
Combining Piecewise Functions
When combining piecewise functions, we follow all the same rules as when combining any other functions, except:
- We might need to split the combination into multiple cases if only one function is defined at a point.
Say we have two piecewise functions:
\(f(x) = \begin{cases} 2 & x > 2 \\ 2 & x < 2 \end{cases}\) and \(g(x) = \begin{cases} -2 & x \geq 2 \\ 2 & x<2 \end{cases}\)
And we want to calculate g(x) - f(x).
Solution:
For this piecewise function, we need to split it into cases.
- For \(x <2\):
- f(x) = 3 and g(x) = 2.
- So, \((g - f)(x) = -1\)
- f(x) = 3 and g(x) = 2.
- At \(x = 2\):
- f(x) doesn't exist
- So, \((g - f)(x)\) is undefined
- f(x) doesn't exist
- For \(x > 2\):
- \(f(x) = 2\) and \(g(x) = -2\).
- So, \((g - f)(x) = -4\)
- \(f(x) = 2\) and \(g(x) = -2\).
Combining Functions: Examples and Real-World Applications
Here are some more examples of combining functions!
Examples: arithmetic combinations of functions
If \(f(x) = x^2 - 2x - 3\) and \(g(x) = x + 1\), find the following:
- \((f-g)(-1)\)
- \(\left( \frac{f}{g} \right) (x)\)
Solutions:
- Here we need to subtract g(x) from f(x) and then substitute -1 for x.
- \((f-g)(x) = f(x) - g(x) = (x^2 -2x -3)-(x+1) = x^2 -2x - 3 -x -1 = x^2 - 3x -4\)
- \((f -g)(-1) = (-1)^2 -3(-1) -4 = 1 + 3 -4 = 0\)
- Here we need to divide f(x) by g(x). Note that we can factor f, so the fraction can be simplified.
- \(\left( \frac{f}{g} \right) = \frac {x^2-2x-3}{x+1} = \frac {(x-3)\cancel{(x+1)}}{\cancel{x+1}} = x-3 \text{ if } x≠ 1\)
Find \((f+g), (f-g), (fg),\text{ and } \left( \frac{f}{g} \right)\) for the functions:
\[f(x) = x^2 + 3g(x) = x-1\]
Solutions:
- \((f + g) = f(x) + g(x) = (x^2 + 3) + (x-1) = x^2 + 3 +x -1 = x^2 + x +2\)
- \((f-g) = f(x) - g(x) = (x^2+3) - (x-1) = x^2 + 3 - x +1 = x^2 - x + 4\)
- \((fg) = f(x) \cdot g(x) = (x^2 + 3)(x-1) = x^3 - x^2+3x-3\)
- \(\left( \frac{f}{g} \right) = \frac{f(x)}{g(x)} = \frac{x^2+3}{x-1}, x ≠ 1\)
Examples: combining piecewise functions
The graph of the function f is shown in blue, and the graph of the function g is shown in green. Use the graphs to solve each quantity.
- \(f(3)\)
- \(g(3)\)
- \(f(3) + g(3)\)
- \((f -g) (3)\)
Solutions:
- \(f(3) = -3\)
- \(g(3) = 9\)
- \(f(3) + g(3) = -3 + 9 = 6\)
- \((f -g) (3) = f(3) - g(3) = -3 -9 = -12\)
Examples: function composition
If \(f(x) = x^2 + 10\) and \(g(x) = \sqrt{x-1}\), find the following:
- \(f(g(x))\)
- \((g \circ f)(4)\)
- \((f\circ f)(x)\)
Solutions:
- Here we need to substitute g(x) for the x in f(x).
- \(f(g(x)) = f(\sqrt{x-1}) = (\sqrt{x-1})^2 +10\)
- \(f(g(x)) = x-1+10\)
- Here we need to find g(f(x)) and then evaluate at x = 4.
- \((g \circ f)(x) = g(f(x)) = g(x^2 + 10) = \sqrt{(x^2 + 10) - 1} = \sqrt{x^2 + 9}\)
- \((g \circ f)(4) = \sqrt{(4)^2 + 9} = \sqrt{16+9} = \sqrt{25} = 5\)
- Here we are composing f with itself, so we substitute \(x^2-10\) for the x in f.
- \((f \circ f)(x) = f(f(x)) = f(x^2 + 10) = (x^2 +10)^2 + 10\)
- \((f \circ f)(x) = x^4 + 20 x^2 + 110\)
If \(f(x) = \sqrt x\) and \(g (x) = \sqrt{2-x}\), find each composition and its domain.
- \((f \circ g)\)
- \((g \circ f)\)
- \((f \circ f)\)
- \((g \circ g)\)
Solutions:
- \(f \circ g = f(g(x))\)
- \(f(g(x)) = f(\sqrt{2-x}) = \sqrt {\sqrt{2-x}} = \sqrt[4]{2-x}\)
- The domain of \(f(g(x))\) is \((-\infty, 2]\)
- \(g \circ f = g(f(x))\)
- \(g(f(x))= g(\sqrt{x}) = \sqrt{2-\sqrt{x}}\)
- To find the domain, both \(\sqrt x\) and \(\sqrt{2-\sqrt{x}}\) must have \(x \geq 0\).
- For \(\sqrt{x}\) to be defined, \(x \geq 0\).
- For \(\sqrt{2-\sqrt x}\) to be defined, \(2-\sqrt x \geq 0\), or \(\sqrt x \leq 2\), or \(x \leq 4\).
- So, to meet both requirements, the domain of \(g(f(x))\) is \([0, 4]\)
- \(f \circ f = f(f(x))\)
- \(f(f(x)) = f(\sqrt{x}) = \sqrt {\sqrt{x}} = \sqrt[4]{x}\)
- The domain of \(f(f(x))\) is \([0, \infty))
- \(g \circ g = g(g(x))\)
- \(g(g(x)) = g(\sqrt{2-x}) = \sqrt{2 - \sqrt{2-x}}\)
- To find the domain, both \(2 - x \leq 0\) and \(2 - \sqrt{2-x} \geq 0\).
- For \(2-x \geq 0, \space x \leq 2\)
- For \(2 - \sqrt{2-x} \geq 0, \space \sqrt{2-x} \leq 2 \rightarrow 2 - x \leq 4 \rightarrow x \geq -2\)
- So, the domain of \(g(g(x))\) is \([-2, 2]\)
We can also compose three or more functions! For instance, the composite function \(f \circ g \circ h\) can be found by first applying h, then g, and then f like so:
\[(f \circ g\circ h)(x) = f(g(h(x)))\]
So, find \((f \circ g \circ h)(x)\) if:
\[f(x) = \frac{x}{x+1} \qquad g(x) = x^{10} \qquad h(x) = x +3 \]
Solution:
\[(f \circ g \circ h)(x) = f(g(h(x))) = f(g(x+3)) = f \left( (x+3)^{10}\right) = \frac{(x+3)^{10}}{(x+3)^{10}+1}\]
Given the function:
\[F(x) = \cos^2(x+9)\]
Find functions f, g, and h such that \(F = f \circ g \circ h\).
Solution:
- Since \(F(x) = (\cos(x+9))^2\), the formula for F says:
- First add 9
- Then take the cosine of the result
- And square it.
- So, we let:
- \(h(x) = x +9\)
- \(g(x) = \cos(x)\)
- \(f(x) = x^2\)
- Therefore, \((f \circ g \circ h)(x) = f(g(h(x))) = f(g(x+9)) = f(\cos(x+9)) = (\cos(x+9))^2 = F(x)\)
How to Graph Combinations of Functions
Graphing combinations of functions can be done simply in two steps:
Combine the relevant functions into a single function.
Graph the newly created function.
What is really interesting, however, is seeing how combining two functions will alter the original graphs of those functions. For instance, if we combined the functions \(f(x) = 3x + 4\) and \(g(x) = x\), how do you think the graph of our combined function would compare to the graph of f(x)? Let's work through it and find out.
First, let's simply combine the functions f(x) and g(x) into a single function h(x) by addition.
\[h(x) = (f+g)(x) = f(x) + g(x)\]
And next as always we substitute in our functions f(x) and g(x).
\[h(x) = 3x + 4+ x\]
And as before, we simply gather like terms to find our final combined function.
\[h(x) = 4x +4\]
Plotting the two original functions on a graph with the new combined function gives us the plot below. What can we notice about how h(x) relates to f(x) and g(x)? Well, as we can see, h(x) has a greater gradient than either f(x) or g(x). In fact, the gradient of h(x) is equal to the gradients of f(x) and g(x) combined!
When we consider what we are really doing in combining functions, this makes perfect sense. The output of a combined function (the number on the vertical axis) for a given input (the number on the horizontal axis) is simply a combination of the outputs of each original function.
To test this, pick a value on the x-axis, and find the y-axis value for each of the functions. Does the y-axis value for h(x) equal the y-axis values for f(x) and g(x) added together?
Combination of two functions on a graph.
Combining Functions - Key takeaways
- There are two main ways to combine functions:
- Combine functions using algebraic operations (a.k.a. arithmetic combinations of functions)
- Function composition
- Arithmetic combinations of functions uses precalculus methods to combine existing functions to create new ones:
- Addition and subtraction
- Multiplication and division
- Function composition uses a method of substitution to create new functions from existing ones.
- When combining functions, the domain of the new one always needs to be considered.
- Common mistakes when combining functions are:
- Forgetting to consider the domain
- Treating function composition the same as multiplying functions
- Forgetting that the order of composition of functions matters
\((f+g)(x)= f(x) +g(x)\)g(g(x)) = g(\sqrt{2-x}) = \sqrt{2 - \sqrt{2-x}}\)
Learn with 3 Combining Functions flashcards in the free StudySmarter app
We have 14,000 flashcards about Dynamic Landscapes.
Already have an account? Log in
Frequently Asked Questions about Combining Functions
How do I combine functions?
There are two main ways to combine functions:
- Arithmetic combination and
- Function composition.
Arithmetic combination is when you combine functions using arithmetic means:
- Addition & Subtraction
- Multiplication & Division
Function composition is when you plug one function into another function and evaluate.
How can exponential and logarithmic functions be combined?
These can be combined in the same manner as any other two functions:
- Arithmetic combination and
- Function composition
However, exponential and logarithmic functions are inverses of each other, meaning they can "undo" each other if they share the same base.
If you plug an exponential function into a logarithmic function of the same base, you get the same answer if you reversed the order.
How do I combine piecewise functions?
Piecewise functions follow the same rules as when combining any other type of function, except:
- You might need to split the combination into cases if only one function is defined at a point.
What is combination of functions?
Combination of functions is the creation of new functions by combining existing functions. This can be done by basic arithmetic:
- Addition
- Subtraction
- Multiplication
- Division
Functions can also be combined by a process called function composition, which is when one function is composed with another.
So, if we have two functions, f and g, and we want to compose them, we do so by plugging one function into the other and solving.
Let's say we want to compose f and g by plugging g into f.
- First, x is plugged into g and g is evaluated.
- Second, the result of that is then plugged into f and evaluated.
What is an example of combining functions?
Let's say you buy something at a hardware store, but what you buy is too big to fit in your car. For a fee, you can have the hardware store deliver your purchase for you. You pay for your purchase, plus the sales taxes, plus the fee. Taxes are 7.5%, the fee is $20.
Write a function t(x) for the total, after taxes, on the purchase amount x.
Write another function f(x) for the total, including the delivery fee, on the purchase amount x.
Calculate and interpret (f ∘ t)(x) and (t ∘ f)(x). Which results in a lower cost to you?
- Suppose taxes, by law, are not to be charged on delivery fees. Which composite function must then be used?
This sort of calculation actually comes up in real life, and is used for programming the cash registers.
- The taxes are 7.5%, so the tax function is given by t(x) = 1.075x
- The delivery fee is fixed, so the purchase amount is irrelevant.
- The fee function is given by f(x) = x + 20
- Composing, we get:
- (f ∘ t)(x) = f(t(x)) = f(1.075x) = 1.075x + 20
- (t ∘ f)(x) = t(f (x)) = t(x + 20) = 1.075(x + 20) = 1.075x + 21.50
- So, you would pay more using (t ∘ f)(x), because you would be paying taxes (the t(x) formula) on the delivery fee (the "+20" in the f (x) formula).
- You want the delivery fee to be tacked on after the taxes, because (f ∘ t)(x) results in a lower cost.
- If the state is not allowed to collect taxes on delivery fees, then:
- The function to use is (f ∘ t)(x).
About StudySmarter
StudySmarter is a globally recognized educational technology company, offering a holistic learning platform designed for students of all ages and educational levels. Our platform provides learning support for a wide range of subjects, including STEM, Social Sciences, and Languages and also helps students to successfully master various tests and exams worldwide, such as GCSE, A Level, SAT, ACT, Abitur, and more. We offer an extensive library of learning materials, including interactive flashcards, comprehensive textbook solutions, and detailed explanations. The cutting-edge technology and tools we provide help students create their own learning materials. StudySmarter’s content is not only expert-verified but also regularly updated to ensure accuracy and relevance.
Learn more