Menu
Sign up Sign in

AI HL · 12.5

Functions

12.5.3

Composite functions

12.5.3

Composite functions

Target: I can form f(g(x)) and g(f(x)) from two functions and say that the order matters. (+5 more)

By the end of this section

Key points

Composite functions

  • f(g(x)) means apply g first, then f. The function next to x acts first.
  • (f∘g)(x) is another way to write f(g(x)).
  • Order matters: f(g(x)) and g(f(x)) are usually different.
  • To form f(g(x)), put g(x) into f in place of x. Expand the brackets if the question asks for expanded form.

Domain of a composite

  • For f(g(x)) to exist, every output of g must be allowed as an input to f.
  • So the range of g must lie inside the domain of f.
  • Write the condition on g(x), then solve the inequality for x.

Composites from graphs

  • To find f(g(a)): read g(a) from the graph of g, then read f at that value.
  • To solve g(f(x)) = k, work from the outside in. First find the values u where g(u) = k.
  • Then solve f(x) = u for each u. Each u can give more than one x.
  • Draw horizontal lines on the graphs. Check each answer by going back through f then g.

Inner and outer functions, and composite equations

  • To split h(x) into f(g(x)), find the first thing done to x. That is the inner function g. What is done to the result is the outer function f.
  • To solve f(g(x)) = k, form f(g(x)) first, then solve the equation. A squared term gives two solutions.
  • To solve f(g(x)) = g(f(x)), form both composites and set them equal. Collect to one side and use the calculator or the quadratic formula.

Explore: composite functions

Each function is a machine. Choose x and follow it through the machines in each order. The function next to x acts first.

f(x)
g(x)

On the graph, the orange path goes up to the first function, across to the line y = x so the output becomes the next input, then up or down to the second function.

Move the slider to choose x.

  1. Pick x = 1 in Pair 1. Work out f(g(1)) and g(f(1)) yourself before you look. Which is bigger?
  2. Is there an x for which the two orders give the same number? Does that make the two functions the same?
  3. In Pair 2, compare the two algebra lines. Both are straight lines. How do they differ?
  4. In Pair 3, move x until a machine will not accept its input. Which input is not allowed, and what does that say about the domain?

Worked examples

Problems like the ones in class. Pick one, try it, then open the working.
Two composites from the same pair

Given \(f(x)=4x+1\) and \(g(x)=x^2\), find (a) \(f(g(x))\) and (b) \(g(f(x))\).

Working
  1. Apply g first

    \(f(g(x))=f(x^2)=4 x^{2} + 1\)

    The function next to x acts first. Put g(x) into f in place of x.

  2. Apply f first

    \(g(f(x))=g(4x+1)=16 x^{2} + 8 x + 1\)

    Now put f(x) into g in place of x. Expand the bracket.

  3. Compare

    \(g(f(1))=25, \quad f(g(1))=5\)

    The two orders give different functions. Order matters.

Video walkthrough coming
Largest domain of a composite

\(f(x)=\ln(x-3)\), \(x>3\), and \(g(x)=3x-4\). Find the largest possible domain of \((f\circ g)(x)\).

Working
  1. The rule

    The range of g must lie inside the domain of f.

    Every output of g becomes an input of f, so g(x) must be greater than 3.

  2. The inequality

    \(g(x)>3 \;\Rightarrow\; 3x-4>3\)

    f needs its input to be more than 3.

  3. Solve

    \(3x>7 \;\Rightarrow\; x>\frac{7}{3}\)

    The boundary is \(\frac{7}{3}\), which is 2.33 to 3 significant figures. The domain is x > 2.33.

Video walkthrough coming
A composite equation from two graphs

The graphs of \(y=f(x)\) and \(y=g(x)\) are shown. Solve \(g(f(x))=1\).

−4−22468−4−2246810xyfg
Working
  1. −4−22468−4−2246810xyfg
    Outside first

    \(g(u)=1 \text{ when } u=-3 \text{ or } u=5\)

    g(f(x)) = 1 means f(x) is an input where g gives 1. Read g at height 1.

  2. −4−22468−4−2246810xyfg
    Inside next

    \(f(x)=-3\) \(f(x)=5\)

    Now read f at each of those heights.

  3. Read x

    \(f(x)=-3: x=2, 4\) \(f(x)=5: x=0, 6\)

    Each height gives its own x-values.

  4. All solutions

    x = 0, 2, 4 or 6

    Four solutions, because each of the two values of u is reached twice by f.

Video walkthrough coming
Composite value and a reverse reading

Use the graphs of f and g to find (a) \(f(g(2))\); (b) the values of a for which \(g(a)=3\).

2468−4−22468xyfg
Working
  1. 2468−4−22468xyfg
    Inner function

    \(g(2)=6\)

    Read g at x = 2.

  2. 2468−4−22468xyfg
    Outer function

    \(f(g(2))=f(6)=-1\)

    Read f at x = 6.

  3. 2468−4−22468xyfg
    Solve g(a) = 3

    a = 1 or 5

    Draw the line y = 3 and read where it meets g.

Video walkthrough coming
Finding the inside and the outside

The function h is defined by \(h(x)=(4x-1)^3\). Write h as \(f(g(x))\), where g is the inner function. Find \(g(2)\) and \(h(2)\).

Working
  1. Find the inside

    The first thing done to x is \(4x-1\), so \(g(x)=4x-1\).

    The inner function is the part you work out first.

  2. Find the outside

    What is done to that result is cubing: \(f(x)=x^3\).

    The outer function acts on the whole of g(x).

  3. Check

    \(f(g(x))=(4x-1)^3=h(x)\)

    Forming \(f(g(x))\) gives back h.

  4. Evaluate

    \(g(2)=7\) and \(h(2)=f(7)=343\)

    Work from the inside out.

Video walkthrough coming
Solving a composite equation

\(f(x)=3x-1\) and \(g(x)=x^2+2\). Solve \(f(g(x))=26\). Give the positive solution to 3 significant figures.

Working
  1. Form the composite

    \(f(g(x))=3(x^2+2)-1=3x^2+5\)

    Put g(x) into f.

  2. Set equal to 26

    \(3x^2+5=26 \;\Rightarrow\; x^2=7\)

    Now it is an ordinary equation.

  3. Solve

    \(x=\pm\sqrt7=\pm2.65\)

    A square gives two solutions. The positive one is 2.65.

  4. Check

    \(g(2.646)=9\), \(f(9)=26\)

    Work through g and then f.

Video walkthrough coming