# Solving the equation $\frac{\ln (x)}{\ln (1-x)} = \frac{1}{x} - 1$

I'm trying to solve the following equation (which has solution $$x = 1/2$$)

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

I can't seem to do it analytically. Any ideas?

• Sidenote: It can relatively easily be shown that this is equivalent to solving $x^x=\left(1-x\right)^{\left(1-x\right)}$ but I'm not sure if that leads anywhere. – Jam Dec 7 '18 at 13:58

Let $$f(x)=x \ln x$$. Then the given equation is $$f(x)=f(1-x).$$ This is symmetric about $$x=1/2$$. Hence $$x=1/2$$ is a solution.

• Very nice solution! – user Dec 7 '18 at 8:17
• I think this is insufficient. Proving that $x=\dfrac12$ is a solution is easy. Proving that it is the only solution is not as easy, but I can see that one may approach it by showing that $$f(x)-f(1-x)<0\text{ for all }x\text{ such that }0<x<\frac12\,,$$ and by symmetry $$f(x)-f(1-x)>0\text{ for all }x\text{ such that }\frac12<x<1\,.$$ – Batominovski Dec 7 '18 at 8:41
• Yep, IMO too many upvotes as the existence of other solutions should be discussed. – Yves Daoust Dec 7 '18 at 12:53

The function $$x\log x-(1-x)\log(1-x)$$ is only defined in $$(0,1)$$, is differentiable, has a root at $$x=\frac12$$ (by inspection) and tends to zero at the interval endpoints.

The derivative,

$$\log x+\log(1-x)+2$$ has two roots in $$(0,1)$$, where $$x(1-x)=e^{-2}$$.

Hence the function is negative in $$(0,\frac12)$$, with a single minimum, and positive in $$(\frac12,1)$$, with a single maximum, and there are no other roots.

Let $$g:I\to\mathbb{R}$$, where $$I:=\left[-\dfrac12,+\dfrac12\right]$$, be the function defined by $$g(t):=\begin{cases}\left(\dfrac{1}{2}+t\right)\,\ln\left(\dfrac12+t\right)-\left(\dfrac{1}{2}-t\right)\,\ln\left(\dfrac12-t\right)&\text{if }t\in\left(-\dfrac12,+\dfrac12\right)\,,\\0&\text{if }t\in\left\{-\dfrac12,+\dfrac12\right\}\,.\end{cases}$$ (Observe that $$g$$ is continuous on the whole $$I$$, and is smooth on $$\left(-\dfrac12,+\dfrac12\right)$$.) Then, we are to solve for $$x\in(0,1)$$ from $$g\left(x-\dfrac12\right)=0\,,$$ which is equivalent to solving for $$y\in \left(-\dfrac12,+\dfrac12\right)$$ such that $$g(y)=0\text{ by setting }y:=x-\dfrac12\,.$$

We claim that $$g$$ has only three roots $$-\dfrac12,0,+\dfrac12$$, and this means the only $$y\in\left(-\dfrac12,+\dfrac12\right)$$ such that $$g(y)=0$$ is $$y=0$$, making $$x=\dfrac12$$ the sole solution to the required equation. Suppose contrary that $$g$$ has more than three roots. Then, by symmetry, on the interval $$\left[0,\dfrac12\right]$$, $$g$$ has at least three roots. Using Rolle's Theorem, $$g'$$ has at least two roots on $$\left(0,\dfrac12\right)$$, and so $$g''$$ has at least one root on $$\left(0,\dfrac12\right)$$. However, we have $$g'(t)=\ln\left(\frac12+t\right)+\ln\left(\frac12-t\right)+2\,,$$ $$g''(t)=\frac{1}{\frac{1}{2}+t}-\frac{1}{\frac{1}{2}-t}\,,$$ and $$g'''(t)=-\frac{1}{\left(\frac{1}{2}+t\right)^2}-\frac{1}{\left(\frac12-t\right)^2}<0$$ for all $$t\in\left(0,\dfrac12\right)$$, which is a contradiction we seek.