Using standard mathematical functions, find the all real roots of the equation: $$x^{1/x}\ln x^2=x.$$
I saw this question in the group of students studying mathematics. I tried to solve the equation with Lambert $W$ function but failed.
My attempt:
$$x^{1/x}\ln x^2=x\\ 2x^{1/x}\ln x=x$$
I tried the substitution $x=e^t$, then the equation become to
$$2te^{te^{-t}}=e^t$$
Now, how can I proceed?
Here is the Wolfram plot:
We have exactly $2$ real roots.
$$x ≈ 3.78195504319282$$
and
$$x ≈ 2.07412734548219$$

I do not think that we could have explicit solutions for the roots.
However, if you notice that the maximum of the function is at $x=e$, for an approximation, perform a series expansion.
You should have $$x^{\frac{1}{x}-1} \log \left(x^2\right)-1=\left(2 e^{\frac{1}{e}-1}-1\right)-e^{\frac{1}{e}-4} (1+e) (x-e)^2+O\left((x-e)^3\right)$$ Solving the quadratic gives $$x=e \pm \sqrt{ \frac{2 e^3-e^{4-\frac{1}{e}}}{1+e}}$$ that is to say $1.9185$ and $3.518$.
Now, polish the roots using Newton method.
Edit
In terms of approximation, we could have better building the $[2,n]$ Padé approximant of the lhs. So, to stay with quadratics, solve for $x$ $$1=\frac {a_0+a_1\,(x-e)+a_2\,(x-e)^2}{1+b_1\,(x-e)+b_2\,(x-e)^2}$$ where $$a_0=2 e^{\frac{1}{e}-1}\qquad a_1=\frac{10}{3} e^{\frac{1}{e}-2}\qquad a_2=\frac{e^{\frac{1}{e}-4} \left(-9+4 e+4 e^2\right)}{18 (1+e)}$$ $$b_1=\frac{5}{3 e}\qquad b_2=\frac{9+40 e+22 e^2}{36 e^3 (1+e)}$$ This gives $2.07430$ and $3.78243$.
Edit
After what I wrote in comments, as Snoopy uses to say :"Guess what ? I am happy" to have been wrong.
After @Bob Dobbs's nice answer, then the roots are $$x_1=\exp\Bigg[-W_0\left(-W_0\left(\frac{1}{2}\right)\right) \Bigg]=2.07413$$ $$x_2=\exp\Bigg[-W_{-1}\left(-W_0\left(\frac{1}{2}\right)\right) \Bigg]=3.78196$$