# 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... :)

-
I think you need to tell us what different answer the book gave. There are many possible answers which look different but are actually equivalent to each other. –  Old John Jun 9 '12 at 22:46
Looks good to me. What answer does the book give? –  mrf Jun 9 '12 at 22:46
The book says: y/(x(1+x-y)) –  Guy Jun 9 '12 at 22:49
$$\frac{1+e^y}{1-xe^y} = \frac{x(1+e^y)}{x(1-xe^y)} = \frac{y}{x(1+x-y)}.$$ –  mrf Jun 9 '12 at 22:51

$$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$.