$f$ is a differentiable real function such that $f(x)e^{f(x)}=x$. Evaluate $\int_{0}^{e}f(x)dx$. I've obtained the differential equation $f(x)=\dfrac{xf'(x)}{1-xf'(x)}$ by messing around with the derivative, but even after hours, I can't get any further. Please help.
 A: If $f$ is a continuous and increasing function on the interval $[a,b]$ and its inverse function $g$ is continuous on the interval $[f(a),f(b)]$, we have
$$ \int_{a}^{b}f(x)\,dx + \int_{f(a)}^{f(b)} g(x)\,dx  = b f(b)-a f(a).$$
By choosing $a=0$ and $b=e$, in our case we have $f(a)=0$ and $f(e)=1$, hence:
$$ \int_{0}^{e}f(x)\,dx = e-\int_{0}^{1}xe^x\,dx = \color{blue}{e-1}.$$
A: From the initial equation, we are going to need 2 values of $f$ :
$$ f(0) = 0, a=f(e) $$ 
Then, by differentiating on $x$ : 
$$ f(x)e^{f(x)} = x \Rightarrow f'(x)e^{f(x)}+f(x)f'(x)e^{f(x)}=1$$
$$ \Rightarrow f'(x)e^{f(x)}+xf'(x)=1$$
By integrating this equation, we may have:
$$ e^{f(x)}-1 + \int\limits_0^x uf'(u)\mathrm{d}u = x \text{ }\color{red}{(1)}$$
If we study more precisely the second quantity, we may write:
$$ \int\limits_0^x uf'(u)\mathrm{d}u = [uf(u)]^x_0-\int\limits_0^x f(u)\mathrm{d}u \Leftrightarrow \int\limits_0^x f(u)\mathrm{d}u = xf(x)-\int\limits_0^x uf'(u)\mathrm{d}u \text{ }\color{red}{(2)}$$
Finally, using $\color{red}{(1)}$ and $\color{red}{(2)}$, we have
$$\int\limits_0^e f(u)\mathrm{d}u = ef(e)-e^{f(e)}-e-1$$
