Combinations and Compositions of Functions: Learn It 3
Evaluating Composite Functions
Once we compose a new function from two existing functions, we need to be able to evaluate it for any input in its domain. We will do this with specific numerical inputs for functions expressed as tables, graphs, and formulas and with variables as inputs to functions expressed as formulas. In each case, we evaluate the inner function using the starting input and then use the inner function’s output as the input for the outer function.
Using Tables
When working with functions given as tables, we read input and output values from the table entries and always work from the inside to the outside. We evaluate the inside function first and then use the output of the inside function as the input to the outside function.
Using the table below, evaluate [latex](f \circ g)(3)[/latex] and [latex](g \circ f)(3)[/latex].
[latex]x[/latex]
[latex]f\left(x\right)[/latex]
[latex]g\left(x\right)[/latex]
[latex]1[/latex]
[latex]6[/latex]
[latex]3[/latex]
[latex]2[/latex]
[latex]8[/latex]
[latex]5[/latex]
[latex]3[/latex]
[latex]3[/latex]
[latex]2[/latex]
[latex]4[/latex]
[latex]1[/latex]
[latex]7[/latex]
First, find [latex]g(3)[/latex]: From the table, when [latex]x=3[/latex], [latex]g(3) = 2[/latex].
Next, find [latex]f(g(3)) = f(2)[/latex]: From the table, when [latex]x=2[/latex], [latex]f(2) = 8[/latex].
To evaluate [latex]g\left(f\left(3\right)\right)[/latex], we first evaluate the inside expression [latex]f\left(3\right)[/latex] using the first table: [latex]f\left(3\right)=3[/latex]. Then, using the table for [latex]g[/latex], we can evaluate
The table below shows the composite functions [latex]f\circ g[/latex] and [latex]g\circ f[/latex] as tables.
[latex]x[/latex]
[latex]g\left(x\right)[/latex]
[latex]f\left(g\left(x\right)\right)[/latex]
[latex]f\left(x\right)[/latex]
[latex]g\left(f\left(x\right)\right)[/latex]
[latex]3[/latex]
[latex]2[/latex]
[latex]8[/latex]
[latex]3[/latex]
[latex]2[/latex]
Using Graphs
When we are given individual functions as graphs, the procedure for evaluating composite functions is similar to the process we use for evaluating tables. We read the input and output values, but this time, from the [latex]x-[/latex] and [latex]y-[/latex]axes of the graphs.
How To: Given a composite function and graphs of its individual functions, evaluate it using the information provided by the graphs.
Locate the given input to the inner function on the [latex]x\text{-}[/latex] axis of its graph.
Read off the output of the inner function from the [latex]y\text{-}[/latex] axis of its graph.
Locate the inner function output on the [latex]x\text{-}[/latex] axis of the graph of the outer function.
Read the output of the outer function from the [latex]y\text{-}[/latex] axis of its graph. This is the output of the composite function.
Using the graphs below, evaluate [latex](f \circ g)(3)[/latex], [latex](g \circ f)(3)[/latex], and [latex]f(g(1))[/latex].
Find [latex]g(3)[/latex] using graph (a):
Locate [latex]x = 3[/latex] on the [latex]g(x)[/latex] graph.
[latex]g(3)[/latex] is the [latex]y[/latex]-value at [latex]x=3[/latex], which is [latex]2[/latex].
Find [latex]f(g(3)) = f(2)[/latex] using graph (b):
Locate [latex]x = 2[/latex] on the [latex]f(x)[/latex] graph.
[latex]f(2)[/latex] is the [latex]y[/latex]-value at [latex]x=2[/latex], which is [latex]5[/latex].
Therefore, [latex](f \circ g)(3) = 5[/latex].
[latex]\begin{align*} \text{First, find } f(3) \text{ using graph (b):} \\ f(3) &= 6 \quad \text{(Locate } x = 3 \text{ on the } f(x) \text{ graph, } f(3) \text{ is the } y \text{-value at } x = 3) \\[2mm] \text{Next, find } g(f(3)) = g(6) \text{ using graph (a):} \\ g(6) &= 7 \quad \text{(Locate } x = 6 \text{ on the } g(x) \text{ graph, } g(6) \text{ is the } y \text{-value at } x = 6) \\[2mm] \text{Therefore, } (g \circ f)(3) &= 7 \end{align*}[/latex]
[latex]f(g(1)) = f(3) = 6[/latex]
Using Formulas
When evaluating a composite function where we have either created or been given formulas, the rule of working from the inside out remains the same. The input value to the outer function will be the output of the inner function, which may be a numerical value, a variable name, or a more complicated expression.
While we can compose the functions for each individual input value, it is sometimes helpful to find a single formula that will calculate the result of a composition [latex](f \circ g)(x)[/latex].
How To: Given a formula for a composite function, evaluate the function.
Evaluate the inside function using the input value or variable provided.
Use the resulting output as the input to the outside function.
Given that [latex]f(x) = x^2-x[/latex] and [latex]h(x) = 3x+2[/latex], find [latex](f \circ h)(1)[/latex], [latex](h \circ f)(1)[/latex], and [latex](f \circ h \circ f)(1)[/latex].
When evaluating the composition of functions at a specific value, always check the domains of both functions first. The value must be in the domain of the inner function, and the result must be in the domain of the outer function. This ensures the composition is valid.What value(s) of [latex]x[/latex] that are not allowed for the composition [latex]f \circ g[/latex] if [latex]f(x) = \dfrac{5}{x - 1}[/latex] and [latex]g(x) = \dfrac{4}{3x - 2}[/latex]?
Check the domain of [latex]g(x)[/latex]:
[latex]g(x) = \dfrac{4}{3x - 2} \text{ is defined for } 3x - 2 \neq 0.[/latex]
[latex]3x - 2 \neq 0 \Rightarrow x \neq \dfrac{2}{3}.[/latex]
Check the domain of [latex]f(g(x))[/latex]:
[latex]f(x) = \dfrac{5}{x - 1} \text{ is defined for } x - 1 \neq 0 \Rightarrow x \neq 1.[/latex]
Our input is now [latex]g(x)[/latex]. So, we need to ensure that [latex]g(x) \neq 1[/latex].
Therefore, the values of [latex]x[/latex] that are not allowed are [latex]x \neq \dfrac{2}{3}[/latex] and [latex]x \neq 2[/latex].
Note: The value [latex]x=1[/latex] does not need to be excluded since it is not directly applicable in this context; [latex]x=1[/latex] would be relevant if we were evaluating [latex]f(x)[/latex] directly.