ODE
\[ \left (y(x)^2+x\right ) y'(x)+y(x)=a+b x \] ODE Classification
[_exact, _rational]
Book solution method
Exact equation
Mathematica ✓
cpu = 0.218048 (sec), leaf count = 420
\[\left \{\left \{y(x)\to \frac {\sqrt [3]{2} \left (\sqrt {9 \left (2 a x+b x^2+2 c_1\right ){}^2+16 x^3}+6 a x+3 b x^2+6 c_1\right ){}^{2/3}-2\ 2^{2/3} x}{2 \sqrt [3]{\sqrt {9 \left (2 a x+b x^2+2 c_1\right ){}^2+16 x^3}+6 a x+3 b x^2+6 c_1}}\right \},\left \{y(x)\to \frac {i \left (\sqrt {3}+i\right ) \left (\sqrt {36 a^2 x^2+36 a b x^3+72 a c_1 x+9 b^2 x^4+36 b c_1 x^2+36 c_1^2+16 x^3}+6 a x+3 b x^2+6 c_1\right ){}^{2/3}+2 \sqrt [3]{2} \left (1+i \sqrt {3}\right ) x}{2\ 2^{2/3} \sqrt [3]{\sqrt {9 \left (2 a x+b x^2+2 c_1\right ){}^2+16 x^3}+6 a x+3 b x^2+6 c_1}}\right \},\left \{y(x)\to \frac {x-i \sqrt {3} x}{\sqrt [3]{2} \sqrt [3]{\sqrt {9 \left (2 a x+b x^2+2 c_1\right ){}^2+16 x^3}+6 a x+3 b x^2+6 c_1}}-\frac {i \left (\sqrt {3}-i\right ) \sqrt [3]{\sqrt {9 \left (2 a x+b x^2+2 c_1\right ){}^2+16 x^3}+6 a x+3 b x^2+6 c_1}}{2\ 2^{2/3}}\right \}\right \}\]
Maple ✓
cpu = 0.014 (sec), leaf count = 25
\[ \left \{ -{\frac {b{x}^{2}}{2}}-ax+xy \left ( x \right ) +{\frac { \left ( y \left ( x \right ) \right ) ^{3}}{3}}+{\it \_C1}=0 \right \} \] Mathematica raw input
DSolve[y[x] + (x + y[x]^2)*y'[x] == a + b*x,y[x],x]
Mathematica raw output
{{y[x] -> (-2*2^(2/3)*x + 2^(1/3)*(6*a*x + 3*b*x^2 + 6*C[1] + Sqrt[16*x^3 + 9*(2
*a*x + b*x^2 + 2*C[1])^2])^(2/3))/(2*(6*a*x + 3*b*x^2 + 6*C[1] + Sqrt[16*x^3 + 9
*(2*a*x + b*x^2 + 2*C[1])^2])^(1/3))}, {y[x] -> (2*2^(1/3)*(1 + I*Sqrt[3])*x + I
*(I + Sqrt[3])*(6*a*x + 3*b*x^2 + 6*C[1] + Sqrt[36*a^2*x^2 + 16*x^3 + 36*a*b*x^3
+ 9*b^2*x^4 + 72*a*x*C[1] + 36*b*x^2*C[1] + 36*C[1]^2])^(2/3))/(2*2^(2/3)*(6*a*
x + 3*b*x^2 + 6*C[1] + Sqrt[16*x^3 + 9*(2*a*x + b*x^2 + 2*C[1])^2])^(1/3))}, {y[
x] -> (x - I*Sqrt[3]*x)/(2^(1/3)*(6*a*x + 3*b*x^2 + 6*C[1] + Sqrt[16*x^3 + 9*(2*
a*x + b*x^2 + 2*C[1])^2])^(1/3)) - ((I/2)*(-I + Sqrt[3])*(6*a*x + 3*b*x^2 + 6*C[
1] + Sqrt[16*x^3 + 9*(2*a*x + b*x^2 + 2*C[1])^2])^(1/3))/2^(2/3)}}
Maple raw input
dsolve((x+y(x)^2)*diff(y(x),x)+y(x) = b*x+a, y(x),'implicit')
Maple raw output
-1/2*b*x^2-a*x+x*y(x)+1/3*y(x)^3+_C1 = 0