70 Evaluate 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.

Evaluating Composite Functions 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.

Example 5: Using a Table to Evaluate a Composite Function

Using the table below, evaluate [latex]f\left(g\left(3\right)\right)[/latex] and [latex]g\left(f\left(3\right)\right)[/latex].

[latex]x[/latex] [latex]f\left(x\right)[/latex] [latex]g\left(x\right)[/latex]
1 6 3
2 8 5
3 3 2
4 1 7

Solution

To evaluate [latex]f\left(g\left(3\right)\right)[/latex], we start from the inside with the input value 3. We then evaluate the inside expression [latex]g\left(3\right)[/latex] using the table that defines the function [latex]g:[/latex] [latex]g\left(3\right)=2[/latex]. We can then use that result as the input to the function [latex]f[/latex], so [latex]g\left(3\right)[/latex] is replaced by 2 and we get [latex]f\left(2\right)[/latex]. Then, using the table that defines the function [latex]f[/latex], we find that [latex]f\left(2\right)=8[/latex].

[latex]\begin{cases}g\left(3\right)=2\hfill \\ f\left(g\left(3\right)\right)=f\left(2\right)=8\hfill \end{cases}[/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\text{,\hspace{0.17em}}[/latex] we can evaluate

[latex]g\left(f\left(3\right)\right)=g\left(3\right)=2[/latex]

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]
3 2 8 3 2

Try It 3

Using the table below, evaluate [latex]f\left(g\left(1\right)\right)[/latex] and [latex]g\left(f\left(4\right)\right)[/latex].

[latex]x[/latex] [latex]f\left(x\right)[/latex] [latex]g\left(x\right)[/latex]
1 6 3
2 8 5
3 3 2
4 1 7

Solution

Evaluating Composite Functions 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\text{-}[/latex] and [latex]y\text{-}[/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.

  1. Locate the given input to the inner function on the [latex]x\text{-}[/latex] axis of its graph.
  2. Read off the output of the inner function from the [latex]y\text{-}[/latex] axis of its graph.
  3. Locate the inner function output on the [latex]x\text{-}[/latex] axis of the graph of the outer function.
  4. 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.

Example 6: Using a Graph to Evaluate a Composite Function

Using the graphs in Figure 3, evaluate [latex]f\left(g\left(1\right)\right)[/latex].

Explanation of the composite function.
Figure 3

Solution

Two graphs of a positive parabola (g(x)) and a negative parabola (f(x)). The following points are plotted: g(1)=3 and f(3)=6.
Figure 4

To evaluate [latex]f\left(g\left(1\right)\right)[/latex], we start with the inside evaluation.

We evaluate [latex]g\left(1\right)[/latex] using the graph of [latex]g\left(x\right)[/latex], finding the input of 1 on the [latex]x\text{-}[/latex] axis and finding the output value of the graph at that input. Here, [latex]g\left(1\right)=3[/latex]. We use this value as the input to the function [latex]f[/latex].

[latex]f\left(g\left(1\right)\right)=f\left(3\right)[/latex]

We can then evaluate the composite function by looking to the graph of [latex]f\left(x\right)[/latex], finding the input of 3 on the [latex]x\text{-}[/latex] axis and reading the output value of the graph at this input. Here, [latex]f\left(3\right)=6[/latex], so [latex]f\left(g\left(1\right)\right)=6[/latex].

Analysis of the Solution

Figure 5 shows how we can mark the graphs with arrows to trace the path from the input value to the output value.

Two graphs of a positive and negative parabola.
Figure 5

Try It 4

Using Figure 6, evaluate [latex]g\left(f\left(2\right)\right)[/latex].

Two graphs of a positive parabola (g(x)) and a negative parabola (f(x)). The following points are plotted: g(1)=3 and f(3)=6.
Figure 6

Solution

Evaluating Composite Functions 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\left(g\left(x\right)\right)[/latex]. To do this, we will extend our idea of function evaluation. Recall that, when we evaluate a function like [latex]f\left(t\right)={t}^{2}-t[/latex], we substitute the value inside the parentheses into the formula wherever we see the input variable.

How To: Given a formula for a composite function, evaluate the function.

  1. Evaluate the inside function using the input value or variable provided.
  2. Use the resulting output as the input to the outside function.

Example 7: Evaluating a Composition of Functions Expressed as Formulas with a Numerical Input

Given [latex]f\left(t\right)={t}^{2}-{t}[/latex] and [latex]h\left(x\right)=3x+2[/latex], evaluate [latex]f\left(h\left(1\right)\right)[/latex].

Solution

Because the inside expression is [latex]h\left(1\right)[/latex], we start by evaluating [latex]h\left(x\right)[/latex] at 1.

[latex]\begin{cases}h\left(1\right)=3\left(1\right)+2\\ h\left(1\right)=5\end{cases}[/latex]

Then [latex]f\left(h\left(1\right)\right)=f\left(5\right)[/latex], so we evaluate [latex]f\left(t\right)[/latex] at an input of 5.

[latex]\begin{cases}f\left(h\left(1\right)\right)=f\left(5\right)\\ f\left(h\left(1\right)\right)={5}^{2}-5\\ f\left(h\left(1\right)\right)=20\end{cases}[/latex]

Analysis of the Solution

It makes no difference what the input variables [latex]t[/latex] and [latex]x[/latex] were called in this problem because we evaluated for specific numerical values.

Try It 5

Given [latex]f\left(t\right)={t}^{2}-t[/latex] and [latex]h\left(x\right)=3x+2[/latex], evaluate

A) [latex]h\left(f\left(2\right)\right)[/latex]

B) [latex]h\left(f\left(-2\right)\right)[/latex]

Solution

License

Icon for the Creative Commons Attribution 4.0 International License

College Algebra Copyright © by Lumen Learning is licensed under a Creative Commons Attribution 4.0 International License, except where otherwise noted.

Share This Book