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

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

[[_homogeneous, `class G`], _rational, [_Abel, `2nd type`, `class C`]]

Book solution method
Exact equation, integrating factor

Mathematica
cpu = 0.423504 (sec), leaf count = 74

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

Maple
cpu = 0.027 (sec), leaf count = 59

\[\left [y \left (x \right ) = \frac {-2+\sqrt {4-2 \ln \left (x \right )+2 \textit {\_C1}}}{2 \left (\ln \left (x \right )-\textit {\_C1} \right ) x}, y \left (x \right ) = -\frac {2+\sqrt {4-2 \ln \left (x \right )+2 \textit {\_C1}}}{2 \left (\ln \left (x \right )-\textit {\_C1} \right ) x}\right ]\] Mathematica raw input

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

Mathematica raw output

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

Maple raw input

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

Maple raw output

[y(x) = 1/2*(-2+(4-2*ln(x)+2*_C1)^(1/2))/(ln(x)-_C1)/x, y(x) = -1/2*(2+(4-2*ln(x
)+2*_C1)^(1/2))/(ln(x)-_C1)/x]