\[ \boxed { x{\frac {\rm d}{{\rm d}x}}y \left ( x \right ) +ay \left ( x \right ) -f \left ( x \right ) g \left ( {x}^{a}y \left ( x \right ) \right ) =0} \]
Mathematica: cpu = 5.142653 (sec), leaf count = 39 \[ \text {Solve}\left [\int _1^{x^a y(x)} \frac {1}{g(K[1])} \, dK[1]=\int _1^x K[2]^{a-1} f(K[2]) \, dK[2]+c_1,y(x)\right ] \]
Maple: cpu = 0.203 (sec), leaf count = 33 \[ \left \{ y \left ( x \right ) ={\frac {{\it RootOf} \left ( -\int \!{x}^{ a-1}f \left ( x \right ) \,{\rm d}x+\int ^{{\it \_Z}}\! \left ( g \left ( {\it \_a} \right ) \right ) ^{-1}{d{\it \_a}}+{\it \_C1} \right ) }{{x}^ {a}}} \right \} \]