## Wednesday, October 29, 2014

### Some special cases of the Lambert W function

Suppose $$f(x)$$ is given by the functional relation $$e^{-a(x) f(x) + b(x)} = c(x) f(x) + d(x)$$ then $$f(x) = \frac{1}{a(x)}W\left( \frac{a(x)}{c(x)} e^{b(x)+\frac{a(x)d(x)}{c(x)} } \right) - \frac{d(x)}{c(x)}$$ where $$W$$ is the Lambert W Function. You can click through to Wikipedia for a proof. Here I merely list some special cases which every good citizen should instantly recognize (and it can be mildly tedious to reproduce them).

### Recovering the definition of $$W(x)$$

Just to check we are on the right planet set $$a=1$$, $$c=1$$, $$b=\ln(x)$$ and $$d=0$$ to get $$x e^{-f(x)} = f(x)$$ or equivalently $$f(x)e^{f(x)} = x$$ which is the definition of the Lambert W function. Sure enough those substitutions recover $$f(x) = W(x)$$ as expected. A minor modification uses $$a(x)=1$$, $$c(x)=1$$, $$b(x)=0$$ but leaves $$d(x)$$ general.

### The solution to $$e^{-f(x)} - f(x) = d(x)$$

is $$f(x) = W \left( e^{d(x)} \right)$$ Only slightly more generally, set $$a(x)=a$$, $$b=\ln(g(x)), c=1, d=1$$ for those cases where $$g(x)$$ is on the wrong side, as it were.

### The solution to $$e^{-af(x)} = f(x) g(x)$$

or equivalently $$f(x) e^{af(x)} g(x) = 1$$ is $$f(x) = \frac{1}{a} W\left( a g(x) \right)$$ In particular,

### The solution to $$x^k e^{-af(x)} f(x) = 1$$

which seems to crop up a fair bit for your author is $$f(x) = \frac{1}{a} W\left( a x^{-k} \right)$$

Similarly setting $$a=-1$$ ...

### The solution to $$x e^{f(x)} f(x) = 1$$

(i.e. where $$x$$ is on the wrong side but we otherwise have the Lambert W definition) must be $$f(x) = - W\left( -\frac{1}{x} \right)$$ We might also take $$b = \ln(g(x))$$ and thus

### The solution to $$g(x) e^{-af(x)} = f(x)$$

or equivalently $$f(x)e^{af(x)} = g(x)$$ is $$f(x) = \frac{1}{a} W\left( a g(x) \right)$$ which reduces to the Lambert W function for $$a=1$$, as we expect. It is also pretty obvious from first principles, because if we multiply both sides by $$a$$ we have $$(af) e^{(af)} = ag$$ and thus $$af = W(ag)$$. Next suppose we want a power of $$f$$ to appear. Let $$b=\beta(x)/k$$, $$c = \gamma^{1/k}$$, $$a = k/\alpha$$ and $$d=0$$. And then raise both sides to the power $$k$$. It follows that...

### The solution to $$e^{\alpha f(x) + \beta(x)} = \gamma f(x)^k$$

is $$f(x) = \frac{\alpha}{k}W\left( \frac{k e^{\frac{1}{k}\beta(x)} }{\alpha \gamma^{1/k}} \right)$$ and if, in particular, $$\beta(x) = -\ln(g(x))$$ then

### The solution to $$e^{\alpha f(x)} = g(x) \gamma f(x)^k$$

is $$f(x) = \frac{\alpha}{k}W\left( \frac{k }{\alpha g(x)^{1/k} \gamma^{1/k}} \right)$$ and if we take $$c = \frac{1}{\gamma}$$ and $$g(x)=x$$ and $$\alpha = \frac{s}{2}$$ and $$k=2$$ then p>

### The solution to $$e^{-\frac{s}{2}f(x)} x f(x)^2 = c$$

is $$f(x) = \frac{s}{2k}W\left( \frac{2k}{s} \sqrt{ \frac{c}{x}} \right)$$