about $3^x+x^3=0$ and other non-trivial equations like this I was having math class (10th grade) and we were learning about exponential equations, pretty easy, but then i wondered about some mixed equations, like $3^x+x^3=0$.
I couldn't solve it, so I looked up the answer in wolfram alpha, and it turned out to be $-\frac{3W\left(\frac{ln(3)}{3}\right)}{ln(3)}$ (where W(x) is the lambert W function, defined as $W(x)=y\space\space\Rightarrow\space\space ye^y=x$). Since the answer looked pretty weird I just wanted to prove that it was correct myself (for curiosity), and the "proof" was like this: (jump to the last paragraph if you're not interested lol)
$3^{-\frac{3W\left(\frac{ln(3)}{3}\right)}{ln(3)}}+\left(-\frac{3W\left(\frac{ln(3)}{3}\right)}{ln(3)}\right)^3=0$
$\frac{1}{3^{\frac{3W\left(\frac{ln(3)}{3}\right)}{ln(3)}}}=-\left(-\frac{3W\left(\frac{ln(3)}{3}\right)}{ln(3)}\right)^3$
$\sqrt[3]{\frac{1}{3^{\frac{3W\left(\frac{ln(3)}{3}\right)}{ln(3)}}}}=\frac{3W\left(\frac{ln(3)}{3}\right)}{ln(3)}$
$\frac{1}{3^{\frac{W\left(\frac{ln(3)}{3}\right)}{ln(3)}}}=\frac{3W\left(\frac{ln(3)}{3}\right)}{ln(3)}$
$3^{\frac{W\left(\frac{ln(3)}{3}\right)}{ln(3)}}=\frac{ln(3)}{3W\left(\frac{ln(3)}{3}\right)}$
$3^{\frac{W\left(\frac{ln(3)}{3}\right)}{ln(3)}}=\frac{\frac{ln(3)}{3}}{W\left(\frac{ln(3)}{3}\right)}$
and from the very definition of the lambert W function, we can conclude that, $\frac{x}{W(x)}$ can be simplified down to $e^{W(x)}$, leading to:
$3^{\frac{W\left(\frac{ln(3)}{3}\right)}{ln(3)}}=e^{W\left(\frac{ln(3)}{3}\right)}$
which can be, finally, simplified down to $e^{W\left(\frac{ln(3)}{3}\right)}=e^{W\left(\frac{ln(3)}{3}\right)}$ (even though the lambert W function can have some inconsistencies at negative values, we can ignore that since $\frac{ln(3)}{3}$ is positive)
this proof can also be quite easily extended to any equation in the form $a^x+x^b=0$, where $a$ is real and $b$ is an even integer
But my question really is, how could one find the exact solution of this equation from scratch? Can this method be extended for other non-trivial equations like this? (e.g. $2^x-x^x+x^5=0$, to which not even wolfram alpha can determine the exact solution)
 A: What one does is try to produce a term $ze^z$ somehow.  To that end, write
$$a^x+x^b=0\tag1$$
as $a^x=-x^b$, take $b$-th root to get $a^{x/b} = -x$ and then divide both side by $a^{x/b}$:
$$1=-x a^{-x/b}= -x\exp \big(-\frac xb \ln a\big)$$
In a last step, multiply with $\ln(a) / b$ so that the exponent appears also as a factor of exp:
$$\frac1b \ln a= -\frac xb \ln a\cdot\exp \big(-\frac xb \ln a\big)$$
so now we can apply Lambert-$W$:
$$W\left(\frac1b \ln a\right)= -\frac xb \ln a$$
and finally solve for $x$:
$$x = -\frac b{\ln a}W\left(\frac1b \ln a\right) \tag2$$
When does this solution make sense?

*

*In the first step we took $b$-th root under the assumption that $b$ is odd, i.e. $b$ can be represented as $b=n/m$ where $n$ and $m$ are odd integers.  As $a^x > 0$, we must have $x^b<0$ for (1) to have a solution.  This means $x<0$ and $b$ is odd.


*Taking log requires $a>0$ and also $a\neq 1$ as we divide by $\ln a$.


*The function $z\mapsto ze^z$ is not injective, and when $ze^z=w\in(-1/e,0)$ then there are two (real) solutions $z$ for each $w$.  This is accounted for by different branches of $W$:

*

*If $\ln(a)/b\in[-1/e,\infty)$, then $W_0$ contributes a solution.


*If $\ln(a)/b\in[-1/e,0)$, then $W_{-1}$ contributes a solution.
For example, with $a=0.3$ and $b=11/3$ there are 2 real solutions of (1).
