topic badge
iGCSE (2021 Edition)

17.03 Composite functions (Extended)

Lesson

The idea behind composite functions is best explained with an example.

Let's think about the function given by $f\left(x\right)=2x+1$f(x)=2x+1. We understand that the function takes values of $x$x in the domain and maps them to values $y=2x+1$y=2x+1 in the range.

Suppose however that this is only the first part of a two-stage treatment of $x$x. We now take these function values and map them using another function, say $g\left(x\right)=x^2$g(x)=x2. This means that the $y$y values given by $\left(2x+1\right)$(2x+1) become the squared values $\left(2x+1\right)^2$(2x+1)2. The diagram below captures the idea.

The output, or function values, of the function $f\left(x\right)$f(x) have become the input, or $x$x values, of the function $g\left(x\right)$g(x). We can describe the complete two-stage process by the expression $g\left(f\left(x\right)\right)$g(f(x)). This is sometimes written as $(g\circ f)(x)$(gf)(x).

Algebraically, we can write $g\left(f\left(x\right)\right)=g\left(2x+1\right)=\left(2x+1\right)^2$g(f(x))=g(2x+1)=(2x+1)2.

Note that if we reversed the order of the two-stage processing, we would, in this instance, develop a different composite function. Here, $f\left(g\left(x\right)\right)=(f\circ g)(x)=f\left(x^2\right)=2\left(x^2\right)+1=2x^2+1$f(g(x))=(fg)(x)=f(x2)=2(x2)+1=2x2+1.

Using our understanding of function notation and evaluation, we are able to create and simplify the equations of composite functions as well as evaluate substitutions into them.

Practice questions

Question 1

Consider the functions $f\left(x\right)=-2x-3$f(x)=2x3 and $g\left(x\right)=-2x-6$g(x)=2x6.

  1. Find $f\left(7\right)$f(7).

  2. Hence, or otherwise, evaluate $g\left(f\left(7\right)\right)$g(f(7)).

  3. Now find $g\left(7\right)$g(7).

  4. Hence, evaluate $f\left(g\left(7\right)\right)$f(g(7)).

  5. Is it true that $f\left(g\left(x\right)\right)=g\left(f\left(x\right)\right)$f(g(x))=g(f(x)) for all $x$x?

    Yes

    A

    No

    B

Question 2

Find the composite function $f\left(g\left(x\right)\right)$f(g(x)) given that $f\left(x\right)=\sqrt{x}$f(x)=x and $g\left(x\right)=4x-3$g(x)=4x3.

Question 3

Consider the functions $f\left(x\right)=4x-6$f(x)=4x6 and $g\left(x\right)=2x-1$g(x)=2x1.

  1. The function $r\left(x\right)$r(x) is defined as $r\left(x\right)=f\left(x^2\right)$r(x)=f(x2). Define $r\left(x\right)$r(x).

  2. Using the results of the previous part, define $q\left(x\right)$q(x), which is $g\left(f\left(x^2\right)\right)$g(f(x2)).

The domain and range of composite functions

If one, or all, of the functions involved in a composite function have restrictions on their input ($x$x) values, it is likely that this will affect the domain of the final function.

For example, think about the two functions $f\left(x\right)=3x-1$f(x)=3x1 and $g\left(x\right)=\sqrt{x}$g(x)=x.

$f\left(x\right)$f(x) represents a straight line and its domain covers all real $x$x. But we know that we can only take the square root of numbers greater than or equal to zero, so the domain of $g\left(x\right)$g(x) is restricted to $x\ge0$x0.

And so, $g\left(f\left(x\right)\right)$g(f(x)) can only be calculated if $f(x)$f(x) is greater than or equal to zero. Solving $f(x)\ge0$f(x)0 we get $x\ge\frac{1}{3}$x13 and this is the domain of the composite function $g\left(f\left(x\right)\right)$g(f(x)).

In general, the domain of a composite function is often the same as the domain of the function that lies within the other - that is, the domain of $f\left(x\right)$f(x) in a composite function $g\left(f\left(x\right)\right)$g(f(x)). Otherwise, it might be an even more restricted domain based on that of $f\left(x\right)$f(x).

 


 

On the other hand, the range of a composite function will lie within the range of the second function applied - that is, the $g\left(x\right)$g(x) when a composite function is defined as $g\left(f\left(x\right)\right)$g(f(x)).

Using our previous example, we know that $f(x)=3x-1$f(x)=3x1 has a range of all real $y$y.

$g\left(x\right)=\sqrt{x}$g(x)=x will only produce $y$y values that are positive, since $\sqrt{x}$x is defined as the positive square root of $x$x.

So, the range of $g\left(f\left(x\right)\right)=\sqrt{3x-1}$g(f(x))=3x1is $y\ge0$y0. We can confirm the accuracy of our algebraic answer by looking at the diagram above.

As you would expect, the range of $f\left(g\left(x\right)\right)$f(g(x))will be different to the range of $g\left(f\left(x\right)\right)$g(f(x)). Since the range of the second function applied $f\left(x\right)$f(x) is all real $y$y, we might be expecting a larger range for the composite function. Using our algebraic skills, we can find that $f\left(g\left(x\right)\right)=3\sqrt{x}-1$f(g(x))=3x1. Working from the inside out, using our knowledge that the values that $\sqrt{x}$x can take are greater than or equal to zero, and this would be the same for $3\sqrt{x}$3x. the final step of subtracting $1$1 from every output value gives us a range of $y\ge-1$y1 for our composite function $f\left(g\left(x\right)\right)$f(g(x)).

These questions are definitely tricky. As you can see, we require a good understanding of the natural domain of difficult functions, as well as the domain and range of the key functions and relations that we have previously studied. You may use technology to help you find stationary points, zeros, axes intercepts, and points of intersection if necessary.

Practice questions

Question 4

Let $f$f and $g$g be functions defined as follows:

$f\left(x\right)=\sqrt{x+3}$f(x)=x+3, and

$g\left(x\right)=x^2-3$g(x)=x23

  1. Find the composite function $(f\ \circ\ g)(x)$(f  g)(x):

  2. What is the domain of $(f\ \circ\ g)(x)$(f  g)(x)?

    $\left(-\infty,\infty\right)$(,)

    A

    $\left(-\infty,\sqrt{3}\right)\cup\left(\sqrt{3},\infty\right)$(,3)(3,)

    B

    $\left[-3,\infty\right)$[3,)

    C

    $\left[0,\infty\right)$[0,)

    D
  3. Find the composite function $(g\ \circ\ f)(x)$(g  f)(x):

  4. What is the domain of $(g\ \circ\ f)(x)$(g  f)(x)?

    $\left(-\infty,\sqrt{3}\right)\cup\left(\sqrt{3},\infty\right)$(,3)(3,)

    A

    $\left[3,\infty\right)$[3,)

    B

    $\left[-3,\infty\right)$[3,)

    C

    $\left(-\infty,\infty\right)$(,)

    D

Question 5

Consider the function $h\left(x\right)=\frac{1}{\left(x-8\right)^2}$h(x)=1(x8)2.

  1. Suppose that $g\left(x\right)=x-8$g(x)=x8. Find $f\left(x\right)$f(x) such that $h(x)=\left(f\ \circ\ g\right)(x)$h(x)=(f  g)(x).

  2. Now suppose that $f\left(x\right)=\frac{1}{x}$f(x)=1x. Find $g\left(x\right)$g(x) such that $h(x)=\left(f\ \circ\ g\right)(x)$h(x)=(f  g)(x).

Outcomes

0607C3.6

Use of a graphic display calculator to: sketch the graph of a function, produce a table of values, find zeros, local maxima or minima, find the intersection of the graphs of functions.

0607E3.6

Use of a graphic display calculator to: sketch the graph of a function produce a table of values, find zeros, local maxima or minima, find the intersection of the graphs of functions.

0607E3.7

Simplify expressions such as f(g(x)) where g(x) is a linear expression.

What is Mathspace

About Mathspace