I was looking at this step from Wolfram alpha
In the above $W$ is LambertW function which Mathematica calls ProductLog
When I try to obtain this solution in Mathematica 13.1, it can not solve it. Then how did Wolfram Alpha obtain this solution?
eq = Log[1 - y[x]] - Log[y[x]] + 1/y[x] == x + C[1]
Solve[eq, y[x]]
Adding Reals
did not help.
To see the solution above produced by Wolfram alpha, you can type this command inside Mathematica
WolframAlpha["solve y'=y^2*(y-1), y(0)=1"]
Then when the result comes back to the notebook, click on the Show steps
button on the top right of the result, and now you will see the above solution/step in the middle of the steps shown.
Btw, Mathematica also solved this ODE and gives same answer as Wolfram alpha.
DSolve[{y'[x] == y[x]^2*(y[x] - 1), y[0] == 1}, y[x], x]
(*{{y[x] -> 1}}*)
Which is correct solution. So it must have done same step internally. But the question why does the Solve
command not work in Mathematica? Is there a work around to solve this in Mathematica as shown in Wolfram Alpha steps?
I also tried Reduce
and it also could not solve it. Is Wolfram Alpha getting smarter than Wolfram Mathematica?
V 13.1 on windows
Log
by hand,Solve[Log[(1-y)/y]+1/y==x+c,y]
, I getProductLog
in V12.3. $\endgroup$