I want to solve this nonlinear 1-st order ODE,
$$\frac{1}{1+x}=(\frac{1}{x-y}-\frac{1}{y})\frac{dy}{dx}$$
I find it non-separable, and Wolfram Alpha does not give me a closed form solution, but the following plots.
I am a little rusty on solving ODEs, can someone tell me the method to solve this one? A variable transformation or any other trick? Or do I need initial values to see the behavior of the system (directional fields)?
Thanks in advance.
Update
Now the modified code is as follows,
f[x_] = NDSolveValue[{(1 + x) (0.5 y[x]^-0.5 (x - y[x])^0.5 -
0.5 y[x]^0.5 (x - y[x])^-0.5) == -y[x] (x - y[x])/y'[x],
y[1] == 0.5}, y[x], {x, 0, 2}]
But the result is still error,
Infinite expression 1/0. encountered. >>
NDSolveValue::ndnum: Encountered non-numerical value for a derivative at x == 1.`. >>
Why in your code, we do not have the indeterminate problem? And the direction field I want is like the one below:
y[1]=1/2
. $\endgroup$