4.12.49 \(\left (y(x)^2+x\right ) y'(x)+y(x)=a+b x\)

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.429137 (sec), leaf count = 420

\[\left \{\left \{y(x)\to \frac {-2\ 2^{2/3} x+\sqrt [3]{2} \left (\sqrt {16 x^3+9 \left (2 a x+b x^2+2 c_1\right ){}^2}+6 a x+3 b x^2+6 c_1\right ){}^{2/3}}{2 \sqrt [3]{\sqrt {16 x^3+9 \left (2 a x+b x^2+2 c_1\right ){}^2}+6 a x+3 b x^2+6 c_1}}\right \},\left \{y(x)\to \frac {i \sqrt [3]{2} \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+16 x^3+36 c_1{}^2}+6 a x+3 b x^2+6 c_1\right ){}^{2/3}+2\ 2^{2/3} \left (1+i \sqrt {3}\right ) x}{4 \sqrt [3]{\sqrt {16 x^3+9 \left (2 a x+b x^2+2 c_1\right ){}^2}+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 {16 x^3+9 \left (2 a x+b x^2+2 c_1\right ){}^2}+6 a x+3 b x^2+6 c_1}}-\frac {i \left (\sqrt {3}-i\right ) \sqrt [3]{\sqrt {16 x^3+9 \left (2 a x+b x^2+2 c_1\right ){}^2}+6 a x+3 b x^2+6 c_1}}{2\ 2^{2/3}}\right \}\right \}\]

Maple
cpu = 0.04 (sec), leaf count = 710

\[\left [y \left (x \right ) = \frac {\left (6 b \,x^{2}+12 a x -12 \textit {\_C1} +2 \sqrt {9 b^{2} x^{4}+36 b a \,x^{3}-36 b \,x^{2} \textit {\_C1} +36 a^{2} x^{2}-72 \textit {\_C1} a x +16 x^{3}+36 \textit {\_C1}^{2}}\right )^{\frac {1}{3}}}{2}-\frac {2 x}{\left (6 b \,x^{2}+12 a x -12 \textit {\_C1} +2 \sqrt {9 b^{2} x^{4}+36 b a \,x^{3}-36 b \,x^{2} \textit {\_C1} +36 a^{2} x^{2}-72 \textit {\_C1} a x +16 x^{3}+36 \textit {\_C1}^{2}}\right )^{\frac {1}{3}}}, y \left (x \right ) = -\frac {\left (6 b \,x^{2}+12 a x -12 \textit {\_C1} +2 \sqrt {9 b^{2} x^{4}+36 b a \,x^{3}-36 b \,x^{2} \textit {\_C1} +36 a^{2} x^{2}-72 \textit {\_C1} a x +16 x^{3}+36 \textit {\_C1}^{2}}\right )^{\frac {1}{3}}}{4}+\frac {x}{\left (6 b \,x^{2}+12 a x -12 \textit {\_C1} +2 \sqrt {9 b^{2} x^{4}+36 b a \,x^{3}-36 b \,x^{2} \textit {\_C1} +36 a^{2} x^{2}-72 \textit {\_C1} a x +16 x^{3}+36 \textit {\_C1}^{2}}\right )^{\frac {1}{3}}}-\frac {i \sqrt {3}\, \left (\frac {\left (6 b \,x^{2}+12 a x -12 \textit {\_C1} +2 \sqrt {9 b^{2} x^{4}+36 b a \,x^{3}-36 b \,x^{2} \textit {\_C1} +36 a^{2} x^{2}-72 \textit {\_C1} a x +16 x^{3}+36 \textit {\_C1}^{2}}\right )^{\frac {1}{3}}}{2}+\frac {2 x}{\left (6 b \,x^{2}+12 a x -12 \textit {\_C1} +2 \sqrt {9 b^{2} x^{4}+36 b a \,x^{3}-36 b \,x^{2} \textit {\_C1} +36 a^{2} x^{2}-72 \textit {\_C1} a x +16 x^{3}+36 \textit {\_C1}^{2}}\right )^{\frac {1}{3}}}\right )}{2}, y \left (x \right ) = -\frac {\left (6 b \,x^{2}+12 a x -12 \textit {\_C1} +2 \sqrt {9 b^{2} x^{4}+36 b a \,x^{3}-36 b \,x^{2} \textit {\_C1} +36 a^{2} x^{2}-72 \textit {\_C1} a x +16 x^{3}+36 \textit {\_C1}^{2}}\right )^{\frac {1}{3}}}{4}+\frac {x}{\left (6 b \,x^{2}+12 a x -12 \textit {\_C1} +2 \sqrt {9 b^{2} x^{4}+36 b a \,x^{3}-36 b \,x^{2} \textit {\_C1} +36 a^{2} x^{2}-72 \textit {\_C1} a x +16 x^{3}+36 \textit {\_C1}^{2}}\right )^{\frac {1}{3}}}+\frac {i \sqrt {3}\, \left (\frac {\left (6 b \,x^{2}+12 a x -12 \textit {\_C1} +2 \sqrt {9 b^{2} x^{4}+36 b a \,x^{3}-36 b \,x^{2} \textit {\_C1} +36 a^{2} x^{2}-72 \textit {\_C1} a x +16 x^{3}+36 \textit {\_C1}^{2}}\right )^{\frac {1}{3}}}{2}+\frac {2 x}{\left (6 b \,x^{2}+12 a x -12 \textit {\_C1} +2 \sqrt {9 b^{2} x^{4}+36 b a \,x^{3}-36 b \,x^{2} \textit {\_C1} +36 a^{2} x^{2}-72 \textit {\_C1} a x +16 x^{3}+36 \textit {\_C1}^{2}}\right )^{\frac {1}{3}}}\right )}{2}\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^(2/3)*(1 + I*Sqrt[3])*x + I
*2^(1/3)*(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))/(4*(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))

Maple raw output

[y(x) = 1/2*(6*b*x^2+12*a*x-12*_C1+2*(9*b^2*x^4+36*a*b*x^3-36*_C1*b*x^2+36*a^2*x
^2-72*_C1*a*x+16*x^3+36*_C1^2)^(1/2))^(1/3)-2*x/(6*b*x^2+12*a*x-12*_C1+2*(9*b^2*
x^4+36*a*b*x^3-36*_C1*b*x^2+36*a^2*x^2-72*_C1*a*x+16*x^3+36*_C1^2)^(1/2))^(1/3),
 y(x) = -1/4*(6*b*x^2+12*a*x-12*_C1+2*(9*b^2*x^4+36*a*b*x^3-36*_C1*b*x^2+36*a^2*
x^2-72*_C1*a*x+16*x^3+36*_C1^2)^(1/2))^(1/3)+x/(6*b*x^2+12*a*x-12*_C1+2*(9*b^2*x
^4+36*a*b*x^3-36*_C1*b*x^2+36*a^2*x^2-72*_C1*a*x+16*x^3+36*_C1^2)^(1/2))^(1/3)-1
/2*I*3^(1/2)*(1/2*(6*b*x^2+12*a*x-12*_C1+2*(9*b^2*x^4+36*a*b*x^3-36*_C1*b*x^2+36
*a^2*x^2-72*_C1*a*x+16*x^3+36*_C1^2)^(1/2))^(1/3)+2*x/(6*b*x^2+12*a*x-12*_C1+2*(
9*b^2*x^4+36*a*b*x^3-36*_C1*b*x^2+36*a^2*x^2-72*_C1*a*x+16*x^3+36*_C1^2)^(1/2))^
(1/3)), y(x) = -1/4*(6*b*x^2+12*a*x-12*_C1+2*(9*b^2*x^4+36*a*b*x^3-36*_C1*b*x^2+
36*a^2*x^2-72*_C1*a*x+16*x^3+36*_C1^2)^(1/2))^(1/3)+x/(6*b*x^2+12*a*x-12*_C1+2*(
9*b^2*x^4+36*a*b*x^3-36*_C1*b*x^2+36*a^2*x^2-72*_C1*a*x+16*x^3+36*_C1^2)^(1/2))^
(1/3)+1/2*I*3^(1/2)*(1/2*(6*b*x^2+12*a*x-12*_C1+2*(9*b^2*x^4+36*a*b*x^3-36*_C1*b
*x^2+36*a^2*x^2-72*_C1*a*x+16*x^3+36*_C1^2)^(1/2))^(1/3)+2*x/(6*b*x^2+12*a*x-12*
_C1+2*(9*b^2*x^4+36*a*b*x^3-36*_C1*b*x^2+36*a^2*x^2-72*_C1*a*x+16*x^3+36*_C1^2)^
(1/2))^(1/3))]