\[ \boxed { \left ( {\frac {{\rm d}^{2}}{{\rm d}{x}^{2}}}y \left ( x \right ) \right ) y \left ( x \right ) +a \left ( {\frac {\rm d}{{\rm d}x}}y \left ( x \right ) \right ) ^{2}+f \left ( x \right ) y \left ( x \right ) {\frac {\rm d}{{\rm d}x}}y \left ( x \right ) +g \left ( x \right ) \left ( y \left ( x \right ) \right ) ^{2}=0} \]
Mathematica: cpu = 41.860316 (sec), leaf count = 38 \[ \text {DSolve}\left [a y'(x)^2+f(x) y(x) y'(x)+g(x) y(x)^2+y(x) y''(x)=0,y(x),x\right ] \]
Maple: cpu = 0.374 (sec), leaf count = 70 \[ \left \{ y \left ( x \right ) ={\it ODESolStruc} \left ( {{\rm e}^{\int \!{\it \_b} \left ( {\it \_a} \right ) \,{\rm d}{\it \_a}+{\it \_C1}}},[ \left \{ {\frac {\rm d}{{\rm d}{\it \_a}}}{\it \_b} \left ( {\it \_a} \right ) = \left ( -a-1 \right ) \left ( {\it \_b} \left ( {\it \_a} \right ) \right ) ^{2}-f \left ( {\it \_a} \right ) {\it \_b} \left ( { \it \_a} \right ) -g \left ( {\it \_a} \right ) \right \} , \left \{ {\it \_a}=x,{\it \_b} \left ( {\it \_a} \right ) ={\frac {{\frac {\rm d}{ {\rm d}x}}y \left ( x \right ) }{y \left ( x \right ) }} \right \} , \left \{ x={\it \_a},y \left ( x \right ) ={{\rm e}^{\int \!{\it \_b} \left ( {\it \_a} \right ) \,{\rm d}{\it \_a}+{\it \_C1}}} \right \} ] \right ) \right \} \]