[Math] Graph of the function $x^y = y^x$, and $e$ (Euler’s number).

graphing-functionslambert-w

Earlier, I was using the Desmos Graphing Calculator, and I wanted to remind myself of what the graph of the function $x^y = y^x$ looked like.

If you have never seen what it looks like before, it is similar to the shape of the Greek letter, psi (ψ); composed of two graphs:

  • $y = x$
  • I am unsure as to what the equation of this graph is equal to, but I would say that it is similar in shape to the graph of $y = \frac{1}{x}$, but much steeper.

However, what I do know is that these two graphs intercept each other at the point $(e, e)$, where $e$ is Euler's number.

Please, if you could, check it out for yourself, but my question is, why is Euler's number related to this graph?

Edit:
I believe, upon further inspection, that it is related to Euler's number due to the fact that $x^y = e^{x \ln y}$, and, therefore, $y^x = e^{y \ln x}$.

Due to this fact, we can take the natural logarithm of both sides of the equation $e^{x \ln y} = e^{y \ln x}$, in order to get that $x \ln y = y \ln x$.

I do not know how to continue with this explanation, but my new question is, what is the equation of the graph that I could not work out?

Thank you, and good luck!

Best Answer

For a given $y>0$, the equation $x\ln(y) = y\ln(x)$ is equivalent to $\ln(x)/x=\ln(y)/y$.

Here is the graph of the function $f(x)=\displaystyle\frac{\ln(x)}{x}$.

function graph

The function has a global maximum at $x=e$.

If $y\leq 1$, then $f(y)\leq0$ and the equation has only one solution: $x=y$.

If $y>1$, then $f(y)>0$ and $y\neq e$ and the equation has two solutions (you can see that an horizontal line will cut the graph of the function at two points, unless $y=e$, in which case the "two" solutions become equal.)

If $y=e$, then $x=e$ (This is the point where your two graphs intersect.)

I don't think there is a closed form for your second graph (that is, using only elementary functions.) But you can use the Lambert W function to get something close enough.

The Lambert W functions $(W_k)_{k \in \mathbb Z}$ are the solutions of the equation: $$\forall k \in \mathbb Z:\forall x\in \mathbb R: W_k(x)e^{W_k(x)}=x$$ If we want real valued solutions (which we do, here), then we need only $W_0$ and $W_{-1}$.

We have:

$$\frac{1}{x}\ln(x)=\frac{1}{y}\ln(y)$$ $$\frac{1}{x}\ln(\frac{1}{x})=\frac{1}{y}\ln(\frac{1}{y})$$ $$\ln(\frac{1}{x})e^{\ln(\frac{1}{x})}=\ln(\frac{1}{y})e^{\ln(\frac{1}{y})}$$ Therefore:

$$\ln(\frac{1}{y})=W_0(\frac{1}{x}\ln(\frac{1}{x}))\text{ or } \ln(\frac{1}{y})=W_{-1}(\frac{1}{x}\ln(\frac{1}{x}))$$

$$y=e^{-W_0(\frac{1}{x}\ln(\frac{1}{x}))}\text{ or } y=e^{-W_{-1}(\frac{1}{x}\ln(\frac{1}{x}))}$$

We simplify it a little to get the final result:

$$y=-\frac{xW_{0}(\frac{-\ln(x)}{x})}{\ln(x)}\text{ or } y=-\frac{xW_{-1}(\frac{-\ln(x)}{x})}{\ln(x)}$$

This gives us two graphs.

The first graph

The second graph

A superposition of the two graphs gives us the one you saw initially.

Superposition

Related Question