Function machines

Starting with a function \[f(x)=2x+1\] defined for \(x\) as any real number, we can represent it as a function machine. We put \(x\) in at the left and get \(f(x)\) out at the right.

function machine doing times 2 then plus 1

The inverse function, \(f^{-1}\), is such that if we put in \(f(x)\) we’ll get out \(x\). Fill in the boxes below so that if you put in \(2x+1\) at the right, you get \(x\) out at the left.

blank function machine converting 2x+1 into x

To find out what the inverse function is, use the same machine, put in \(x\) at the right and see what comes out at the left. The expression that comes out at the left is equal to \(f^{-1}(x)\).

If we had written \(y=2x+1\), then we would have \[\begin{equation} y=f(x). \label{eq:f} \end{equation}\] The second function machine above tells us that putting \(y\) into \(f^{-1}\) we get out \(x\), so \[\begin{equation} x=f^{-1}(y). \label{eq:f-1} \end{equation}\]

In other words, \(f^{-1}(y)\) is what we get by rearranging \(\eqref{eq:f}\) to make \(x\) the subject. We can then simply replace each \(y\) with an \(x\) to find \(f^{-1}(x)\).

Complete the following. \[\begin{align*} y &= 2x+1 \\ \\ 2x &= \\ \\ x &= \qquad\qquad\qquad = f^{-1}(y) \\ \\ \text{Therefore}\quad f^{-1}(x) &= \end{align*}\]

\[2x=y-1 \quad\text{so}\quad x=\frac{1}{2}(y-1). \quad\text{Therefore}\quad f^{-1}(x)=\frac{1}{2}(x-1)=\frac{1}{2}x-\frac{1}{2}.\]

Find the inverse of each of these functions, either by drawing a function machine or by rearranging the formula.

  1. \(f(x) = 3x-2,\quad x\in\mathbb{R}\)

  2. \(f(x) = x^3-1,\quad x\in\mathbb{R}\)

The symbols \(x\in\mathbb{R}\) define the domain of the function and mean \(x\) can be any real number.

  1. \(y=3x-2 \quad\implies\quad x=\frac{1}{3}(y+2) \quad\implies\quad f^{-1}(x)=\frac{1}{3}x+\frac{2}{3},\; x\in\mathbb{R}\)

  2. \(y=x^3-1 \quad\implies\quad x=\sqrt[3]{y+1} \quad\implies\quad f^{-1}(x)=\sqrt[3]{x+1},\; x\in\mathbb{R}\)

Note we have chosen functions that can be written as simple function machines. There are many functions which cannot be written like this and many which cannot be inverted algebraically. Can you think of some examples?