\[ a y(x)+b x^n+x y'(x)=0 \] ✓ Mathematica : cpu = 0.042067 (sec), leaf count = 25
\[\left \{\left \{y(x)\to -\frac {b x^n}{a+n}+c_1 x^{-a}\right \}\right \}\] ✓ Maple : cpu = 0.017 (sec), leaf count = 23
\[\left \{y \left (x \right ) = c_{1} x^{-a}-\frac {b \,x^{n}}{a +n}\right \}\]
\[ xy^{\prime }+ay+bx^{n}=0 \]
Linear first order, exact, separable. \(y^{\prime }+\frac {ay}{x}=-bx^{n-1}\), integrating factor \(\mu =e^{\int \frac {a}{x}dx}=e^{a\ln x}=x^{a}\), hence\begin {align*} d\left ( \mu y\right ) & =-\mu bx^{n-1}\\ x^{a}y & =-\int bx^{a+n-1}+C \end {align*}
If \(a=-n\) then
\begin {align*} x^{a}y & =-\int bx^{-1}+C\\ y & =-x^{-a}b\ln \left ( x\right ) +x^{-a}C\\ & =x^{-a}\left ( C-b\ln x\right ) \end {align*}
If \(a\neq -n\) then
\begin {align*} x^{a}y & =-\frac {bx^{a+n}}{a+n}+C\\ y & =-b\frac {x^{n}}{a+n}+Cx^{-a} \end {align*}
Verification
restart; ode:=x*diff(y(x),x)+a*y(x)+b*x^n=0; s1:=x^(-a)*(_C1-b*ln(x)); s2:=-b*(x^n/(a+n))+_C1*x^(-a); odetest(y(x)=s2,ode); 0