# Differentiating and Integrating the Lambert W function

## Main Question or Discussion Point

Here was my thinking for differentiation (which, by the way, is wrong):

By the definition of the function, the following equations are equal:

$$W(xe^x)=x$$

By the chain rule and product rule:

$$\frac{dW}{dx}( e^x+xe^x ) =1$$
$$\frac{dW}{dx}=(e^x+xe^x)^{-1}$$

What is the error here? What is the correct way to differentiate it? Also, how would I integrate it?

P.S. Why is the fraction bar in the third equation bolder than in the second equation? They are typesetted the same way...

chiro
Hey piercebeatz.

Basically you use the chain rule: d/dx f(g(x)) = g'(x)f'(g(x)).

Note that W(x) in this case is W(x*e^x) or W(g(x)) where g(x) = x*e^x.

lurflurf
Homework Helper
you have found

w'(e^x+x e^x)=1/(e^x+x e^x)

w(x) e^w(x)=x

to find

w'(x)=1/(e^w(x)+w(x) e^w(x))

The expression :
$$\frac{dW}{dx}=(e^x+xe^x)^{-1}$$ is true, but ambiguous.

Do not confuse :
$$\frac{dW(xe^x)}{dx}=(e^x+xe^x)^{-1}$$
and
$$\frac{dW(x)}{dx}=\frac{W(x)}{x(W(x)+1)}$$

The expression :
$$\frac{dW}{dx}=(e^x+xe^x)^{-1}$$ is true, but ambiguous.

Do not confuse :
$$\frac{dW(xe^x)}{dx}=(e^x+xe^x)^{-1}$$
and
$$\frac{dW(x)}{dx}=\frac{W(x)}{x(W(x)+1)}$$
Looking back at the top, that was a pretty lousy use of the chain rule. I see what I should have done now.

Do you have any idea how to integrate it?

chiro
Have you tried using separation of variables?

lurflurf
Homework Helper
^right very nice

$\int W \text{ dx}=\int W \text{ d}(We^W)=\int (W+1)W e^W\text{ dW}$

Last edited:
^right very nice

$\int W \text{ dx}=\int W \text{ d}(We^W)=\int (W+1)W e^W\text{ dW}$
Sorry what did you do there?

lurflurf
Homework Helper
^As chiro suggested separation of variables, which is equivalent to the substitution

x=W(x)e^W(x)

The LambertW integral :

#### Attachments

• 3.5 KB Views: 297