\[ \boxed { \left ( {\frac {\rm d}{{\rm d}x}}y \left ( x \right ) \right ) ^{2}+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}- \left ( g \left ( x \right ) - \left ( f \left ( x \right ) \right ) ^{2} \right ) {{\rm e}^{-2\,\int _{a}^{x}\!f \left ( {\it xp} \right ) \,{\rm d}{\it xp}}}=0} \]
Mathematica: cpu = 58.132882 (sec), leaf count = 52 \[ \text {DSolve}\left [-\left (g(x)-f(x)^2\right ) e^{-2 \int _a^x f(\text {xp}) \, d\text {xp}}+2 f(x) y(x) y'(x)+g(x) y(x)^2+y'(x)^2=0,y(x),x\right ] \]
Maple: cpu = 3.822 (sec), leaf count = 310 \[ \left \{ y \left ( x \right ) =-\tan \left ( {\frac {1}{2\,\cos \left ( 2 \right ) +2} \left ( -2\,{\it \_C1}\,\cos \left ( 2 \right ) +\sqrt {2} \int \! \left ( {{\rm e}^{\int _{a}^{x}\!f \left ( {\it xp} \right ) \,{\rm d}{\it xp}}} \right ) ^{2}\sqrt {-{\frac {\cos \left ( 4 \right ) \left ( f \left ( x \right ) \right ) ^{2}}{ \left ( {{\rm e}^{\int _{a}^{ x}\!f \left ( {\it xp} \right ) \,{\rm d}{\it xp}}} \right ) ^{4}}}-4\,{ \frac {\cos \left ( 2 \right ) \left ( f \left ( x \right ) \right ) ^{2} }{ \left ( {{\rm e}^{\int _{a}^{x}\!f \left ( {\it xp} \right ) \,{\rm d}{ \it xp}}} \right ) ^{4}}}+{\frac {\cos \left ( 4 \right ) g \left ( x \right ) }{ \left ( {{\rm e}^{\int _{a}^{x}\!f \left ( {\it xp} \right ) \,{\rm d}{\it xp}}} \right ) ^{4}}}+4\,{\frac {\cos \left ( 2 \right ) g \left ( x \right ) }{ \left ( {{\rm e}^{\int _{a}^{x}\!f \left ( {\it xp} \right ) \,{\rm d}{\it xp}}} \right ) ^{4}}}-3\,{\frac { \left ( f \left ( x \right ) \right ) ^{2}}{ \left ( {{\rm e}^{\int _{a}^{x}\!f \left ( {\it xp} \right ) \,{\rm d}{\it xp}}} \right ) ^{4}}}+3\,{\frac {g \left ( x \right ) }{ \left ( {{\rm e}^{\int _{a}^{x}\!f \left ( {\it xp } \right ) \,{\rm d}{\it xp}}} \right ) ^{4}}}}\,{\rm d}x-2\,{\it \_C1} \right ) } \right ) \sqrt {{{{\rm e}^{-2\,\int _{a}^{x}\!f \left ( {\it xp} \right ) \,{\rm d}{\it xp}}} \left ( \left ( \tan \left ( {\frac {1}{ 2\,\cos \left ( 2 \right ) +2} \left ( -2\,{\it \_C1}\,\cos \left ( 2 \right ) +\sqrt {2}\int \! \left ( {{\rm e}^{\int _{a}^{x}\!f \left ( { \it xp} \right ) \,{\rm d}{\it xp}}} \right ) ^{2}\sqrt {-{\frac {\cos \left ( 4 \right ) \left ( f \left ( x \right ) \right ) ^{2}}{ \left ( { {\rm e}^{\int _{a}^{x}\!f \left ( {\it xp} \right ) \,{\rm d}{\it xp}}} \right ) ^{4}}}-4\,{\frac {\cos \left ( 2 \right ) \left ( f \left ( x \right ) \right ) ^{2}}{ \left ( {{\rm e}^{\int _{a}^{x}\!f \left ( {\it xp} \right ) \,{\rm d}{\it xp}}} \right ) ^{4}}}+{\frac {\cos \left ( 4 \right ) g \left ( x \right ) }{ \left ( {{\rm e}^{\int _{a}^{x}\!f \left ( {\it xp} \right ) \,{\rm d}{\it xp}}} \right ) ^{4}}}+4\,{\frac {\cos \left ( 2 \right ) g \left ( x \right ) }{ \left ( {{\rm e}^{\int _{a} ^{x}\!f \left ( {\it xp} \right ) \,{\rm d}{\it xp}}} \right ) ^{4}}}-3\, {\frac { \left ( f \left ( x \right ) \right ) ^{2}}{ \left ( {{\rm e}^{ \int _{a}^{x}\!f \left ( {\it xp} \right ) \,{\rm d}{\it xp}}} \right ) ^{ 4}}}+3\,{\frac {g \left ( x \right ) }{ \left ( {{\rm e}^{\int _{a}^{x}\!f \left ( {\it xp} \right ) \,{\rm d}{\it xp}}} \right ) ^{4}}}}\,{\rm d}x -2\,{\it \_C1} \right ) } \right ) \right ) ^{2}+1 \right ) ^{-1}}} \right \} \]