Signing $y''$ from $\log(\frac{x+y}{x})=x+y$

Suppose that $x,y>0$ are positive reals such that $y$ is defined implicitly in terms of $x$ via: $$\log\left(\frac{x+y}{x}\right)=x+y.\tag{\star}$$ I would like study the sign of $y''$.

Attempt: Write ($\star$) as $$\log(x+y)-\log(x)=x+y.$$ Differentiate both sides w.r.t. $x$ yields $$\frac{1+y'}{x+y}-\frac{1}{x}=1+y'\tag{\star\star}$$ which can be solved to get $$1+y'=\frac{x+y}{x(1-x-y)}\cdot$$ Differentiate both sides of ($\star\star$) w.r.t. $x$ to get $$\frac{(x+y)y''-(1+y')^2}{(x+y)^2}+\frac{1}{x^2}=y''$$ which, after feeding to Mathematica while using $1+y'$ found above, gives $$y''=\frac{(x+y-2) (x+y)^2}{x^2 (x+y-1)^3}$$ which can clearly take on positive and negative values depending on $x+y$. Indeed, looking back at ($\star$), we can freely vary $x+y$: to have $x+y=r>0$, simply set $$x=e^{-r}r,\quad y=(1-e^{-r})r.$$ Is my attempt here reasonable to you? The reason I'm not confident is that if I feed ($\star$) directly to Mathematica, I get $$y=-x-\text{ProductLog}[-x]$$ where (according to Help File) $\text{ProductLog}[z]$ gives the principal solution for $w$ in $z=we^w$. Then I plotted $$\partial_x(\partial_x(-x-\text{ProductLog}[-x]))$$ and saw something that is only positive: What is going on? Can someone please explain this seeming discrepancy?

• One thing you can do is define $z(x)=y(x)+x$; then $\frac{d^2z}{dx^2}=\frac{d^2y}{dx^2}$ and the calculations are a bit simpler. – Steven Stadnicki Dec 12 '14 at 16:09

The problem is that $y$ isn't globally uniquely determined, i.e. there are multiple functions $y_i(x)$ that verify $(\star)$. In $\mathbb C$ these are infinite, while in $\mathbb R$ there are two, and you have, via Mathematica, found just one of them. The other solution can be seen here to vary in sign as you predicted (to know that this is a solution, see this. If you want a single function, you'll have to work with a local definition of $y(x)$ in neighbourhoods of concrete solutions $(x_0,y_0)$.
If the global vs. local aspect seems confusing, take the unit circumference as an example: there is no function $y(x)$ that traverses the entire curve of solutions to $x^2+y^2 = 1$, but you can define, for every solution $(x_0,y_0)$, a function $y(x)$ that passes through $(x_0,y_0)$ and such that every $(x,y(x))$ is a solution.