TITLE: How to solve $x \log^2x - c=0$?
QUESTION [5 upvotes]: I'm optimizing parameters to an algorithm  to minimize its run time. Substituting some variables to clean up the presentation, I basically need to solve
$x \log^2x -  c=0$, but I forget how to solve an equation of this form.  How can I do this?

REPLY [6 votes]: One can use Lambert's $W$-function to solve this. But keep in mind that for $0<c\leq 4 e^{-2}$ the solution is not unique:

For completeness, the possible solutions are:
$$
\begin{align}
&x=\exp\left[2W_0\left(\pm\frac{\sqrt{c}}{2}\right)\right],\ \exp\left[2W_{-1}\left(\frac{\sqrt{c}}{2}\right)\right] & 0<c\leq 4 e^{-2}\\
&x=\exp\left[2W_0\left(\frac{\sqrt{c}}{2}\right)\right] & 4 e^{-2}<c\\
\end{align}
$$
Where $W_0$ and $W_{-1}$ are the two branches of the $W$ function, as described in the wikipedia link. I don't know what software you use, but there's no need to resort to numerical root finding - the $W$-function is implemented in mathematica, matlab, and C++.

EDIT
Since you asked about the assymptotics, I'll add that for large $c$ we have 
$$x(c)=\exp\left[2W_0\left(\frac{\sqrt{c}}{2}\right)\right]=\mathcal{O}\left(\frac{c}{\log^2 c}\right)\ .$$
Actually the following limit holds exatcly:
$$
\lim_{c\to\infty}\frac{x(c)}{c/\log^2 c}=\lim_{c\to\infty}\frac{\exp\left[2W_0\left(\frac{\sqrt{c}}{2}\right)\right]}{c/\log^2 c}=1
$$
I got this result by playing with mathematica, and I didn't bother proving it.
Note, though, that it takes a very large $c$ to achieve this limit. I give here the plot of this ratio as a function of $c$: