\[ \boxed { {\frac {{\rm d}^{2}}{{\rm d}{x}^{2}}}y \left ( x \right ) - \left ( {\frac {{\frac {\rm d}{{\rm d}x}}f \left ( x \right ) }{f \left ( x \right ) }}+2\,a \right ) {\frac {\rm d}{{\rm d}x}}y \left ( x \right ) + \left ( {\frac {a{\frac {\rm d}{{\rm d}x}}f \left ( x \right ) }{f \left ( x \right ) }}+{a}^{2}-{b}^{2} \left ( f \left ( x \right ) \right ) ^{2} \right ) y \left ( x \right ) =0} \]
Mathematica: cpu = 0.303038 (sec), leaf count = 56 \[ \text {DSolve}\left [y(x) \left (a^2+\frac {a f'(x)}{f(x)}-b^2 f(x)^2\right )-y'(x) \left (2 a+\frac {f'(x)}{f(x)}\right )+y''(x)=0,y(x),x\right ] \]
Maple: cpu = 0.219 (sec), leaf count = 74 \[ \left \{ y \left ( x \right ) ={{\rm e}^{\int \!-{1 \left ( {\frac {f \left ( x \right ) \left ( {{\rm e}^{{\it \_C1}\,b}} \right ) ^{2}b}{ \left ( {{\rm e}^{\int \!f \left ( x \right ) \,{\rm d}xb}} \right ) ^{2} }}+bf \left ( x \right ) -{\frac { \left ( {{\rm e}^{{\it \_C1}\,b}} \right ) ^{2}a}{ \left ( {{\rm e}^{\int \!f \left ( x \right ) \,{\rm d}x b}} \right ) ^{2}}}+a \right ) \left ( {\frac { \left ( {{\rm e}^{{\it \_C1}\,b}} \right ) ^{2}}{ \left ( {{\rm e}^{\int \!f \left ( x \right ) \,{\rm d}xb}} \right ) ^{2}}}-1 \right ) ^{-1}}\,{\rm d}x}}{\it \_C2} \right \} \]