I’m having trouble solving this type of equations:
$y^{x} = k + x$
Where $x$ is the only unknown variable. I’ve tried substituting variables and all kind of things but I can never get to the answer.
The only way I’ve been able to solve for $x$ is by plotting $y^x$on a graph and plotting $k + x$ on the same graph and seeing where they intersect.
I’m trying to find a way of doing this without the need to draw it on a graph, if anyone has got any idea I’ll greatly appreciate it.
Lambert W function reduces the transcendental equation $$Xe^X=Y$$ to $$X=W_n(Y),$$ where $n$ is the $n$th branch of $W$.
We use $W_n(\cdot)$ to solve this equation: \begin{align*} y^x&=k+x\\ e^{x\cdot\ln y}&=k+x\\ 1&=(k+x)e^{-x\cdot\ln y}\\ -e^{-k}\ln y&=\big(\color{blue}{(-k-x)\ln y}\big)\cdot e^{\color{blue}{(-k-x)\ln y}}\\ W_n(-e^{-k}\ln y)&=\color{blue}{(-k-x)\ln y}\\ x&=-\frac{W_n(-e^{-k}\ln y)}{\ln y}-k. \end{align*}
Comment:
In line 4, we multiply $-e^{-k}\ln y$ on both sides (so as to transform to the form $Y=Xe^X$, where $X=\color{blue}{(-k-x)\ln y}$).
In line 5, we use the property of $W$ function, i.e. $$Y=Xe^X\implies W_n(Y)=X.$$