# Difference between revisions of "1997 AIME Problems/Problem 12"

## Problem

The function $f$ defined by $f(x)= \frac{ax+b}{cx+d}$, where $a$,$b$,$c$ and $d$ are nonzero real numbers, has the properties $f(19)=19$, $f(97)=97$ and $f(f(x))=x$ for all values except $\frac{-d}{c}$. Find the unique number that is not in the range of $f$.

## Solution

### Solution 1

First, we use the fact that $f(f(x)) = x$ for all $x$ in the domain. Substituting the function definition, we have $\frac {a\frac {ax + b}{cx + d} + b}{c\frac {ax + b}{cx + d} + d} = x$, which reduces to $$\frac {(a^2 + bc)x + b(a + d)}{c(a + d)x + (bc + d^2)} =\frac {px + q}{rx + s} = x.$$ In order for this fraction to reduce to $x$, we must have $q = r = 0$ and $p = s\not = 0$. From $c(a + d) = b(a + d) = 0$, we get $a = - d$ or $b = c = 0$. The second cannot be true, since we are given that $a,b,c,d$ are nonzero. This means $a = - d$, so $f(x) = \frac {ax + b}{cx - a}$.

The only value that is not in the range of this function is $\frac {a}{c}$. To find $\frac {a}{c}$, we use the two values of the function given to us. We get $2(97)a + b = 97^2c$ and $2(19)a + b = 19^2c$. Subtracting the second equation from the first will eliminate $b$, and this results in $2(97 - 19)a = (97^2 - 19^2)c$, so $$\frac {a}{c} = \frac {(97 - 19)(97 + 19)}{2(97 - 19)} = 58 .$$

Alternatively, we could have found out that $a = -d$ by using the fact that $f(f(-b/a))=-b/a$.

### Solution 2

First, we note that $e = \frac ac$ is the horizontal asymptote of the function, and since this is a linear function over a linear function, the unique number not in the range of $f$ will be $e$. $\frac{ax+b}{cx+d} = \frac{b-\frac{cd}{a}}{cx+d} + \frac{a}{c}$. Without loss of generality, let $c=1$, so the function becomes $\frac{b- \frac{d}{a}}{x+d} + e$.

(Considering $\infty$ as a limit) By the given, $f(f(\infty)) = \infty$. $\lim_{x \rightarrow \infty} f(x) = e$, so $f(e) = \infty$. $f(x) \rightarrow \infty$ as $x$ reaches the vertical asymptote, which is at $-\frac{d}{c} = -d$. Hence $e = -d$. Substituting the givens, we get

\begin{align*} 19 &= \frac{b - \frac da}{19 - e} + e\\ 97 &= \frac{b - \frac da}{97 - e} + e\\ b - \frac da &= (19 - e)^2 = (97 - e)^2\\ 19 - e &= \pm (97 - e) \end{align*}

Clearly we can discard the positive root, so $e = 58$.

### Solution 3

We first note (as before) that the number not in the range of $$f(x) = \frac{ax+b}{cx+ d} = \frac{a}{c} + \frac{b - ad/c}{cx+d}$$ is $a/c$, as $\frac{b-ad/c}{cx+d}$ is evidently never 0 (otherwise, $f$ would be a constant function, violating the condition $f(19) \neq f(97)$).

We may represent the real number $x/y$ as $\begin{pmatrix}x \\ y\end{pmatrix}$, with two such column vectors considered equivalent if they are scalar multiples of each other. Similarly, we can represent a function $F(x) = \frac{Ax + B}{Cx + D}$ as a matrix $\begin{pmatrix} A & B\\ C& D \end{pmatrix}$. Function composition and evaluation then become matrix multiplication.

Now in general, $$f^{-1} = \begin{pmatrix} a & b\\ c&d \end{pmatrix}^{-1} = \frac{1}{\det(f)} \begin{pmatrix} d & -b \\ -c & a \end{pmatrix} .$$ In our problem $f^2(x) = x$. It follows that $$\begin{pmatrix} a & b \\ c& d \end{pmatrix} = K \begin{pmatrix} d & -b \\ -c & a \end{pmatrix} ,$$ for some nonzero real $K$. Since $$\frac{a}{d} = \frac{b}{-b} = K,$$ it follows that $a = -d$. (In fact, this condition condition is equivalent to the condition that $f(f(x)) = x$ for all $x$ in the domain of $f$.)

We next note that the function $$g(x) = x - f(x) = \frac{c x^2 + (d-a) x - b}{cx + d}$$ evaluates to 0 when $x$ equals 19 and 97. Therefore $$\frac{c x^2 + (d-a) x - b}{cx+d} = g(x) = \frac{c(x-19)(x-97)}{cx+d}.$$ Thus $-19 - 97 = \frac{d-a}{c} = -\frac{2a}{c}$, so $a/c = (19+97)/2 = 58$, our answer.

### Solution 4

Any number that is not in the domain of the inverse of $f(x)$ cannot be in the range of $f(x)$. Starting with $f(x) = \frac{ax+b}{cx+d}$, we rearrange some things to get $x = \frac{b-f(x)d}{f(x)c-a}$. Clearly, $\frac{a}{c}$ is the number that is outside the range of $f(x)$.

Since we are given $f(f(x))=x$, we have that $$x = \frac{a\frac{ax+b}{cx+d}+b}{c\frac{ax+b}{cx+d}+d} = \frac{a^2x +ab+bcx+bd}{acx+bc+cdx+d^2} = \frac{x(bc+a^2)+b(a+d)}{cx(a+d)+(bc+d^2)}$$ $$cx^2(a+d)+x(bc+d^2) = x(bc+a^2) + b(a+d)$$ All the quadratic terms, linear terms, and constant terms must be equal on both sides for this to be a true statement so we have that $a = -d$.

This solution follows in the same manner as the last paragraph of the first solution.