3

I'd like to solve the following equation for $y$ in terms of $x$

$$ye^{\frac{1}{2}(y-\frac{1}{y})}=x$$

This equation is close in nature to the definition of the Lambert $W$ function, but different enough that it is not clear how to use it to solve for $y$. Any help with this would be very appreciated.

fewfew4
  • 901
  • @ТymaGaidash Thank you for making me aware of that question. In your answer to that question, could you explain how you simplified the Laplace transform of $h(t)$? In particular, how did you write the integrand purely in terms of $f(t)$? – fewfew4 Jun 23 '24 at 23:27
  • Of course, there may be other solutions to the equation, but you can substitute $h(t)\to t$ in the integral. Here is a more concise comment: $y=e^w\implies e^{\sinh(w)+w}=x$ and use this. Maybe we can comment on it in the answer itself. – Тyma Gaidash Jun 23 '24 at 23:32
  • If you have a better estimate use it as $a$ in my answer. – Claude Leibovici Jun 24 '24 at 14:35

2 Answers2

3

Considering $x>0$ the equation is equivalent to

\begin{equation} {\log\left(\frac{y}{x}\right)}+\frac{1}{2}(y-\frac{1}{y})=0 \end{equation}

Transforming the equation with the change of variable $y\rightarrow1-1/z$ and multiplying by z, we obtain the equation

\begin{equation} z\log\left(\frac{1}{x}\left(1-\frac{1}{z}\right)\right)+\frac{1-2z}{2\left(z-1\right)}=0 \end{equation}

or

\begin{equation} 2z(z-1)\log\left(\frac{1}{x}\left(1-\frac{1}{z}\right)\right)+1-2z=0 \end{equation}

Defining the function $f(z)=2z(z-1)\log\left(\frac{1}{x}\left(1-\frac{1}{z}\right)\right)+1-2z$ and applying the Burniston-Siewert method to solve transcendental equations to this equation we obtain

\begin{equation} y=1-\frac{1}{z_{0}},\quad z_{0}=\frac{\log\left(x\right)-4}{2\log\left(x\right)}+m \end{equation}

where

\begin{equation} m=\frac{1}{\pi}{\displaystyle \int\limits _{0}^{1}}\arctan\left[\frac{1-2t}{2\pi t(t-1)}+\frac{1}{\pi}\log\left(\frac{1-t}{xt}\right)\right]\,dt \end{equation}

(Another representation is)

\begin{equation} m=\frac{1}{\pi}{\displaystyle \int\limits _{-\infty}^{\infty}}\frac{e^{t}}{\left(1+e^{t}\right)^{2}}\arctan\left[\frac{t-\sinh\left(t\right)-\log\left(x\right)}{\pi}\right]\,dt \end{equation}

Putting everything into a single expression, the inverse for the function $f(y)=ye^{\frac{1}{2}(y-\frac{1}{y})}$ is

\begin{equation} f^{-1}(x)=1-\left[\frac{\log\left(x\right)-4}{2\log\left(x\right)}+\frac{1}{\pi}{\displaystyle \int\limits _{0}^{1}}\arctan\left[\frac{1-2t}{2\pi t(t-1)}+\frac{1}{\pi}\log\left(\frac{1-t}{xt}\right)\right]\,dt\right]^{-1} \end{equation}

With this expression an approximation for values ​​close to 1 will be

$$ \begin{align} f^{-1}(x) & \sim 1-\left[\frac{\log\left(x\right)-4}{2\log\left(x\right)}+\frac{1}{\pi}{\displaystyle \int\limits _{0}^{1}}\frac{1-2t}{2\pi t(t-1)}+\frac{1}{\pi}\log\left(\frac{1-t}{xt}\right)\,dt\right]^{-1} \\ & \sim1-\left[\frac{\log\left(x\right)-4}{2\log\left(x\right)}+\frac{1}{\pi}{\displaystyle \int\limits _{0}^{1}}\frac{1}{\pi}\log\left(\frac{1-t}{xt}\right)\,dt\right]^{-1} \\ & \sim 1-\left[\frac{\log\left(x\right)-4}{2\log\left(x\right)}-\frac{\log\left(x\right)}{\pi^{2}}\right]^{-1} \end{align} $$

then

\begin{equation} f^{-1}(x)\sim\frac{\pi^{2}\left(4+\log\left(x\right)\right)+2\log^{2}\left(x\right)}{\pi^{2}\left(4-\log\left(x\right)\right)+2\log^{2}\left(x\right)}\quad\textrm{if}\,\,x\rightarrow1 \end{equation}

For example, for $x=1.01$ the inverse gives us

\begin{equation} x=1.004987551798... \end{equation}

and the approach

\begin{equation} x=\color{red} {1.0049875}47346... \end{equation}

Ref:

-E. E. Burniston, C.E. Siewert. The use of Riemann problems in solving a class of transcendental equations. Mathematical Proceedings of the Cambridge Philosophical Society. 73. 111 - 118. (1973).

-Henrici P., Applied and computational complex analysis, Volume III. Wiley, New York. 183-191 (1986).

1

Assuming $x>0$, we have a first estimate given by $$y\,e^{y/2}=x \quad \implies \quad y_0=2\, W\left(\frac{x}{2}\right)$$ which will be better and better with increasing $x$.

Consider the function $$f(y)=y\,e^{\frac{1}{2} \left(y-\frac{1}{y}\right)}-x$$ whose first and second derivatives are positive.

Since $f(y_0)$ is negative, by Darboux theorem, $y_0$ is an under estimate of the solution.

Now, since numerical methods will be required, I think that is would be better to consider that we look for the zero of function $$g(x)=\frac{1}{2}\left(y-\frac{1}{y}\right)+\log (y)-\log(x)$$ which is closer to linearity. $$g'(y)=\frac{(y+1)^2}{2 y^2}$$

So, a better estimate is (Newton method) $$y_1=y_0-\frac {g(y_0)}{g'(y_0)}$$

Trying for $x=123$ and converting to decimals $$y_0=6.03066\quad \implies \quad y_1= 6.15266$$ while the solution is $y=6.15301$.

In fact, you can have explicit formulae using the first iterate of Newton-like methods of order $n$.

Repeating the example for various $n$ and converting to decimals

$$\left( \begin{array}{cc} n & y_1^{(n)} & \text{method}\\ 2 & 6.15266049028 & \text{Newton}\\ 3 & 6.15301256641 & \text{Halley}\\ 4 & 6.15300846994 & \text{Householder}\\ 5 & 6.15300852649 & \text{no name}\\ 6 & 6.15300852563 & \text{no name}\\ 7 & 6.15300852565 & \text{no name}\\ \end{array} \right)$$

If you prefer a series solution, expand the function around $a=y_0$

$$g(y)=\frac{1}{2} \left(a-\frac{1}{a}+2 \log (a)\right)+\frac{(a+1)^2}{2 a^2}\,(y-a)+$$ $$\frac 1{2a}\sum_{n=2}^\infty (-1)^{n-1}\,\frac {n+2a}{n\,a^n }\, (y-a)^n \tag 1$$

Use power series reversion to obtain $$\large\color{blue}{y=a +\sum_{n=1}^\infty (-1)^n \,\frac{a^{n+1}}{(a+1)^{3 n-1} }\,P_n(a)\, t^n} \tag 2$$ where
$$a=2\, W\left(\frac{x}{2}\right) \quad \text{and} \quad t=\frac{1-a^2}{2 a}+\log\left(\frac{x}{a}\right)$$ The very first polynomials are $$\left( \begin{array}{cc} n & P_n(a) \\ 1 & -2 \\ 2 & 4 \\ 3 & \frac{8}{3} (2 a-3) \\ 4 & \frac{8}{3} \left(3 a^2-11 a+6\right) \\ 5 & \frac{32}{15} \left(6 a^3-38 a^2+51 a-15\right) \\ 6 & \frac{32}{45} \left(30 a^4-282 a^3+661 a^2-477 a+90\right) \\ 7 & \frac{128}{315} \left(90 a^5-1152 a^4+4054 a^3-5121 a^2+2358 a-315\right) \\ \end{array} \right)$$

Since we know all coefficients in $(1)$, we also know all coefficients in $(2)$ using the explicit formula for the $n^{\text{th}}$ term as given by Morse and Feshbach.

Using the above for the test case where $x=123$ gives $$y=\color{red}{6.15300852564510}726$$