A puzzle involving inverses

Suppose we have the following two functions:

  • $y = a^x$
  • $x = a^y$

You are told that there is one intersection point. Find this intersection point and the corresponding value of $a$.

Let’s begin by rearranging the second function to get it in terms of $y$: $$ y = \log_a x = \frac{\ln x}{\ln a} $$

Let’s define another function, $f(x)$, do be the difference between these two functions: $ f(x) = a^x - \frac{\ln x}{\ln a}. $ We want to find the zeros of this function as this is where the two functions are equal.

We will do the following to solve for the value of $a$:

  • Obtain an equation by setting $f(x) = 0$.
  • Obtain a second equation by setting $f'(x) = 0$. (We are told there is only one intersection point, and since $f(x)$ consists of the sum of two concave functions, it is concave itself. Therefore, the zero of $f(x)$ occurs when $f(x)$ is also tangent.)

Omitting some of the algebra: $$ \begin{align*} f'(x) &= e^{x \ln a}\ln a - \frac{1}{x\ln a} = 0\newline a^x &= \frac{1}{x(\ln a)^2} \end{align*} $$

And for $f(x) = 0$: $$ \begin{align*} a^x &= \frac{\ln x}{\ln a} \end{align*} $$

Taking the log of the expression from the derivative and doing some substitutions with the previous equation, we obtain something quadratic in $x$: $$ x^2(\ln a)^2 + 2x \ln(\ln a) \ln a = 0 $$

Since there is only one intersection, we must solve for the value of $a$ such that the discriminant (the terms under the square root of the quadratic formula) is zero. We end up obtaining: $$ \begin{align*} \Delta &= (2 \ln(\ln a)\ln a)^2 - 4((\ln a)^2) = 0 \newline (\ln(\ln a))^2 &= 1 \newline \ln(\ln a) &= \pm 1 \end{align*} $$

This has two solutions, $a = e^{1/e}$ and $a = e^e$. However, only one of these solutions works ($a = e^{1/e}$) and the second is just extraneous (introduced through algebra). We can validate that this graphically.

Substituting the value of $a$ into some of the equations above, we see the intersection occurs at $(e,e)$.