4.12.50 \(\left (x-y(x)^2\right ) y'(x)=x^2-y(x)\)

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

[_exact, _rational]

Book solution method
Exact equation

Mathematica
cpu = 0.0164503 (sec), leaf count = 326

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

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

\[ \left \{ -{\frac {{x}^{3}}{3}}+xy \left ( x \right ) -{\frac { \left ( y \left ( x \right ) \right ) ^{3}}{3}}+{\it \_C1}=0 \right \} \] Mathematica raw input

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

Mathematica raw output

{{y[x] -> -((2*x + 2^(1/3)*(x^3 + 3*C[1] + Sqrt[x^6 + 9*C[1]^2 + x^3*(-4 + 6*C[1
])])^(2/3))/(2^(2/3)*(x^3 + 3*C[1] + Sqrt[x^6 + 9*C[1]^2 + x^3*(-4 + 6*C[1])])^(
1/3)))}, {y[x] -> ((2 + (2*I)*Sqrt[3])*x + 2^(1/3)*(1 - I*Sqrt[3])*(x^3 + 3*C[1]
 + Sqrt[x^6 + 9*C[1]^2 + x^3*(-4 + 6*C[1])])^(2/3))/(2*2^(2/3)*(x^3 + 3*C[1] + S
qrt[x^6 + 9*C[1]^2 + x^3*(-4 + 6*C[1])])^(1/3))}, {y[x] -> ((2 - (2*I)*Sqrt[3])*
x + 2^(1/3)*(1 + I*Sqrt[3])*(x^3 + 3*C[1] + Sqrt[x^6 + 9*C[1]^2 + x^3*(-4 + 6*C[
1])])^(2/3))/(2*2^(2/3)*(x^3 + 3*C[1] + Sqrt[x^6 + 9*C[1]^2 + x^3*(-4 + 6*C[1])]
)^(1/3))}}

Maple raw input

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

Maple raw output

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