Assume that we have a function that defines the relationship between a and b and another function that expresses the relationship between b and c. We can use function composition to create a brand new function using these functions to express a relationship between a and c. This is one of the main ways to combine functions together.
Besides function composition, we can combine functions using algebraic operations. Given the functions f(x) and g(x), we can combine them using these operations...
(f+g)(x)=f(x)+g(x)
(f−g)(x)=f(x)−g(x)
(fg)(x)=f(x)g(x)
(gf)(x)=g(x)f(x)whereg(x)=0
An example of combining function using algebraic operation includes...
As discussed before, another way to combine functions is through function composition. Given the functions f(x) and g(x), the function composition is (f∘g)(x)=f(g(x)). The left side of the equation is read as f composed with g at x, and the right side of the equation is read as f of g of x.
The way (f∘g)(x) works is that the x is the input of g and the output of g becomes the input of f. So, to evaluate (f∘g)(x) for a specific value of x, we substitute the value into g(x) and solve for g(x). After this we substitute the resulting value of g(x) into f(x) and solve for f(x). This is the solution for (f∘g)(x).
On the other hand, to evaluate (f∘g)(x) for all values of x we substitute the expression for g(x) into f(x) and simplify.
Example
Let f(x)=3x+1 and g(x)=3−x, find f(g(x)) and g(f(x)).
The domain of f(g(x)) is the set of inputs x in the domain of g for which g(x) is in the domain of f.
To determine the domain of f(g(x)), we first find the domain of g and f. We then exclude any inputs of x for which g(x) is not in the domain of f. The remaining domain of g is the domain of the entire composition.
Example
Find the domain of (f∘g)(x) where f(x)=x−15 and g(x)=3x−24.
The domain of g(x) is all real numbers except for when 3x−2=0 which is x=32.
The domain of f(x) is all real numbers except for when x−1=0 which is x=1.
We need to find out when g(x)=1 and exclude it from the domain.
3x−24=1→4=3x−2→6=3x→x=2
This means our domain is all real numbers excluding x=32,2. In other words, (−∞,32)∪(32,2)∪(2,∞).
In some cases, we can decompose a complicated function into a composition of two simpler functions. Note that there are various compositions a function can have. An example of a decomposition is...
Example
Write f(x)=3−4+x24 as the composition of two functions.
Let h(x)=4+x2 and g(x)=3−x4. Then f(x)=(g∘h)(x)=g(h(x)).