Back to homeMathematics · 6th Year OL · Change subject
Start for free
6th Year OL · Mathematics
Trigonometry, Calculus and Inference for Ordinary Level · Composite Functions and Cubic Graphs

Composite Functions

A shop in Cork takes €10 off a jacket and then 20% off the reduced price. Two steps, one after the other. Is there a single rule that gives the final price straight from the original price? There is, and it is called a composite function.

Functions in a chain

Think of a function as a machine. You put in an input, and one output comes out. A composite function connects two machines: the output of the first goes straight in as the input of the second.

Two function machines in a chain: x goes into g, the output g(x) goes into f, giving f(g(x)). x g g(x) f f(g(x))

We write $f(g(x))$ and read it as "$f$ of $g$ of $x$". The function closest to $x$ acts first. So in $f(g(x))$ you apply $g$ first, then $f$.

For a number, just work from the inside out.

Practice★☆☆Not started
Given $f(x) = 2x + 3$ and $g(x) = x^2$, find: a) $f(g(2))$ b) $g(f(2))$

Given $f(x) = 2x + 3$ and $g(x) = x^2$, find:

  1. a) $f(g(2))$
  1. b) $g(f(2))$
Solve
Practice★☆☆Not started
Given $h(x) = x^2 + 1$ and $k(x) = x + 4$, find $h(k(-1))$ and $k(h(-1))$.

Given $h(x) = x^2 + 1$ and $k(x) = x + 4$, find $h(k(-1))$ and $k(h(-1))$.

Solve

Finding the formula

To get a rule for the whole composite, replace every $x$ in the outer function by the whole expression of the inner function.

Composites suit real two-step situations. Back in the shop: $d(p) = p - 10$ takes off €10 and $s(p) = 0.8p$ takes off 20%. The final price is $s(d(p)) = 0.8(p - 10) = 0.8p - 8$. A jacket at €85 costs $0.8(85) - 8 = €60$. Back to the shop: one rule, $0.8p - 8$, does both discounts at once.

Practice★☆☆Not started
Given $f(x) = x - 5$ and $g(x) = 3x$, write down expressions for: a) $f(g(x))$ b) $g(f(x))$

Given $f(x) = x - 5$ and $g(x) = 3x$, write down expressions for:

  1. a) $f(g(x))$
  1. b) $g(f(x))$
Solve
Practice★★☆Not started
Given $f(x) = 3x - 2$ and $g(x) = x^2 + 1$: a) Write $f(g(x))$ in the form $ax^2 + b$. b) Write $g(f(x))$ in the form $px^2 + qx + r$. c) Solve $f(g(x)) = 49$.

Given $f(x) = 3x - 2$ and $g(x) = x^2 + 1$:

  1. a) Write $f(g(x))$ in the form $ax^2 + b$.
  1. b) Write $g(f(x))$ in the form $px^2 + qx + r$.
  1. c) Solve $f(g(x)) = 49$.
Solve
Practice★★☆Not started
A shop in Cork offers a discount of €10 off any item and then a further $20\%$ off the reduced price. Let $d(p) = p - 10$ and $s(p) = 0.8p$. a) Write the final price…

A shop in Cork offers a discount of €10 off any item and then a further $20\%$ off the reduced price. Let $d(p) = p - 10$ and $s(p) = 0.8p$.

  1. a) Write the final price after both discounts as a composite function of $p$ in the form $s(d(p))$ and simplify it.
  1. b) Find the final price of a jacket originally priced at €85.
  1. c) Find the original price of a coat whose final price is €52.
Solve

Equations with composites

Once you have the formula, an equation such as $f(g(x)) = 49$ is just an ordinary equation in $x$. Simplify the composite first, then solve.

When a quadratic composite is set equal to a number, you may get two solutions, so check for both. If the equation includes an unknown constant, such as $f(x) = 2x + a$, substitute and compare terms: if $f(g(x)) = g(f(x))$ for all $x$, the coefficients of $x$ and the constant terms must match.

Practice★★☆Not started
Given $f(x) = x + 2$ and $g(x) = x^2 - 3$, solve the equation $g(f(x)) = f(g(x))$.

Given $f(x) = x + 2$ and $g(x) = x^2 - 3$, solve the equation $g(f(x)) = f(g(x))$.

Solve
Practice★★★Not started
Given $f(x) = 2x + a$ and $g(x) = 3x - 1$, where $a$ is a constant, it is known that $f(g(x)) = g(f(x))$ for all $x$. a) Find the value of $a$. b) Verify your answer by…

Given $f(x) = 2x + a$ and $g(x) = 3x - 1$, where $a$ is a constant, it is known that $f(g(x)) = g(f(x))$ for all $x$.

  1. a) Find the value of $a$.
  1. b) Verify your answer by calculating both composites at $x = 3$.
Solve

Functions that undo each other

Let $f(x) = \dfrac{x+1}{2}$ and $g(x) = 2x - 1$. Then $f(g(x)) = \dfrac{(2x - 1) + 1}{2} = \dfrac{2x}{2} = x$, and $g(f(x)) = 2\left(\dfrac{x+1}{2}\right) - 1 = x + 1 - 1 = x$.

Both composites give back exactly $x$. Whatever $f$ does, $g$ reverses, and the other way round. We say $f$ and $g$ are inverse functions: each one undoes the other.

You can also compose a function with itself. For $f(x) = \dfrac{x+1}{2}$:

$f(f(x)) = \dfrac{\frac{x+1}{2} + 1}{2} = \dfrac{x + 3}{4}$.

To solve $f(f(x)) = 5$: $\dfrac{x+3}{4} = 5$, so $x + 3 = 20$ and $x = 17$.

Practice★★★Not started
Given $f(x) = \dfrac{x+1}{2}$ and $g(x) = 2x - 1$: a) Show that $f(g(x)) = x$ and $g(f(x)) = x$. b) Explain what this tells you about the relationship between $f$ and…

Given $f(x) = \dfrac{x+1}{2}$ and $g(x) = 2x - 1$:

  1. a) Show that $f(g(x)) = x$ and $g(f(x)) = x$.
  1. b) Explain what this tells you about the relationship between $f$ and $g$.
  1. c) Find $f(f(x))$ and solve $f(f(x)) = 5$.
Solve
Practice★★★Not started
Given $f(x) = x^2 - 4x$ and $g(x) = x + 2$: a) Show that $f(g(x)) = x^2 - 4$. b) Find the values of $x$ for which $f(g(x)) = g(f(x))$. c) Find the minimum value of…

Given $f(x) = x^2 - 4x$ and $g(x) = x + 2$:

  1. a) Show that $f(g(x)) = x^2 - 4$.
  1. b) Find the values of $x$ for which $f(g(x)) = g(f(x))$.
  1. c) Find the minimum value of $g(f(x))$ and the value of $x$ at which it occurs.
Solve

Summary

See all the exercises in this section