# How to solve $\ln(x) = 3\left(1-\frac{1}{x}\right)$?

I have been working for this problem for a while:

$$\ln(x) = 3\left(1-\frac{1}{x}\right)$$

and by graphing, plugging and chugging values and rigorously doing the math, I can clearly see that one of the values that satisfy this condition is $$x = 1$$.

However, when I put this into wolfram alpha and Desmos, I see two answers, one that is $$x = 1$$ and another one that is approximately $$16.801$$.

It is expressed by the Lambert W Function. I solved for $$x = 1$$ by using the Lambert W function. I cannot find any way to solve for the latter solution: $$16.801$$.

Is there anyone that could elaborate for me how to solve for it? Thank you.

My method to get $$x=1$$: \begin{align}\ln(x) = 3\left(1-\frac{1}{x}\right)\:&\Longrightarrow\:x=e^3e^{-\frac{3}{x}}\\&\Longrightarrow\:e^{-3}=\frac{1}{x}e^{-\frac{3}{x}}\\&\Longrightarrow\:-3e^{-3}=-\frac{3}{x}e^{-\frac{3}{x}}\end{align}

Applying Lambert W Function, which does the following: $$W(ae^a) = a$$:

$$-3 = -3/x \Longleftrightarrow x=1$$

$$-3e^{-3}=(-3/x)e^{-3/x}$$ as a graph

The Lambert W function has two real valued branches when x is between -1/e and 0 exclusive, which means it is not a function in this particular case because it is not 1-1. However, if you apply the other branch of the function you will get the other value ~16.801.

• Hi D P! Thank you for helping, now I understand. I just had to take the other branch of the function to get the other solution. Thank you!
– SMK
Commented Feb 21 at 10:46

You correctly found : $$-3e^{-3} = (-3/x) e^{-3/x}$$ Of course an obvious first solution is $$x=1$$ .

Using the LambertW function : $$x\,e^x=a \quad\implies\quad x=W(a)$$

$$W(a)e^{W(a)}=a\quad\text{or equivalently}\quad x=W(x\,e^x)$$ Thus $$\begin{cases} a=-3e^{-3}\\ W(a)=-\frac{3}{x} \end{cases}$$ The solution is :$$\quad x=-\frac{3}{W(a)}$$ $$x=-\frac{3}{W(-3e^{-3})}\simeq 16.801016$$ Note :

The LambertW function is a multivalued function. The two real branches are noted $$W_0(X)$$ and $$W_{-1}(X)$$.

The above result corresponds to the branch $$W_0$$ which is commonly simply noted $$W(X)$$.

The second branch gives : $$x=-\frac{3}{W_{-1}(-3e^{-3})}=1.$$