Solving an equation that contains a logarithm

I have the follwing equation:

$$y=\frac 1 4x^2 -\frac 1 2 \ln{x}$$

How can $x$ be expressed in terms of $y$?

• This isn't possible in terms of elementary functions. – user217285 Jul 4 '15 at 5:26
• what is your question write it correctly – absolute friend Jul 4 '15 at 5:28
• I was not satisfied with the formulation of the problem. My English is not very good, but I think 'express' is an appropriate term . If it not, please ´help tofind the right word. – miracle173 Jul 4 '15 at 5:42
• This is decreasing from $0$ to $1$, then increasing, In general there will be two $x$ for every $y$. And, as has already been observed, we cannot solve using elementary functions. – André Nicolas Jul 4 '15 at 5:54

We have

$$y=\frac14 x^2-\frac12 \log x\tag 1$$

Multiplying $(1)$ by $-4$ yields

\begin{align} -4y&=- x^2+2 \log x\\\\ &=-x^2+\log x^2 \tag 2\\\\ \end{align}

Now, exponentiating both sides of $(2)$ and multiplying by $-1$ reveals that

$$-e^{-4y}=-x^2e^{-x^2} \tag 3$$

from which we find that

$$x=\sqrt{-W(-e^{-4y})}$$

where $W(z)$ is the Lambert W Function. Note we rejected negative values of $x$ since in $(1)$ we have $\log x$.

We must have $W\le 0$ and $-e^{-4y}\ge -e^{-1}\implies y\ge \frac14$.

• You are too fast for the old man ! Cheers :-) – Claude Leibovici Jul 4 '15 at 6:13
• @ClaudeLeibovici Well ... I might be close to you there ... and slow. Plus 3 days out of surgery!! – Mark Viola Jul 4 '15 at 6:15
• I wish you a prompt recovery ! – Claude Leibovici Jul 4 '15 at 6:20
• @ClaudeLeibovici Thank you!! Forth surgery in a year and the second in 4 months. – Mark Viola Jul 4 '15 at 6:21

As said in comments, the solution of equation $$\frac 1 4x^2 -\frac 1 2 \ln{x}-y=0$$ cannot be expressed in terms of elementary functions.

However, there are explicit solutions in terms of Lambert function. Chenging variable $x^2=t$, the equation write $$t-\log(t)-4y=0$$ and the solution is $$t=-W\left(-e^{-4 y}\right)$$

You must notice that $y'=\frac{x}{2}-\frac{1}{2 x}$ cancels at $x=1$ and, at this point $y=\frac 14$ and the second derivative is always positive. So, if $y<\frac 14$, there is no real root; if $y=\frac 14$, the only root is $x=1$ and if $y>\frac 14$, there are two real roots (one between $0$ and $1$, another larger than $1$).

• Not so slow after all! – Mark Viola Jul 4 '15 at 6:21