4.6.23 \(x^2 y'(x)+y(x) \left (x^2+y(x)^2-x\right )=0\)

ODE
\[ x^2 y'(x)+y(x) \left (x^2+y(x)^2-x\right )=0 \] ODE Classification

[[_homogeneous, `class D`], _rational, _Bernoulli]

Book solution method
Exact equation, integrating factor

Mathematica
cpu = 0.0130531 (sec), leaf count = 42

\[\left \{\left \{y(x)\to -\frac {x}{\sqrt {c_1 e^{2 x}-1}}\right \},\left \{y(x)\to \frac {x}{\sqrt {c_1 e^{2 x}-1}}\right \}\right \}\]

Maple
cpu = 0.008 (sec), leaf count = 21

\[ \left \{ {x}^{-2}-{\frac {{{\rm e}^{2\,x}}{\it \_C1}}{{x}^{2}}}+ \left (y \relax (x ) \right ) ^{-2}=0 \right \} \] Mathematica raw input

DSolve[y[x]*(-x + x^2 + y[x]^2) + x^2*y'[x] == 0,y[x],x]

Mathematica raw output

{{y[x] -> -(x/Sqrt[-1 + E^(2*x)*C[1]])}, {y[x] -> x/Sqrt[-1 + E^(2*x)*C[1]]}}

Maple raw input

dsolve(x^2*diff(y(x),x)+(x^2+y(x)^2-x)*y(x) = 0, y(x),'implicit')

Maple raw output

1/x^2-1/x^2*exp(2*x)*_C1+1/y(x)^2 = 0