4.4.39 \(x y'(x)=f(x) \left (x^2-y(x)^2\right )+y(x)\)

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

[[_homogeneous, `class D`], _Riccati]

Book solution method
Riccati ODE, Generalized ODE

Mathematica
cpu = 0.130127 (sec), leaf count = 51

\[\left \{\left \{y(x)\to \frac {x-x e^{2 \left (\int _1^x -f(K[1]) \, dK[1]+c_1\right )}}{e^{2 \left (\int _1^x -f(K[1]) \, dK[1]+c_1\right )}+1}\right \}\right \}\]

Maple
cpu = 0.011 (sec), leaf count = 20

\[ \left \{ {\it Artanh} \left ({\frac {y \relax (x ) }{x}} \right ) -\int \!f \relax (x ) \,{\rm d}x-{\it \_C1}=0 \right \} \] Mathematica raw input

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

Mathematica raw output

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

Maple raw input

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

Maple raw output

arctanh(y(x)/x)-Int(f(x),x)-_C1 = 0