\[ \boxed { xy \left ( x \right ) {\frac {{\rm d}^{2}}{{\rm d}{x}^{2}}}y \left ( x \right ) +x \left ( {\frac {\rm d}{{\rm d}x}}y \left ( x \right ) \right ) ^{2}+ay \left ( x \right ) {\frac {\rm d}{{\rm d}x}}y \left ( x \right ) +f \left ( x \right ) =0} \]
Mathematica: cpu = 11.966520 (sec), leaf count = 104 \[ \left \{\left \{y(x)\to -\sqrt {2} \sqrt {\int _1^x K[2]^{-a} \left (-\left (\int _1^{K[2]} K[1]^{a-1} f(K[1]) \, dK[1]+c_1\right )\right ) \, dK[2]+c_2}\right \},\left \{y(x)\to \sqrt {2} \sqrt {\int _1^x K[2]^{-a} \left (-\left (\int _1^{K[2]} K[1]^{a-1} f(K[1]) \, dK[1]+c_1\right )\right ) \, dK[2]+c_2}\right \}\right \} \]
Maple: cpu = 0.063 (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 \} \]