# Solution of a Lambert W function

The question was : (find x)

$$6x=e^{2x}$$

I knew Lambert W function and hence:

$$\Rightarrow 1=\dfrac{6x}{e^{2x}}$$

$$\Rightarrow \dfrac{1}{6}=xe^{-2x}$$

$$\Rightarrow \dfrac{-1}{3}=-2xe^{-2x}$$

$$\Rightarrow -2x=W(\dfrac{-1}{3})$$

$$\therefore x=\dfrac{-1}{2} W(\dfrac{-1}{3})$$

But when i went to WolframAlpha, it showed the same result but in the graph:

WolframAlpha Graph http://www5b.wolframalpha.com/Calculate/MSP/MSP132207dchg91df64hcb0000351g9904e7fi986a?MSPStoreType=image/gif&s=61&w=349.&h=185.&cdf=Coordinates&cdf=Tooltips

The curves intersect at a point...

And hence there is a second solution as $$x=\dfrac{-1}{2} W_{-1}(\dfrac{-1}{3})$$

And it also gives approximates as $$x=0.309$$ or $$0.756$$

So, How to find out the second solution of a Lambert W function and also How to find their approximates?

P.S. - This may seem a duplicate but i have seen a lot of StackExchange articles none of which show the correct explanation.

In terms of Lambert function, there are two roots which are $$x_1=-\frac{1}{2} W\left(-\frac{1}{3}\right)\approx 0.309$$ $$x_2=-\frac{1}{2} W_{-1}\left(-\frac{1}{3}\right)\approx 0.756$$ If you want to compute accurately these roots, you could solve $$f(x)=6x-e^{2x}=0$$ using Newton method.

Even if we already know the results, you can notice that $f(x)$ goes through an extremum for $x=\frac{\log (3)}{2}$ and for this specific value $f(x)=3 \log (3)-3 >0$. The second derivative test shows that this is a maximum. You can also notice that $f(0)=-1$ and $f(1)=6-e^2<0$. So $0$ and $1$ are good candidates as starting points.

Starting from a guess $x_0$, Newton method will update it according to $$x_{n+1}=x_n-\frac{f(x_n)}{f'(x_n)}$$ which, for the case we consider gives $$x_{n+1}=\frac{e^{2 x_n} (2 x_n-1)}{2 \left(e^{2 x_n}-3\right)}$$ Starting with $x_0=0$ generates the following iterates : $0.250000$, $0.305030$, $0.309498$, $0.309531$ which is the solution for six significant figures.

Starting with $x_0=1$ generates the following iterates : $0.841759$, $0.771741$, $0.756744$, $0.756069$, $0.756067$ which is the solution for six significant figures.

For sure, you could do the same using Halley or Housholder methods for faster convergence. For illustartion purposes, using Halley starting at $x_0=0$ produces the following iterates : $0.281250$, $0.309419$, $0.309531$; starting at $x_0=1$ : $0.799604$, $0.756909$, $0.756067$.

Edit

You could easily show that $f(x)=ax-e^{2x}$ has no root if $a<2e$, a double root for $a=2e$ (it will be $x=\frac 12$) and two roots for $a>2e$.

What is amazing is that, if you expand $f(x)=ax-e^{2x}$ as a Taylor series buit at $x=\frac 12$ you have $$f(x)=\left(\frac{a}{2}-e\right)+(a-2 e) \left(x-\frac{1}{2}\right)-2 e \left(x-\frac{1}{2}\right)^2+O\left(\left(x-\frac{1}{2}\right)^3\right)$$ If you solve the quadratic, the roots are given by $$x_{\pm}=\frac{a\pm\sqrt{a^2-4 e^2}}{4 e}$$ which, for $a=6$ gives $\approx 0.318$ and $\approx 0.785$ . Quite close, isn't it for the price of a quadratic ?

• Can you please give a more detailed explanation of the newton"s method as shown here? (or atleast a link) Commented Apr 27, 2015 at 7:49
• @NeilRoy. I am sorry ! I supposed you knew it because of the complexity of the problem. Newton method is probably the simplest method to use for solving $f(x)=0$ provided ... some conditions. It is very simple. Have a look at en.wikipedia.org/wiki/Newton's_method and just post if you want me to elaborate for you. Commented Apr 27, 2015 at 7:54
• They chose $x_0=10$ and $x_1$ is predicted to be $35.6$; repeating the iterative scheme gives $x_2=26.4$ and so on. As I said, the starting guess must be reasonable (this means that you must study the function before starting). Try to apply the method to $f(x)=x^2-2$ starting at $x_0=100$; it will work producing as iterates $50.0100$, $25.0250$, $12.5525$, $6.35589$, $3.33528$, $1.96747$, $1.49200$, $1.41624$, $1.41422$, $1.41421$. It works here ! Commented Apr 27, 2015 at 8:18
• Well yeah i understood...Thanks a lot! Commented Apr 27, 2015 at 8:23
• @NeilRoy. Good to know it and you are very welcome. Even if this has not been teached yet, go deeper into Newton method and play with it (you will find thousands of similar cases on this site). It is simple, efficient, robust... Cheers :-) Commented Apr 27, 2015 at 8:28

The Lambert W function has infinitely many branches. For $-1/e < x < 0$, both the "$-1$" branch $W_{-1}$ and the "$0$" branch $W_0$ are real; both are $-1$ at $-1/e$, but $W_{-1}(x)$ decreases to $-\infty$ as $x$ increases to $0$ while $W_0(x)$ increases to $0$. Here's a plot, with $W_0$ in red and $W_{-1}$ in blue.

For numerical approximations, Newton's method converges quickly, or you could use power series. The Puiseux series for $W_0(x)$ for $x$ near $x = -1/e$ is (according to Maple)

$$-1+{\frac {\sqrt {2}\sqrt {x+{{\rm e}^{-1}}}}{\sqrt {{{\rm e}^{-1}}}}} -2/3\,{\frac {x+{{\rm e}^{-1}}}{{{\rm e}^{-1}}}}+{\frac {11\,\sqrt {2} \left( x+{{\rm e}^{-1}} \right) ^{3/2}}{36\, \left( {{\rm e}^{-1}} \right) ^{3/2}}}-{\frac {43\, \left( x+{{\rm e}^{-1}} \right) ^{2}}{ 135\, \left( {{\rm e}^{-1}} \right) ^{2}}}+{\frac {769\,\sqrt {2} \left( x+{{\rm e}^{-1}} \right) ^{5/2}}{4320\, \left( {{\rm e}^{-1}} \right) ^{5/2}}}-{\frac {1768\, \left( x+{{\rm e}^{-1}} \right) ^{3} }{8505\, \left( {{\rm e}^{-1}} \right) ^{3}}}+{\frac {680863\,\sqrt {2 } \left( x+{{\rm e}^{-1}} \right) ^{7/2}}{5443200\, \left( {{\rm e}^{- 1}} \right) ^{7/2}}}-{\frac {3926\, \left( x+{{\rm e}^{-1}} \right) ^{ 4}}{25515\, \left( {{\rm e}^{-1}} \right) ^{4}}}+{\frac {226287557\, \sqrt {2} \left( x+{{\rm e}^{-1}} \right) ^{9/2}}{2351462400\, \left( {{\rm e}^{-1}} \right) ^{9/2}}}-{\frac {23105476\, \left( x+{{\rm e}^{ -1}} \right) ^{5}}{189448875\, \left( {{\rm e}^{-1}} \right) ^{5}}}+{ \frac {169709463197\,\sqrt {2} \left( x+{{\rm e}^{-1}} \right) ^{11/2} }{2172751257600\, \left( {{\rm e}^{-1}} \right) ^{11/2}}}$$ The series for $W_{-1}$ is $$-1-{\frac {\sqrt {2}\sqrt {x+{{\rm e}^{-1}}}}{\sqrt {{{\rm e}^{-1}}}}} -2/3\,{\frac {x+{{\rm e}^{-1}}}{{{\rm e}^{-1}}}}-{\frac {11\,\sqrt {2} \left( x+{{\rm e}^{-1}} \right) ^{3/2}}{36\, \left( {{\rm e}^{-1}} \right) ^{3/2}}}-{\frac {43\, \left( x+{{\rm e}^{-1}} \right) ^{2}}{ 135\, \left( {{\rm e}^{-1}} \right) ^{2}}}-{\frac {769\,\sqrt {2} \left( x+{{\rm e}^{-1}} \right) ^{5/2}}{4320\, \left( {{\rm e}^{-1}} \right) ^{5/2}}}-{\frac {1768\, \left( x+{{\rm e}^{-1}} \right) ^{3} }{8505\, \left( {{\rm e}^{-1}} \right) ^{3}}}-{\frac {680863\,\sqrt {2 } \left( x+{{\rm e}^{-1}} \right) ^{7/2}}{5443200\, \left( {{\rm e}^{- 1}} \right) ^{7/2}}}-{\frac {3926\, \left( x+{{\rm e}^{-1}} \right) ^{ 4}}{25515\, \left( {{\rm e}^{-1}} \right) ^{4}}}-{\frac {226287557\, \sqrt {2} \left( x+{{\rm e}^{-1}} \right) ^{9/2}}{2351462400\, \left( {{\rm e}^{-1}} \right) ^{9/2}}}-{\frac {23105476\, \left( x+{{\rm e}^{ -1}} \right) ^{5}}{189448875\, \left( {{\rm e}^{-1}} \right) ^{5}}}-{ \frac {169709463197\,\sqrt {2} \left( x+{{\rm e}^{-1}} \right) ^{11/2} }{2172751257600\, \left( {{\rm e}^{-1}} \right) ^{11/2}}}$$

• Thanks...! But since there is something like $W_{n}$ so n can also be 2,3,... So is there any general series expansion for $W_{n}$ ? Also How to know whether the value of n is -1 ,0 or something else? Commented Apr 27, 2015 at 7:35
• And also (sorry i forgot!) What IS the relation between the successive two fractions in the series you just wrote? (if you know what i mean) Commented Apr 27, 2015 at 7:42
• For more on LambertW see apmaths.uwo.ca/~rcorless/frames/PAPERS/LambertW , especially the Corless/Gonnet/Hare/Jeffrey/Knuth paper which is the standard reference. Commented Apr 27, 2015 at 15:21
• The power series can be found by writing $w = -1 + \sum_{j \ge 1} c_j (x + 1/e)^{j/2}$, plugging that in to $w e^w = -1/e + (x+1/e)$, and solving. Commented Apr 27, 2015 at 15:31
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 9, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}