##### 4.5.22 $$n y(x)+x y'(x)=f(x) g\left (x^n y(x)\right )$$

ODE
$n y(x)+x y'(x)=f(x) g\left (x^n y(x)\right )$ ODE Classiﬁcation

[[_1st_order, _with_symmetry_[F(x),G(x)*y+H(x)]]]

Book solution method
Change of Variable, new dependent variable

Mathematica
cpu = 3.72225 (sec), leaf count = 41

$\text {Solve}\left [\int _1^xf(K[2]) K[2]^{n-1}dK[2]+c_1=\int _1^{x^n y(x)}\frac {1}{g(K[1])}dK[1],y(x)\right ]$

Maple
cpu = 0.307 (sec), leaf count = 33

$\left [y \left (x \right ) = \RootOf \left (-\left (\int x^{n -1} f \left (x \right )d x \right )+\int _{}^{\textit {\_Z}}\frac {1}{g \left (\textit {\_a} \right )}d \textit {\_a} +\textit {\_C1} \right ) x^{-n}\right ]$ Mathematica raw input

DSolve[n*y[x] + x*y'[x] == f[x]*g[x^n*y[x]],y[x],x]

Mathematica raw output

Solve[C[1] + Inactive[Integrate][f[K[2]]*K[2]^(-1 + n), {K[2], 1, x}] == Inactiv
e[Integrate][g[K[1]]^(-1), {K[1], 1, x^n*y[x]}], y[x]]

Maple raw input

dsolve(x*diff(y(x),x)+n*y(x) = f(x)*g(x^n*y(x)), y(x))

Maple raw output

[y(x) = RootOf(-Int(x^(n-1)*f(x),x)+Intat(1/g(_a),_a = _Z)+_C1)/(x^n)]