3.2.2 The Composition of Polynomial Functions

Learning Objectives

  • Explain the composition of two polynomial functions
  • Perform the composition of two polynomial functions

There are many times in life where we perform one function immediately following another function. When making tea, for example, we bring cold water to a boil, then pour the boiling water over tea leaves in a teapot. The first function boils the cold water, and the second function pours the boiled water over tea leaves to make tea. The input of the first function is cold water. The output of the first function is boiled water. The input of the second function is boiled water. The output of the second function is tea. Notice that the output of the first function becomes the input of the second function i.e. boiled water. In other words, the range of the first function becomes the domain of the second function.

The process of combining functions so that the output of one function becomes the input of another is known as a composition of functions. The resulting function is known as a composite function. In the example just given, the composite function is making tea.

To represent this combination of functions we use the following notation:

[latex]\left(f\circ g\right)\left(x\right)=f\left(g\left(x\right)\right)[/latex]

We read the left-hand side as, “[latex]f[/latex] composed with [latex]g[/latex] at [latex]x[/latex]“, and the right-hand side as “[latex]f[/latex] of [latex]g[/latex] of [latex]x[/latex]“. The two sides of the equation have the same mathematical meaning and are equal. The open circle symbol [latex]\circ [/latex] is called the composition operator. We use this operator mainly when we wish to emphasize the relationship between the functions themselves without referring to any particular input value. Composition of functions takes two (or more) functions and forms a new function, much as addition or multiplication takes two functions and gives a new function. However, it is important not to confuse function composition with multiplication because, in most cases [latex]f\left(g\left(x\right)\right)\ne f\left(x\right)\cdot g\left(x\right)[/latex].

It is important to understand the order of operations in evaluating a composite function. We follow the usual convention with parentheses by starting with the innermost parentheses first, and then working to the outside. In the composition[latex]\left(f\circ g\right)\left(x\right)=f\left(g\left(x\right)\right)[/latex], the function [latex]g[/latex] takes the input [latex]x[/latex] first and yields an output [latex]g\left(x\right)[/latex]. Then the function [latex]f[/latex] takes [latex]g\left(x\right)[/latex] as an input and yields an output [latex]f\left(g\left(x\right)\right)[/latex] (see figure 1).

Explanation of the composite function. g(x), the output of g is the input of f. X is the input of g.

Figure 1. The composition of functions

Example 1

If [latex]f(x)=x+3[/latex] and [latex]g(x)=2x[/latex], find [latex](f\circ g)(x)[/latex].

Solution

[latex]\begin{aligned}(f\circ g)(x)&=f\left (g(x)\right )\\&=f\left ( \color{blue}{2x}\right )&\text{Replace }g(x)\text{ with }2x\\&=\color{blue}{(2x)}+3&\text{Substitute }2x\text{ for }x\text{ in }f(x)\\&=2x+3\end{aligned}[/latex]

Example 2

If [latex]f(x)=x+3[/latex] and [latex]g(x)=2x[/latex], find [latex](g\circ f)(x)[/latex].

Solution

[latex]\begin{aligned}(g\circ f)(x)&=g\left (f(x)\right )\\&=g\left ( \color{blue}{x+3}\right )&\text{Replace }f(x)\text{ with }x+3\\&=2\color{blue}{(x+3)}&\text{Substitute }x+3\text{ for }x\text{ in }g(x)\\&=2x+6\end{aligned}[/latex]

These two examples show that the composition of functions is not commutative since [latex](f\circ g)(x)\ne (g\circ f)(x)[/latex].

Composition of Functions

When the output of one function is used as the input of another, we call the entire operation a composition of functions. For any input [latex]x[/latex] and functions [latex]f[/latex] and [latex]g[/latex], this action defines a composite function, which we write as [latex]f\circ g[/latex] such that

[latex]\left(f\circ g\right)\left(x\right)=f\left(g\left(x\right)\right)[/latex]

The domain of the composite function [latex]f\circ g[/latex] is all [latex]x[/latex] such that [latex]x[/latex] is in the domain of [latex]g[/latex] and [latex]g\left(x\right)[/latex] is in the domain of [latex]f[/latex].

It is important to realize that the product of functions [latex]f(x)\cdot g(x)[/latex] is not the same as the function composition [latex]f\left(g\left(x\right)\right)[/latex], because, in general, [latex]f\left(x\right)\cdot g\left(x\right)\ne f\left(g\left(x\right)\right)[/latex].

Example 3

For [latex]f(x)=x+3[/latex] and [latex]g(x)=x^2[/latex] find:

1. [latex](f\circ g)(x)[/latex]

2. [latex]\left(g\circ f\right)(x)[/latex]

3. [latex]\left(f\circ f\right)(x)[/latex]

4. [latex]\left(g\circ g\right)(x)[/latex]

1.
[latex]\begin{aligned}(f\circ g)(x)&=f\left (g(x)\right )\\&=f\left ( \color{blue}{x^2}\right )&\text{Replace }g(x)\text{ with }x^2\\&=\color{blue}{x^2}+3&\text{Substitute }x^2\text{ for }x\text{ in }f(x)\end{aligned}[/latex]

2.

[latex]\begin{aligned}(g\circ f)(x)&=g\left (f(x)\right )\\&=g\left ( \color{red}{x+3}\right )&\text{Replace }f(x)\text{ with }x+3\\&=\color{red}{(x+3)}^2&\text{Substitute }x+3\text{ for }x\text{ in }g(x)\\&=x^2+6x+9\end{aligned}[/latex]

3.

[latex]\begin{aligned}(f\circ f)(x)&=f\left (f(x)\right )\\&=f( \color{blue}{x+3})&\text{Replace }f(x)\text{ with }x+3\\&=\color{blue}{(x+3)}+3&\text{Substitute }x+3\text{ for }x\text{ in }f(x)\\&=x+6\end{aligned}[/latex]

4.

[latex]\begin{aligned}(g\circ g)(x)&=g\left (g(x)\right )\\&=g\left ( \color{red}{x^2}\right )&\text{Replace }g(x)\text{ with }x^2\\&=\color{red}{\left (x^2\right )}^2&\text{Substitute }x^2\text{ for }x\text{ in }g(x)\\&=x^4\end{aligned}[/latex]

Try It 1

 

Evaluating a Composite Function

There are two ways to evaluate a composite function. One way is to first find the composite function, then find the function value.

Example 4

Evaluate [latex]f\left (g(2)\right )[/latex] for [latex]f(x)=x^2[/latex] and [latex]g(x)=4x-3[/latex].

Solution

Let’s start by finding [latex]f\left (g(x)\right )[/latex]:

[latex]\begin{aligned}f\left (g(x)\right )&=f\left (\color{blue}{4x-3}\right )\\&=\color{blue}{(4x-3)}^2\\&=16x^2-24x+9\end{aligned}[/latex]

Now that we have the function[latex]f\left (g(x)\right )[/latex], we can evaluate it when  [latex]x=2[/latex]:

[latex]\begin{aligned}f\left (g(x)\right )&=(4x-3)^2\\f\left (g(2)\right )&= \left (4\color{blue}{(2)}-3\right )^2\\&=\color{blue}{(5)}^2\\&=25\end{aligned}[/latex]

Try It 2

For [latex]f(x)=x+3[/latex] and [latex]g(x)=4x[/latex], evaluate:

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

2. [latex]f\left (g(0)\right )[/latex]

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

Another way to evaluate a composite function is to substitute a value for the independent variable right into the function equation of the composite function, e.g. [latex]f\left (g(2)\right )[/latex].

Example 5

Evaluate [latex]f\left (g(2)\right )[/latex] for [latex]f(x)=x^2[/latex] and [latex]g(x)=4x-3[/latex].

Solution

First find [latex]g(2)[/latex] then substitute that value into [latex]f(x)[/latex]:

[latex]\begin{aligned}f\left (g(2)\right )&=f\left (4\color{blue}{(2)}-3\right )\\&=f(5)\\&=\color{red}{(5)}^2\\&=25\end{aligned}[/latex]

Notice that this is the same answer we got by finding the composite function first then evaluating.

Try It 3

For [latex]f(x)=x^2+3[/latex] and [latex]g(x)=4x+1[/latex], evaluate:

1. [latex]f\left (g(-2)\right )[/latex]

2. [latex]f\left (g(0)\right )[/latex]

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