4.12.3 \(x (-2 y(x)+x+1) y'(x)+y(x) (y(x)-2 x+1)=0\)

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

[_rational, [_Abel, `2nd type`, `class B`]]

Book solution method
Exact equation, integrating factor

Mathematica
cpu = 15.0879 (sec), leaf count = 457

\[\left \{\left \{y(x)\to -\frac {\sqrt [3]{2} x}{\sqrt [3]{27 c_1^2 x^2+\sqrt {\left (27 c_1^2 x^2+27 c_1^2 x\right ){}^2-108 c_1^3 x^3}+27 c_1^2 x}}-\frac {\sqrt [3]{27 c_1^2 x^2+\sqrt {\left (27 c_1^2 x^2+27 c_1^2 x\right ){}^2-108 c_1^3 x^3}+27 c_1^2 x}}{3 \sqrt [3]{2} c_1}-x-1\right \},\left \{y(x)\to \frac {\left (1+i \sqrt {3}\right ) x}{2^{2/3} \sqrt [3]{27 c_1^2 x^2+\sqrt {\left (27 c_1^2 x^2+27 c_1^2 x\right ){}^2-108 c_1^3 x^3}+27 c_1^2 x}}+\frac {\left (1-i \sqrt {3}\right ) \sqrt [3]{27 c_1^2 x^2+\sqrt {\left (27 c_1^2 x^2+27 c_1^2 x\right ){}^2-108 c_1^3 x^3}+27 c_1^2 x}}{6 \sqrt [3]{2} c_1}-x-1\right \},\left \{y(x)\to \frac {\left (1-i \sqrt {3}\right ) x}{2^{2/3} \sqrt [3]{27 c_1^2 x^2+\sqrt {\left (27 c_1^2 x^2+27 c_1^2 x\right ){}^2-108 c_1^3 x^3}+27 c_1^2 x}}+\frac {\left (1+i \sqrt {3}\right ) \sqrt [3]{27 c_1^2 x^2+\sqrt {\left (27 c_1^2 x^2+27 c_1^2 x\right ){}^2-108 c_1^3 x^3}+27 c_1^2 x}}{6 \sqrt [3]{2} c_1}-x-1\right \}\right \}\]

Maple
cpu = 0.054 (sec), leaf count = 74

\[ \left \{ {\frac {7}{9}\ln \left ( {\frac {-189-189\,x}{4+4\,x-8\,y \left ( x \right ) }} \right ) }-{\frac {7}{6}\ln \left ( -126\,{\frac {1+x+y \left ( x \right ) }{1+x-2\,y \left ( x \right ) }} \right ) }+{\frac {7}{18}\ln \left ( -378\,{\frac {y \left ( x \right ) }{5+5\,x-10\,y \left ( x \right ) }} \right ) }-{\frac {7\,\ln \left ( 1+x \right ) }{9}}+{\frac {7\,\ln \left ( x \right ) }{18}}-{\it \_C1}=0 \right \} \] Mathematica raw input

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

Mathematica raw output

{{y[x] -> -1 - x - (2^(1/3)*x)/(27*x*C[1]^2 + 27*x^2*C[1]^2 + Sqrt[-108*x^3*C[1]
^3 + (27*x*C[1]^2 + 27*x^2*C[1]^2)^2])^(1/3) - (27*x*C[1]^2 + 27*x^2*C[1]^2 + Sq
rt[-108*x^3*C[1]^3 + (27*x*C[1]^2 + 27*x^2*C[1]^2)^2])^(1/3)/(3*2^(1/3)*C[1])}, 
{y[x] -> -1 - x + ((1 + I*Sqrt[3])*x)/(2^(2/3)*(27*x*C[1]^2 + 27*x^2*C[1]^2 + Sq
rt[-108*x^3*C[1]^3 + (27*x*C[1]^2 + 27*x^2*C[1]^2)^2])^(1/3)) + ((1 - I*Sqrt[3])
*(27*x*C[1]^2 + 27*x^2*C[1]^2 + Sqrt[-108*x^3*C[1]^3 + (27*x*C[1]^2 + 27*x^2*C[1
]^2)^2])^(1/3))/(6*2^(1/3)*C[1])}, {y[x] -> -1 - x + ((1 - I*Sqrt[3])*x)/(2^(2/3
)*(27*x*C[1]^2 + 27*x^2*C[1]^2 + Sqrt[-108*x^3*C[1]^3 + (27*x*C[1]^2 + 27*x^2*C[
1]^2)^2])^(1/3)) + ((1 + I*Sqrt[3])*(27*x*C[1]^2 + 27*x^2*C[1]^2 + Sqrt[-108*x^3
*C[1]^3 + (27*x*C[1]^2 + 27*x^2*C[1]^2)^2])^(1/3))/(6*2^(1/3)*C[1])}}

Maple raw input

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

Maple raw output

7/9*ln((-189-189*x)/(4+4*x-8*y(x)))-7/6*ln(-126*(1+x+y(x))/(1+x-2*y(x)))+7/18*ln
(-378*y(x)/(5+5*x-10*y(x)))-7/9*ln(1+x)+7/18*ln(x)-_C1 = 0