It seems related to the Lambert-W function $W$, because
$$x = W(xe^x) = W(\exp(\log(x)+x))$$
But I can't quite figure out how to use it here, and neither can Wolfram, REDUCE (Computer Algebra System), or Sympy
It seems related to the Lambert-W function $W$, because
$$x = W(xe^x) = W(\exp(\log(x)+x))$$
But I can't quite figure out how to use it here, and neither can Wolfram, REDUCE (Computer Algebra System), or Sympy
Copyright © 2021 JogjaFile Inc.
I do not think that you could find an analytical solution to the problem and, for a given $y$, you will need a numerical method.
Consider $$f(x)=x+\frac{1}{x}+\frac{1}{2}\log (x)$$ $$f'(x)=1-\frac{1}{x^2}+\frac{1}{2 x}$$ The first derivative cancels at $$x_*=\frac{1}{4} \left(\sqrt{17}-1\right)\implies f(x_*)=\frac{1}{2} \left(\sqrt{17}+\log \left(\frac{1}{4} \left(\sqrt{17}-1\right)\right)\right)\approx 1.93782$$ and this is a minimum.
So, the equation $f(x)=a$ has two solutions provided $a >f(x_*)$, one double solution if $a =f(x_*)$ and no solution if $a <f(x_*)$.
In the case where two roots exist, they will be such that $0 < x_1 < x_*$ and $a < x_2 < \infty$.
Newton method will work just as a charm for the largest root since the function is almost linear.
For the smallest root, to make life easier, I would suggest to set $x=\frac 1y$ and to solve for $y$ $$g(y)=y+\frac{1}{y}-\frac{1}{2}\log (y)=a$$
Edit
As said, Newton method will work very fine and will require very few iterations to converge.
To show it, let us make one single iteration starting using $x_0=y_0=a$. The first iterates are given by $$x_1=\frac{a \left(2 a^2+a-a \log (a)-4\right)}{2 a^2+a-2} \qquad \qquad y_1=\frac{a \left(2 a^2-a+a \log (a)-4\right)}{2 a^2-a-2}$$
The table below shows, for a few values of $a$, the first iterate and the exact solution. $$\left( \begin{array}{ccccc} a & x_1 & x_{sol} & y_1 & y_{sol} \\ 3 & 2.16382 & 2.15212 & 3.29904 & 3.29197 \\ 4 & 3.11233 & 3.11108 & 4.54541 & 4.53548 \\ 5 & 4.05215 & 4.05351 & 5.70316 & 5.69409 \\ 6 & 4.99338 & 4.99555 & 6.82036 & 6.81260 \\ 7 & 5.93835 & 5.94075 & 7.91404 & 7.90744 \\ 8 & 6.88743 & 6.88984 & 8.99224 & 8.98659 \\ 9 & 7.84038 & 7.8427 & 10.0594 & 10.0546 \\ 10 & 8.79683 & 8.79903 & 11.1184 & 11.1141 \\ 11 & 9.75639 & 9.75846 & 12.1709 & 12.1672 \\ 12 & 10.7187 & 10.7206 & 13.2183 & 13.2150 \end{array} \right)$$
We could even do better making one single iteration of Halley method starting using again $x_0=y_0=a$. The first iterates are given by $$x_1=\frac{8 a^4+8 a^3-22 a^2-(4 a+1) a^2 \log (a)-10 a+8}{8 a^3+8 a^2-14 a+(a-4) \log (a)-6}$$ $$y_1=\frac{8 a^4-8 a^3-22 a^2+(4 a-1) a^2 \log (a)+10 a+8}{8 a^3-8 a^2-14 a+(a+4) \log (a)+6}$$ and get the following results $$\left( \begin{array}{ccccc} a & x_1 & x_{sol} & y_1 & y_{sol} \\ 3 & 2.15764 & 2.15212 & 3.29122 & 3.29197 \\ 4 & 3.11233 & 3.11108 & 4.53421 & 4.53548 \\ 5 & 4.05384 & 4.05351 & 5.69296 & 5.69409 \\ 6 & 4.99559 & 4.99555 & 6.81169 & 6.81260 \\ 7 & 5.94069 & 5.94075 & 7.90672 & 7.90744 \\ 8 & 6.88974 & 6.88984 & 8.98602 & 8.98659 \\ 9 & 7.84259 & 7.84270 & 10.0541 & 10.0546 \\ 10 & 8.79892 & 8.79903 & 11.1138 & 11.1141\\ 11 & 9.75835 & 9.75846 & 12.1669 & 12.1672 \\ 12 & 10.7205 & 10.7206 & 13.2147 & 13.2150 \end{array} \right)$$
For sure, the successive derivatives being very simple, we could continue this process using higher order iterations. For example, for the case where $a=3$, one single iteration of Houselholder method would lead to $x_1=2.15277$ and $y_1=3.29197$. Going further, the almost exact solutions would be obtained analytically.