4.11.5 \(y'(x) (a x+b y(x))=a y(x)+b x\)

ODE
\[ y'(x) (a x+b y(x))=a y(x)+b x \] ODE Classification

[[_homogeneous, `class A`], _rational, [_Abel, `2nd type`, `class A`]]

Book solution method
Equation linear in the variables, \(y'(x)=f\left ( \frac {X_1}{X_2} \right ) \)

Mathematica
cpu = 0.213228 (sec), leaf count = 45

\[\text {Solve}\left [\frac {1}{2} \left ((b-a) \log \left (\frac {y(x)+x}{x}\right )+(a+b) \log \left (1-\frac {y(x)}{x}\right )\right )+b \log (x)=c_1,y(x)\right ]\]

Maple
cpu = 0.386 (sec), leaf count = 65

\[\left [y \left (x \right ) = x \,{\mathrm e}^{\RootOf \left (-{\mathrm e}^{\textit {\_Z}}+{\mathrm e}^{\frac {2 \textit {\_C1} b}{a -b}} {\mathrm e}^{\frac {a \textit {\_Z}}{a -b}} {\mathrm e}^{\frac {\textit {\_Z} b}{a -b}} x^{\frac {2 b}{a -b}}-2\right )}+x\right ]\] Mathematica raw input

DSolve[(a*x + b*y[x])*y'[x] == b*x + a*y[x],y[x],x]

Mathematica raw output

Solve[b*Log[x] + ((-a + b)*Log[(x + y[x])/x] + (a + b)*Log[1 - y[x]/x])/2 == C[1
], y[x]]

Maple raw input

dsolve((a*x+b*y(x))*diff(y(x),x) = b*x+a*y(x), y(x))

Maple raw output

[y(x) = x*exp(RootOf(-exp(_Z)+exp(1/(a-b)*_C1*b)^2*exp(1/(a-b)*a*_Z)*exp(1/(a-b)
*_Z*b)*(x^(1/(a-b)*b))^2-2))+x]