4.5.22 ny(x)+xy(x)=f(x)g(xny(x))

ODE
ny(x)+xy(x)=f(x)g(xny(x)) ODE Classification

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

Book solution method
Change of Variable, new dependent variable

Mathematica
cpu = 4.29333 (sec), leaf count = 39

Solve[1xf(K[2])K[2]n1dK[2]+c1=1xny(x)1g(K[1])dK[1],y(x)]

Maple
cpu = 0.272 (sec), leaf count = 32

{f(x)xn1dxxny(x)(g(_a))1d_a_C1=0} 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] + Integrate[f[K[2]]*K[2]^(-1 + n), {K[2], 1, x}] == 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),'implicit')

Maple raw output

Int(f(x)*x^(n-1),x)-Intat(1/g(_a),_a = x^n*y(x))-_C1 = 0