\[ a y(x) y'(x)+f(x)+x y(x) y''(x)+x y'(x)^2=0 \] ✗ Mathematica : cpu = 300.131 (sec), leaf count = 0 , timed out
$Aborted
✓ Maple : cpu = 0.11 (sec), leaf count = 114
\[ \left \{ y \left ( x \right ) ={\frac {\sqrt {2}}{a-1}\sqrt { \left ( a-1 \right ) \left ( {x}^{1-a}\int \!{\frac {{x}^{a}f \left ( x \right ) }{x}}\,{\rm d}x+{x}^{1-a}{\it \_C1}-\int \!f \left ( x \right ) \,{\rm d}x-{\it \_C2} \right ) }},y \left ( x \right ) =-{\frac {\sqrt {2}}{a-1}\sqrt { \left ( a-1 \right ) \left ( {x}^{1-a}\int \!{\frac {{x}^{a}f \left ( x \right ) }{x}}\,{\rm d}x+{x}^{1-a}{\it \_C1}-\int \!f \left ( x \right ) \,{\rm d}x-{\it \_C2} \right ) }} \right \} \]