4.4.11 \((a x+2) y(x)+x y'(x)+x=0\)

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

[_linear]

Book solution method
Linear ODE

Mathematica
cpu = 0.173713 (sec), leaf count = 37

\[\left \{\left \{y(x)\to \frac {-\frac {a^2 x^2-2 a x+2}{a^3}+c_1 e^{-a x}}{x^2}\right \}\right \}\]

Maple
cpu = 0.02 (sec), leaf count = 36

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

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

Mathematica raw output

{{y[x] -> (-((2 - 2*a*x + a^2*x^2)/a^3) + C[1]/E^(a*x))/x^2}}

Maple raw input

dsolve(x*diff(y(x),x)+x+(a*x+2)*y(x) = 0, y(x))

Maple raw output

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