\[ -a^n f(x)^{1-n} g'(x) y(x)^n-\frac {y(x) f'(x)}{f(x)}-f(x) g'(x)+y'(x)=0 \] ✗ Mathematica : cpu = 300.001 (sec), leaf count = 0 , timed out
$Aborted
✓ Maple : cpu = 0.159 (sec), leaf count = 38
\[ \left \{ {\frac {ay \left ( x \right ) }{nf \left ( x \right ) }{\it LerchPhi} \left ( - \left ( {\frac {ay \left ( x \right ) }{f \left ( x \right ) }} \right ) ^{n},1,{n}^{-1} \right ) }-ag \left ( x \right ) +{\it \_C1}=0 \right \} \]