How did the Lambert W function become part of the x value while finding this curve's inflection?

71 Views Asked by At

I am doing something pretty basic, which is to determine if there is an inflection in a curve. The curve allows complex values. I already happen to know the curve's properties, I'm only curious is anyone is familiar enough with the Lambert W() function to explain why it's part of the result.

The original function was $$y = (z+a)^{z+\frac12}$$ but for analysis I changed $z$ to $x+b\mathbf i$: $$y = (x+a+b\mathbf i)^{x+\frac12+b\mathbf i}$$

The value $a$ is only an integer $> 0$ and I'm only interested in the $x$ range $$0 \le \operatorname{re}(x) \le 1$$

The derivative of the function as I worked it out, is

$$y' = (x+a+b\mathbf i)^{x+\frac12+b\mathbf i}\left[\frac{x+\frac12+b\mathbf i}{x+a+b\mathbf i} + \ln(x+a+b\mathbf i)\right]$$

To find the inflection, simply set $y' = 0$ and solve for $x$.

$$\begin{align} (x+a+b\mathbf i)^{x+\frac12+b\mathbf i}\left[\frac{x+\frac12+b\mathbf i}{x+a+b\mathbf i} + \ln(x+a+b\mathbf i) \right] &= 0\\ \frac{x+\frac12+b\mathbf i}{x+a+b\mathbf i} + \ln(x+a+b\mathbf i) &= 0 \end{align}$$

This is the mystery part. Without the Lambert W function, this would probably be left to a numerical method or some nasty infinite series, but I know the answer (if no typos) is

$$x = -a - bi + e^{\operatorname{W}\left(\left(a-\frac12\right)e\right)-1}$$

The question is what $\operatorname{W}()$ identity was used that the derivative expression could be manipulated into? I used $Z = x+a+b\mathbf i$ to simplify to

$$\frac{Z+\left(\frac12-a\right)}{Z} + \ln(Z) = 0$$

but whether I divide the fraction, multiply by $Z$, move the fraction to the other side of the equation, I cannot find a Lambert $\operatorname{W}()$ function that will fit.

2

There are 2 best solutions below

3
On

You're trying to solve $$ \dfrac{x+1/2 + bi}{x + a + bi} + \ln(x+a+bi) = 0 $$ Writing $x + a + bi= 1/v$, this becomes $$ v \left(\dfrac{1}{v} + \frac{1}{2} - a\right) - \ln(v) = 0$$ or $$1 + \left(\frac{1}{2}-a\right) v = \ln(v) $$ or $$ \left(\frac{1}{2} - a\right) v = \ln(v/e) $$ Now if we call the left side of that $w$, we have $$ w = \ln \left(\dfrac{w}{(1/2-a)e}\right)$$ Taking exponential of both sides, $$ e^w = \dfrac{w}{(1/2 - a)e}$$ so that $$ -w e^{-w} = \left(a - \frac{1}{2}\right) e$$ or $$ -w = W \left(\left(a - \frac{1}{2}\right)e\right)$$

0
On

@Robert Israel - Now that I understand W(), I found another far shorter solution that avoids having to re-substitute w back into v, then find x:

Starting from the step " (1/2-a)v = ln(v/e)"...

$ e^{(1/2-a)v} = v/e $

$ e = v e^{(a-1/2)v} $

$ (a-1/2)e = (a-1/2)v * e^{(a-1/2)v} $

$ (a-1/2)v = W((a-1/2)e) $

$ v = \frac{W((a-1/2)e)}{a-1/2} $

From $ x+a+bi = 1 / v $

$ x = -a-bi + 1/v $

$ x = -a - bi + \frac{a-1/2}{W((a-1/2)e)} $

which is equivalent to the other answer.