\[ y''(x)=\frac {y(x)}{f(x)}-\frac {x y'(x)}{f(x)} \] ✗ Mathematica : cpu = 0.216389 (sec), leaf count = 0 , could not solve
DSolve[Derivative[2][y][x] == y[x]/f[x] - (x*Derivative[1][y][x])/f[x], y[x], x]
✓ Maple : cpu = 0.066 (sec), leaf count = 30
\[ \left \{ y \left ( x \right ) =x \left ( {\it \_C1}\,\int \!{{\rm e}^{\int \!{\frac {1}{x} \left ( -2-{\frac {{x}^{2}}{f \left ( x \right ) }} \right ) }\,{\rm d}x}}\,{\rm d}x+{\it \_C2} \right ) \right \} \]