When differentiating expressions involving $|x|$, it is often safest to consider the cases $x>0$ and $x<0$ separately. After finding the derivative for one case (e.g., $x>0$), you can often generalize the result by replacing terms like $x^2$ with $x|x|$ to make it valid for both cases.
If $e^y (x+1) = 1$, then find the value of $$ \frac{d^2 y}{dx^2} - \left(\frac{dy}{dx}\right)^2. $$