16
$\begingroup$

I was playing around with the functions $2^x$ and $\log_2(x)$. As they are the inversions of each other, I thought there was a simple number $a$ for which $2^x - a$ touches $\log_2(x)$.

Using trial-and-error, for $a = 2$ looked like the functions just touched each other, but on closer inspection they did cross each other: at $x = 1$ and at approximately $x = 1.04759$.

exponential and logarithm tangency

Zoomed in:

close-up of tangency

Is there an exact solution to $a$ for which $2^x - a$ touches $\log_2(x)$? With "touches" I mean that they just touch each other, like a tangent does to a function.

2 Answers 2

15

If the graphs "just touch", then the tangents are parallel. So you want (2^x - a)' = (\log_2 x)' This leads to $(\ln 2)2^x = \frac{1}{(\ln 2)x}$ or $x2^x = (\ln 2)^{-2}$.

Since $y= x2^x$ is strictly increasing on $(0,\infty)$ (the derivative is $2^x(1+x\ln 2)$), has $\lim\limits_{x\to 0^+}x2^x = 0$ and $\lim\limits_{x\to \infty}x2^x = \infty$, there is one and only one value of $x$ where the equality holds.

So there is one and only one value of $x$ where the tangents of $y=2^x-a$ and $y = \log_2 x$ are parallel. Picking $a$ to equal the value of $\log_2(x)$ at the point $x$ in which this holds, which is the unique solution to $x2^x = (\ln 2)^{-2}$, gives the unique solution.

The solution to $x2^x = (\ln 2)^{-2}$ can be "obtained" by using the Lambert $W$ function.

Since $x2^x = xe^{x\ln 2}$, we can rewrite the equation as $(x\ln 2)e^{x\ln 2} = \frac{1}{\ln 2}$. Since $W(1/\ln 2)$ is the value $k$ such that $ke^k = \ln 2$, we conclude that $x = \frac{1}{\ln 2}W\left(\frac{1}{\ln 2}\right)$ is where $x2^x = (\ln 2)^{-2}$.

So this is the value of $x$ at which $y = 2^x - a$ (for any $a$) and $y=\log_2(x)$ have parallel tangents. We want to pick $a$ so that the two functions have the same value as well, so we want $2^x - a = \log_2(x)$; that is $a = 2^{\frac{1}{\ln 2}W(\frac{1}{\ln 2})} - \log_2\left(\frac{1}{\ln 2}W\left(\frac{1}{\ln 2}\right)\right) = 2^{\frac{W(1/\ln 2)}{\ln 2}} - \log_2W\left(\frac{1}{\ln 2}\right) + \log_2(\ln 2).$

The values of $a$ and $x$ are $\begin{align*} a&\approx 1.9993335366784208872185237594934841819876651500164506943525\ldots\\\ x&\approx 1.0237165016039817739129111076311195719147116014095574420368\ldots. \end{align*}$

  • 1
    It is amusing that $a$ is very close to, but not equal to, 2.2011-08-06
-2

...and it's about 2.00971; so, you were pretty close, pimvdb

  • 0
    Actually, it is 1.999333536678 according to WolframAlpha (http://tinyurl.com/693fk3k).2011-03-21