Derivative of an implicit function I am asked to take the derivative of the following equation for $y$:
$$y = x + xe^y$$
However, I get lost. I thought that it would be
$$\begin{align}
& y' = 1 + e^y + xy'e^y\\
& y'(1 - xe^y) = 1 + e^y\\
& y' = \frac{1+e^y}{1-xe^y}
\end{align}$$
However, the text book gives me a different answer. 
Can anyone help me with this?
Thank you and sorry if I got any terms wrong, my math studies were not done in English... :)

You can simplify things as follows:
$$y' = \frac{1+e^y}{1-xe^y} = \frac{x+xe^y}{x(1-xe^y)} = \frac{y}{x(1-y+x)}$$
Here in the last step we used $y=x+xe^y$ and $xe^y=y-x$.
