\[ 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 = 103.776 (sec), leaf count = 95
\[\text {Solve}\left [\int _1^{y(x) \left (f(x)^{-n} (a g(x)+b)^{-n}\right )^{\frac {1}{n}}} \frac {1}{-\left (a^n\right )^{\frac {1}{n}} K[1]+K[1]^n+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.07 (sec), leaf count = 281
\[ \left \{ y \left ( x \right ) ={\frac {f \left ( x \right ) \left ( ag \left ( x \right ) +b \right ) }{a}{\it RootOf} \left ( -\int ^{{\it \_Z}}\!{\frac { \left ( \left ( {\frac {\rm d}{{\rm d}x}}g \left ( x \right ) \right ) \left ( f \left ( x \right ) \right ) ^{1-n} \left ( ag \left ( x \right ) +b \right ) ^{-n} \right ) ^{-n-1} \left ( f \left ( x \right ) {\frac {\rm d}{{\rm d}x}}g \left ( x \right ) \right ) ^{-2\,n+1} \left ( a \left ( {\frac {\rm d}{{\rm d}x}}g \left ( x \right ) \right ) ^{3}n \left ( f \left ( x \right ) \right ) ^{2-n} \left ( ag \left ( x \right ) +b \right ) ^{-n-1} \right ) ^{n}{n}^{-n}}{{\it \_a}\, \left ( \left ( {\frac {\rm d}{{\rm d}x}}g \left ( x \right ) \right ) \left ( f \left ( x \right ) \right ) ^{1-n} \left ( ag \left ( x \right ) +b \right ) ^{-n} \right ) ^{-n-1} \left ( f \left ( x \right ) {\frac {\rm d}{{\rm d}x}}g \left ( x \right ) \right ) ^{-2\,n+1} \left ( a \left ( {\frac {\rm d}{{\rm d}x}}g \left ( x \right ) \right ) ^{3}n \left ( f \left ( x \right ) \right ) ^{2-n} \left ( ag \left ( x \right ) +b \right ) ^{-n-1} \right ) ^{n}{n}^{-n}- \left ( \left ( {\frac {\rm d}{{\rm d}x}}g \left ( x \right ) \right ) \left ( f \left ( x \right ) \right ) ^{1-n} \left ( ag \left ( x \right ) +b \right ) ^{-n} \right ) ^{-n-1} \left ( f \left ( x \right ) {\frac {\rm d}{{\rm d}x}}g \left ( x \right ) \right ) ^{-2\,n+1} \left ( a \left ( {\frac {\rm d}{{\rm d}x}}g \left ( x \right ) \right ) ^{3}n \left ( f \left ( x \right ) \right ) ^{2-n} \left ( ag \left ( x \right ) +b \right ) ^{-n-1} \right ) ^{n}{n}^{-n}-{{\it \_a}}^{n}}}{d{\it \_a}}-\ln \left ( ag \left ( x \right ) +b \right ) +{\it \_C1} \right ) } \right \} \]