\[ y''(x)=\frac {y(x)}{f(x)}-\frac {x y'(x)}{f(x)} \] ✓ Mathematica : cpu = 0.051898 (sec), leaf count = 46
DSolve[Derivative[2][y][x] == y[x]/f[x] - (x*Derivative[1][y][x])/f[x],y[x],x]
\[\left \{\left \{y(x)\to c_2 x \int _1^x\frac {\exp \left (-\int _1^{K[2]}\frac {K[1]}{f(K[1])}dK[1]\right )}{K[2]^2}dK[2]+c_1 x\right \}\right \}\] ✓ Maple : cpu = 0.065 (sec), leaf count = 30
dsolve(diff(diff(y(x),x),x) = -x/f(x)*diff(y(x),x)+1/f(x)*y(x),y(x))
\[y \left (x \right ) = x \left (\left (\int {\mathrm e}^{\int \frac {-2-\frac {x^{2}}{f \left (x \right )}}{x}d x}d x \right ) c_{1}+c_{2}\right )\]