Functions of the form $f(x) = k^x - x^k$ Let $f: \mathbb{R} \rightarrow \mathbb{R},\ f(x) = k^x - x^k$ where $k \in \mathbb{R}$ is a given constant. Currently I am thinking of positive $k$ and positive $x$ because there would be complex numbers or undefined points of $f$ otherwise, but eventually I want to deal with that too. My questions are:


*

*When is $f$ positive? Or negative? Or zero?

*What and where are the local maximum and minimum points of $f$?

*Have these functions been studied in the literature?



Regarding question #1, I have not made much progress. I can see with the aid of a graphing calculator that the function is always positive above a certain $x$, but I cannot find the specific point in general. For example, if $k = 2$, then $x < -0.77 \implies f(x) < 0$ and $x > 4 \implies f(x) > 0$, and $f(x) = 0$ at $x = 2$, $x = 4$, and $x \approx -0.77$ (what is the exact value?).
Regarding question #2, I see that we would have to differentiate $f$. Maybe we will have to differentiate twice to prove that the points we find are local maxima/minima, but I'm not sure because I haven't formally studied calculus. If I'm not mistaken, $\frac{d}{dx} (k^x - x^k) = k^x\ln(x) - kx^{k-1}$ but equating that with 0 is still getting me nowhere.
Regarding question #3, I lament the fact that I cannot directly search the Internet for k^x - x^k.

*

*the signs depend on the solutions of $k^x=x^k$, which cannot be solved by elementary means.


Rewrite $$x=\left(\sqrt[k]k\right)^x=e^{x\ln(k)/k}$$ and set $u=-x\ln(k)/k$. Then
$$e^{-u}=-\frac k{\ln(k)}u,\\
ue^u=-\frac{\ln(k)}k,\\
u=W\left(-\frac{\ln(k)} k\right),\\
x=-\frac k{\ln(k)}W\left(-\frac{\ln(k)} k\right).$$
where $W$ denotes the Lambert function.


*Extrema occur at zeroes of the first derivative,


$$\ln(k)k^x-kx^{k-1}=0.$$
They can be similarly expressed in terms of the Lambert function.


*I doubt they have been specifically studied in the litterature, possibly by lack of applications.

