### Inverse function examples

An inverse function is a function that undoes the action of the another function. Using function machine metaphor, forming an inverse function means running the function machine backwards. The backwards function machine will work only if the original function machine produces a unique output for each unique input.

In the following examples, we demonstrate a few simple cases where one can calculate the inverse function. In most cases, though, we cannot write down a nice formula for the inverse function.

#### Example 1

Let $f: \R \to \R$ (confused?) be defined by $f(x)=3x+1$. Find the inverse function $f^{-1}$.

**Solution**: For any input $x$, the function machine corresponding to $f$ spits out the value $y=f(x)=3x+1$. We want to find the function $f^{-1}$ that takes the value $y$ as an input and spits out $x$ as the output. In other words, $y=f(x)$ gives $y$ as a function of $x$, and we want to find $x=f^{-1}(y)$ that will give us $x$ as a function of $y$.

To calculate $x$ as a function of $y$, we just take the expression $y=3x+1$ for $y$ as a function of $x$ and solve for $x$. \begin{align*} y &= 3x+1\\ y-1 &= 3x\\ \frac{y-1}{3} &= x \end{align*} Therefore, we found out that $x=y/3 - 1/3$, so we can write the inverse function as $$f^{-1}(y) = \frac{y}{3} - \frac{1}{3}.$$

In the definition of the function $f^{-1}$, there's nothing special about using the variable $y$. We could use any other variable, and write the answer as $f^{-1}(x) = x/3-1/3$ or $f^{-1}(\bigstar) = \bigstar/3 -1/3$. The placeholder variable used in the formula for a function doesn't matter.

To verify that $f^{-1}$ is really the inverse of $f$, we should show that the composition of $f$ and $f^{-1}$ doesn't do anything to the input. In this case, the order shouldn't matter, and the functions $f \circ f^{-1}$ and $f^{-1} \circ $f$ should both do nothing. Let's check this.

First, we apply $f$ followed by $f^{-1}$. \begin{align*} (f^{-1} \circ f)(x) &= f^{-1}(f(x))\\ &=f^{-1}(3x+1)\\ &=(3x+1)/3 - 1/3\\ &= x +1/3 -1/3 = x \end{align*} Second, we apply $f^{-1}$ followed by $f$. \begin{align*} (f \circ f^{-1})(x) &= f(f^{-1}(x))\\ &= f(x/3-1/3)\\ &= 3(x/3-1/3) +1\\ &= x - 1 + 1 = x \end{align*} In both cases, applying both $f$ and $f^{-1}$ to $x$ gave us back $x$. Indeed, $f^{-1}(x) = x/3-1/3$.

#### Example 2

Let $f: \R \to \R$ be defined by $f(x)=x^2$. Does this function posses an inverse function?

**Solution**: For any real number $x$, both $f(x)$ and $f(-x)$ yield the same number, namely $f(x)=f(-x) = x^2$. If $x \ne 0$, then $x$ and $-x$ are different numbers, and $f$ maps these two distinct numbers to the same output number. For example, given that the output of $f(x)$ was $y=4$, there's no way to know if $x=2$ or $x=-2$ was the input to the function. There's no way to run the function machine backwards, and $f$ does not posses an inverse function.

#### Example 2'

Let $f: \R_{\ge 0} \to \R$ be defined by $f(x)=x^2$, where the domain $\R_{\ge 0}$ is the set of non-negative real numbers. Does this function posses an inverse function? If so, find $f^{-1}$.

**Solution**: In this case, since we restrict the domain to the non-negative real numbers, every distinct input value $x \ge 0$ will yield a distinct output value $x^2$. For this function $f$, we can find its inverse.

Set $y=f(x)=x^2$. To solve for $x$ in terms of $y$, we just take the square root of both sides, and $x = \sqrt{y}$. The inverse function is $f^{-1}(y) = \sqrt{y}$.

#### Example 3

Let $f: \R \to \R$ be defined by $f(x)=1+2x+3x^3+4x^5+5x^7+6x^9$. Find $f^{-1}$.

**Solution**: The function $f$ always increases as you increase the value of its input $x$, so no two values of $x$ can yield the same output value $f(x)$. The function does indeed have an inverse function; we can run its function machine backward with no problem.

However, we are out of luck when it comes to finding a formula for $f^{-1}$. Although we know that, given a particular value of $y$, there must be exactly one real value of $x$ that satisfies $y=1+2x+3x^3+4x^5+5x^7+6x^9$, we cannot analytically solve that equation for $x$ in terms of $y$.

The fact that we cannot find a formula for $f^{-1}(y)$ doesn't make the function any less valid than the other inverse functions. It is a perfectly well behaved function. We just don't have a nice way to write down what the function looks like in terms of familar looking expressions.

#### Thread navigation

##### Math 1241, Fall 2016

- Previous: The function machine inverse
- Next: Function composition

##### Math 201, Spring 2017

- Previous: The function machine inverse
- Next: Function composition