##### 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 Classiﬁcation

[_exact, _rational]

Book solution method
Exact equation

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

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

Maple
cpu = 0.026 (sec), leaf count = 402

$\left [y \left (x \right ) = \frac {\left (-4 x^{3}+12 \textit {\_C1} +4 \sqrt {x^{6}-6 \textit {\_C1} \,x^{3}-4 x^{3}+9 \textit {\_C1}^{2}}\right )^{\frac {1}{3}}}{2}+\frac {2 x}{\left (-4 x^{3}+12 \textit {\_C1} +4 \sqrt {x^{6}-6 \textit {\_C1} \,x^{3}-4 x^{3}+9 \textit {\_C1}^{2}}\right )^{\frac {1}{3}}}, y \left (x \right ) = -\frac {\left (-4 x^{3}+12 \textit {\_C1} +4 \sqrt {x^{6}-6 \textit {\_C1} \,x^{3}-4 x^{3}+9 \textit {\_C1}^{2}}\right )^{\frac {1}{3}}}{4}-\frac {x}{\left (-4 x^{3}+12 \textit {\_C1} +4 \sqrt {x^{6}-6 \textit {\_C1} \,x^{3}-4 x^{3}+9 \textit {\_C1}^{2}}\right )^{\frac {1}{3}}}-\frac {i \sqrt {3}\, \left (\frac {\left (-4 x^{3}+12 \textit {\_C1} +4 \sqrt {x^{6}-6 \textit {\_C1} \,x^{3}-4 x^{3}+9 \textit {\_C1}^{2}}\right )^{\frac {1}{3}}}{2}-\frac {2 x}{\left (-4 x^{3}+12 \textit {\_C1} +4 \sqrt {x^{6}-6 \textit {\_C1} \,x^{3}-4 x^{3}+9 \textit {\_C1}^{2}}\right )^{\frac {1}{3}}}\right )}{2}, y \left (x \right ) = -\frac {\left (-4 x^{3}+12 \textit {\_C1} +4 \sqrt {x^{6}-6 \textit {\_C1} \,x^{3}-4 x^{3}+9 \textit {\_C1}^{2}}\right )^{\frac {1}{3}}}{4}-\frac {x}{\left (-4 x^{3}+12 \textit {\_C1} +4 \sqrt {x^{6}-6 \textit {\_C1} \,x^{3}-4 x^{3}+9 \textit {\_C1}^{2}}\right )^{\frac {1}{3}}}+\frac {i \sqrt {3}\, \left (\frac {\left (-4 x^{3}+12 \textit {\_C1} +4 \sqrt {x^{6}-6 \textit {\_C1} \,x^{3}-4 x^{3}+9 \textit {\_C1}^{2}}\right )^{\frac {1}{3}}}{2}-\frac {2 x}{\left (-4 x^{3}+12 \textit {\_C1} +4 \sqrt {x^{6}-6 \textit {\_C1} \,x^{3}-4 x^{3}+9 \textit {\_C1}^{2}}\right )^{\frac {1}{3}}}\right )}{2}\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]^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