Inverting rational functions
Consider these questions concerning inverting rational functions
Problem
In this problem use the definition that a rational function is any function which can be written as the ratio of two polynomial functions.
Consider these two rational functions
$$
f(x)=\frac{2x+9}{x+2}\quad\quad g(x)=\frac{9-2x}{x-2}
$$
Show that they are inverses of each other, in that
$$
g(f(x))=f(g(x))=x
$$
What happens for the values $x=\pm 2$?
Can you invert the rational function
$$
h(x)=\frac{x-7}{2x+1}
$$
Do rational functions always have inverse functions? Why?
In the examples given here, the inverses of our rational functions were also rational functions. Will this be the case more generally? Why not explore more generally or try to find inverse pairs of rational functions?
As you consider these rational functions, many questions might emerge in your mind such as: "do rational functions have fixed points?" or "Is there a relationship between the asymptotes in a function and the zeroes of its inverse?". Why not make a note of these questions and ask your teacher, yourself or your friends to try to solve them?
Student Solutions
One of our most prolific solvers, Patrick from Woodbridge School, sent in his thoughts on this problem
To invert a function, $f(x)$, the following procedure is used: say
$$f(x) = \frac{2x+9}{ x+2}$$
then the graph is
$$y = \frac{2x+9}{x+2}$$
It is inverted by replacing $x$ with $y$, and $y$ with $x$:
$$
x = \frac{2y + 9}{y + 2}
$$
and rearranging gives
$$
y = \frac{9-2x}{x-2}$$
Thus
$$g(x) = \frac{9-2x}{x-2}$$
However, for values $x = \pm 2$, we have a denominator $0$ in one of the fractions, so these must be excluded from the domain of the functions.
For
$$
y= \frac{x-7}{2x+1}
$$
To invert this put
$$
x = \frac{y-7}{2y+1}
$$
Rearrange:
$$
2xy + x - y = -7\,\quad y(2x-1) = -7-x\, \quad y = -\frac{x+7}{2x-1}
$$
Thus, the inverse of $h$ is
$$
k(x) = -\frac{x+7}{2x-1}
$$
The procedure used by Patrick can be used to invert more general rational functions as follows
$$
f(x)= \frac{ax+b}{cx+d}\quad\mbox{has inverse}\quad g(x)=\frac{b-dx}{cx-a}
$$
To check this properly, consider
$$
f(g(x))=\frac{a\left(\frac{b-dx}{cx-a}\right)+b}{c\left(\frac{b-dx}{cx-a}\right)+d}
$$
This reduces to
$$
f(g(x)) = \frac{a(b-dx)+b(cx-a)}{c(b-dx)+d(cx-a)}=\frac{(bc-ad)x}{bc-ad}
$$
Which cancels to $x$, provided that $bc-ad \neq 0$. The same holds for $g(f(x))$.
We can also consider the generalisation to rational functions involving quadratics.
Some progress can be made, in that if
$$
y = f(x) = \frac{P(x)}{Q(x)}
$$
then you might try to construct the inverse using the idea that $x\leftrightarrow y$, corresponding to reflecting the graph in the line $x=y$ so that
$$
x = \frac{P(y)}{Q(y)}
$$
Rearranging gives
$$
Q(y)x = P(y)
$$
This is a polynomial equation in $y$ of degree equal to the maximum of the degree of $P$ and $Q$.
However, a unique solution will only typically follow if $P(y)$ and $Q(y)$ are linear, and in general no algebraic solution will exist. Moreover, for the inverse to be unique, the function $f(x)$ must be one-to-one, which will not be the case for anything but linear rational functions.
Teachers' Resources
Why do this problem?
Students will have met the concept of an inverse function, at least informally. This problem will help to extend their understanding in cases where a function and its inverse are less intuitive. It will help them to consolidate the characteristics and limitations of inverse functions and think more deeply about rational functions in particular.
Possible approach
Students could start by listing examples of pairs of inverse functions. They may start with very simple examples such as $y=x+5$ and $y=x-5$ or they may think of functions which are defined as the inverse of another function such as $y=\sin x$ and $y=\arcsin x$ or $y=e^x$ and $y=\ln x$. They may also use function notation- or it could be suggested- and the relative merits of using $y$ and $f(x)$ could be discussed. Encourage students to generate more complicated pairs of inverse functions and challenge any suggestions which may not be inverse functions without first restricting the domain such as $y=x^2$ and $y=\sqrt x$.
Consider some of the properties of the suggested inverse function pairs- what are the domain and range in each case? How are the graphs related? What happens when we compose a function with its inverse? Does the order matter?
Produce one of the two functions from the problem. Can students tell what its inverse is by looking at it? How could they go about finding its inverse? Reveal the other function. How can you verify that this is the inverse function? Consider whether these functions are defined for all real values of $x$.
Student may go on to create further pairs of rational functions which are inverse of one another, perhaps even generalising their results. They may also explore the relationships between the graphs of their functions using graphing software like Desmos or Geogebra.
Key questions
Name a function and its inverse. (And another. And another...)
How do you know that one function is the inverse of the other?
How are the graphs of inverse functions related?
How could you go about finding a function's inverse?
Will the result always be a function? Will it be a function of the same type?
Possible support
The process of inverting a function can be likened to solving an equation. Issues such as considering both positive and negative square roots may help students to appreciate why not all results of swapping $y$ and $x$ are functions. Using graphing software throughout can also help with visualisation.
Possible extension
Students can be encouraged to generalise their results for rational fractions with linear numerator and denominator. They could also consider numerators and denominators of other degrees.