\[ f(x)^{1-n} g'(x) y(x)^n \left (-(a g(x)+b)^{-n}\right )-\frac {y(x) f'(x)}{f(x)}-f(x) g'(x)+y'(x)=0 \] ✓ Mathematica : cpu = 0.413774 (sec), leaf count = 96
\[\text {Solve}\left [\int _1^{\left (f(x)^{-n} (b+a g(x))^{-n}\right )^{\frac {1}{n}} y(x)}\frac {1}{K[1]^n-\left (a^n\right )^{\frac {1}{n}} K[1]+1}dK[1]=\frac {f(x) (a g(x)+b) \log (a g(x)+b) \left (f(x)^{-n} (a g(x)+b)^{-n}\right )^{\frac {1}{n}}}{a}+c_1,y(x)\right ]\] ✓ Maple : cpu = 0.126 (sec), leaf count = 281
\[ \left \{ y \left ( x \right ) ={\frac { \left ( ag \left ( x \right ) +b \right ) f \left ( x \right ) }{a}{\it RootOf} \left ( -\int ^{{\it \_Z}}\!{\frac { \left ( \left ( ag \left ( x \right ) +b \right ) ^{-n} \left ( {\frac {\rm d}{{\rm d}x}}g \left ( x \right ) \right ) \left ( f \left ( x \right ) \right ) ^{1-n} \right ) ^{-n-1} \left ( f \left ( x \right ) {\frac {\rm d}{{\rm d}x}}g \left ( x \right ) \right ) ^{-2\,n+1} \left ( \left ( ag \left ( x \right ) +b \right ) ^{-n-1} \left ( {\frac {\rm d}{{\rm d}x}}g \left ( x \right ) \right ) ^{3} \left ( f \left ( x \right ) \right ) ^{2-n}an \right ) ^{n}{n}^{-n}}{{\it \_a}\, \left ( \left ( ag \left ( x \right ) +b \right ) ^{-n} \left ( {\frac {\rm d}{{\rm d}x}}g \left ( x \right ) \right ) \left ( f \left ( x \right ) \right ) ^{1-n} \right ) ^{-n-1} \left ( f \left ( x \right ) {\frac {\rm d}{{\rm d}x}}g \left ( x \right ) \right ) ^{-2\,n+1} \left ( \left ( ag \left ( x \right ) +b \right ) ^{-n-1} \left ( {\frac {\rm d}{{\rm d}x}}g \left ( x \right ) \right ) ^{3} \left ( f \left ( x \right ) \right ) ^{2-n}an \right ) ^{n}{n}^{-n}- \left ( \left ( ag \left ( x \right ) +b \right ) ^{-n} \left ( {\frac {\rm d}{{\rm d}x}}g \left ( x \right ) \right ) \left ( f \left ( x \right ) \right ) ^{1-n} \right ) ^{-n-1} \left ( f \left ( x \right ) {\frac {\rm d}{{\rm d}x}}g \left ( x \right ) \right ) ^{-2\,n+1} \left ( \left ( ag \left ( x \right ) +b \right ) ^{-n-1} \left ( {\frac {\rm d}{{\rm d}x}}g \left ( x \right ) \right ) ^{3} \left ( f \left ( x \right ) \right ) ^{2-n}an \right ) ^{n}{n}^{-n}-{{\it \_a}}^{n}}}{d{\it \_a}}-\ln \left ( ag \left ( x \right ) +b \right ) +{\it \_C1} \right ) } \right \} \]