\[ \boxed { {\frac {{\rm d}^{2}}{{\rm d}{x}^{2}}}y \left ( x \right ) +f \left ( x \right ) {\frac {\rm d}{{\rm d}x}}y \left ( x \right ) + \left ( 1/4\, \left ( f \left ( x \right ) \right ) ^{2}+1/2\,{\frac {\rm d}{{\rm d}x}}f \left ( x \right ) +a \right ) y \left ( x \right ) =0} \]
Mathematica: cpu = 0.073009 (sec), leaf count = 73 \[ \left \{\left \{y(x)\to c_1 \exp \left (-\frac {1}{2} \int _1^x f(K[1]) \, dK[1]-\sqrt {-a} x\right )+\frac {c_2 e^{\sqrt {-a} x-\frac {1}{2} \int _1^x f(K[1]) \, dK[1]}}{2 \sqrt {-a}}\right \}\right \} \]
Maple: cpu = 0.031 (sec), leaf count = 39 \[ \left \{ y \left ( x \right ) ={\it \_C1}\,{{\rm e}^{-{\frac {\int \!f \left ( x \right ) \,{\rm d}x}{2}}}}\sinh \left ( \sqrt {-a}x \right ) +{ \it \_C2}\,{{\rm e}^{-{\frac {\int \!f \left ( x \right ) \,{\rm d}x}{2} }}}\cosh \left ( \sqrt {-a}x \right ) \right \} \]