# Solving $e^{\frac{x^2}{4vt}} = 1+\frac{x^2}{2vt}$ for $x$

I need help with solving this difficult fluid dynamic expression. I have tried using rules of logs, symbolab algebra calculator and Wolfram Alpha calculator, and I have got no solution.

How would you solve the following expression for $$x$$? $$e^{\frac{x^2}{4vt}} = 1+\frac{x^2}{2vt}$$

When solving this numerically, the solution is: $$x=2.2418\sqrt{vt}$$

I want to know how you could solve the first expression to get the solution. So could someone please provide a step-by-step solution please?

• If you move everything to one side and ask Wolfram Alpha, you get a rather nasty-looking result involving the Lambert W function: wolframalpha.com/input/… Jan 3 '19 at 2:05
• The expression you get is also much nastier than the numeric solution, so I think solving for $x$ might not be the way to go, because of how nontrivial it is. Jan 3 '19 at 2:06
• Would you have to use use the Newton-Raphson formula? Jan 3 '19 at 2:30
• x = 0 is a solution. Jan 3 '19 at 2:54
• What are the parameter values for $v$,$t$? Looks like it could be a perturbation problem if $v t$ is large.
– user150203
Jan 3 '19 at 3:54

$$e^{\frac{x^2}{4vt}} = 1+\frac{x^2}{2vt}$$ Let $$y=\frac{x^2}{4vt}$$ $$e^y=1+2y$$ $$e^{-y}=\frac{1}{1+2y}$$ $$(1+2y)e^{-y}=1$$ $$(\frac12+y)e^{-y}=\frac12$$ $$(-\frac12-y)e^{-y}=-\frac12$$ $$(-\frac12-y)e^{-y}e^{-\frac12}=-\frac12 e^{-\frac12}$$ $$(-\frac12-y)e^{-\frac12-y}=-\frac12 e^{-\frac12}=-\frac{1}{2\sqrt{e}}$$ $$X=(-\frac12-y)$$ $$Xe^X=-\frac{1}{2\sqrt{e}}$$ From the definition of the Lambert W function : http://mathworld.wolfram.com/LambertW-Function.html $$X=W\left(-\frac{1}{2\sqrt{e}}\right)$$ $$y=-\frac12-X=-\frac12-W\left(-\frac{1}{2\sqrt{e}}\right)$$ $$x=\sqrt{4vty}=\sqrt{-2-4W\left(-\frac{1}{2\sqrt{e}}\right)}\sqrt{vt}$$ The Lambert W(z) function is a multi valuated function in $$-\frac{1}{e} , real $$z$$.

This is presently the case where $$z=-\frac{1}{2\sqrt{e}}$$ since $$-\frac{1}{e} <-\frac{1}{2\sqrt{e}}<0$$

First root :

$$W_0\left(-\frac{1}{2\sqrt{e}}\right)=-\frac12 \quad;\quad {-2-4W_0\left(-\frac{1}{2\sqrt{e}}\right)}=-2-4(-1/2)=0 \quad;\quad x=0$$

Second root :

$$W_{-1}\left(-\frac{1}{2\sqrt{e}}\right)\simeq -1.756431...$$

https://www.wolframalpha.com/input/?i=lambertw(-1,-1%2F(2+sqrt(e)))

One can use series expansion to compute it approximately. See page 13 in https://fr.scribd.com/doc/34977341/Sophomore-s-Dream-Function . The convergence is very slow. See the numerical calculus in the below addition. In practice, it is certainly faster to solve directly $$e^y=1+2y$$ with Newton-Raphson or similar iterative method.

Finally, an approximate value is :

$$x\simeq\sqrt{-2-4(-1.756431)}\sqrt{vt}\simeq 2.2418128 \sqrt{vt}$$

Example of recursive numerical calculus of $$W_{-1}(x)$$ in the range $$-\frac{1}{e}

As mentioned above, clearly $$x=0$$ is a solution.

Also (Mathematica):

$$x = \pm \sqrt{2} \sqrt{-2 t v W_{-1}\left(-\frac{1}{2 \sqrt{e}}\right)-t v}$$

• Sorry pardon my ignorance, which special function is $W_n(x)$?
– user150203
Jan 3 '19 at 3:55
• The Lambert W function or ProductLog. en.wikipedia.org/wiki/Lambert_W_function . mathworld.wolfram.com/ProductLogFunction.html Jan 3 '19 at 3:58
• Cheers @David G. Stork
– user150203
Jan 3 '19 at 3:59
• How would you expand the Lamber W function to get $x=2.2418\sqrt{vt}$ @DavidG.Stork Jan 3 '19 at 4:07
• @AlanGlenn: I would merely evaluate it numerically, just as we do with innumerable other functions, such as $\sin$, $\log$, etc. Jan 3 '19 at 4:15