4.8.34 \(x^n y'(x)=a+b x^{n-1} y(x)\)

ODE
\[ x^n y'(x)=a+b x^{n-1} y(x) \] ODE Classification

[_linear]

Book solution method
Linear ODE

Mathematica
cpu = 0.211605 (sec), leaf count = 28

\[\left \{\left \{y(x)\to -\frac {a x^{1-n}}{b+n-1}+c_1 x^b\right \}\right \}\]

Maple
cpu = 0.011 (sec), leaf count = 26

\[\left [y \left (x \right ) = -\frac {x^{1-n} a}{n +b -1}+x^{b} \textit {\_C1}\right ]\] Mathematica raw input

DSolve[x^n*y'[x] == a + b*x^(-1 + n)*y[x],y[x],x]

Mathematica raw output

{{y[x] -> -((a*x^(1 - n))/(-1 + b + n)) + x^b*C[1]}}

Maple raw input

dsolve(x^n*diff(y(x),x) = a+b*x^(n-1)*y(x), y(x))

Maple raw output

[y(x) = -1/(n+b-1)*x^(1-n)*a+x^b*_C1]