This is a typical case where conditional and branch cut check routines are not sophisticated enough to get result, although you give all neccesary conditions (x>0 and y>0 or y<0).
But Solve knows the underlying rules, as can be seen, when you insert numbers for variables (here EulerGamma for x).
Of course you have to check validity of that trick, e.g. with a graphic or insert solution in eq as shown below.
eq = x == y - Log[1 + y];
ContourPlot[Evaluate@eq, {x, 0, 6}, {y, -3, 3},
GridLines -> {{EulerGamma}, {-1 -
ProductLog[-E^(-1 - EulerGamma)], -1 -
ProductLog[-1, -E^(-1 - EulerGamma)]}}]

{sol1 = Solve[eq /. x -> EulerGamma, y, Reals], sol1 // N}
(* {{{y -> -1 - ProductLog[-E^(-1 - EulerGamma)]}, {y -> -1 -
ProductLog[-1, -E^(-1 - EulerGamma)]}}, {{y -> -0.729215}, {y ->
1.48916}}} *)
Get the two solutions
{y1[x_], y2[x_]} = y /. sol1 /. EulerGamma -> x
(* {-1 - ProductLog[-E^(-1 - x)], -1 - ProductLog[-1, -E^(-1 - x)]} *)
Test it applying Exp to both sides of equations
Map[Exp[#] &, {eq /. y -> y1[x], eq /. y -> y2[x]}, {2}] //
FullSimplify[#, x > 0] &
(* {True, True} *)
Edit
Most simple way to get solutions, is just apply Exp
to both sides of equation.
neweq = Map[Exp[#] &, eq, {1}]
(* E^x == E^y/(1 + y) *)
Solve[neweq && x > 0, y, Reals]
(* {{y -> ConditionalExpression[-1 - ProductLog[-E^(-1 - x)],
x > 0]}, {y ->
ConditionalExpression[-1 - ProductLog[-1, -E^(-1 - x)], x > 0]}} *)
Solve
that the answer may be wrong. Why not follow the advice in the message? $\endgroup$Reduce
produces an output that still contains an unsolved equation for a constant specifying a branch cut. Instead of trying to solve that equation, I just found by trial and error that the correct branch constant value is-1
, since the constant must be an integer. Thanks for the suggestion! $\endgroup$Reduce[x == y - Log[1 + y] , y]
you'll get a generalized solution. Since it seems you are interested in positive values of x and y, you could tryReduce[x == y - Log[1 + y] && x > 0 && y > 0, y]
, which narrows your solution toy==-1 - ProductLog[-1, -E^(-1 - x)]
. If you then plot it usingPlot[-1 - ProductLog[-1, -E^(-1 - x)], {x, 0, 10}]
, you'll get what looks like the axes-flipped version of your left plot. $\endgroup$