TITLE: Derivative of Lambert W function.
QUESTION [8 upvotes]: I'm trying to find the derivative of the Lambert W function which is defined such that:
$$W(x)e^{W(x)}=x$$
Through implicit differentiation I get:
$$W(x)e^{W(x)}W'(x)+W'(x)e^{W(x)}=1$$
$$W'(x)(W(x)e^{W(x)}+e^{W(x)})=1$$
And using $W(x)e^{W(x)}=x$ I get:
$$W'(x)=\frac{1}{x+e^{W(x)}}$$
However the answer should be:
$$W'(x)=\frac{W(x)}{x(1+W(x))}$$
Where did I go wrong?

REPLY [5 votes]: Another way to find the derivative of the Lambert function:
1) recall that W(x) is the inverse of $f(x) = xe^x$.
2) recall that if g(x) is the inverse of f(x), then $$g'(x)= \frac{1}{f'(g(x))}$$
For $f(x) = xe^x$, $f'(x) = xe^x + e^x = e^x(x+1)$
So, if $f(x) = xe^x$, and $g(x) = W(x)$ is its inverse, then $$g'(x) = \frac{1}{e^{W(x)}(W(x)+1)}$$
3) recall that $$e^{W(x)} = \frac{x}{W(x)}$$
Therefore, $$g'(x) = \frac{1}{\frac{x}{W(x)}(W(x)+1)}$$    $$= \frac{W(x)}{x(1+W(x))}$$