\[ \boxed { \left ( {\frac {\rm d}{{\rm d}x}}y \left ( x \right ) \right ) \left ( \left ( {\frac {{\rm d}^{3}}{{\rm d}{x}^{3}}}f \left ( x \right ) \right ) {\frac {\rm d}{{\rm d}x}}y \left ( x \right ) +3\, \left ( {\frac {{\rm d}^{2}}{{\rm d}{x}^{2}}}f \left ( x \right ) \right ) {\frac {{\rm d}^{2}}{{\rm d}{x}^{2}}}y \left ( x \right ) +3\, \left ( {\frac {\rm d}{{\rm d}x}}f \left ( x \right ) \right ) {\frac {{\rm d}^{3}}{{\rm d}{x}^{3}}}y \left ( x \right ) +f \left ( x \right ) {\frac {{\rm d}^{4}}{{\rm d}{x}^{4}}}y \left ( x \right ) \right ) - \left ( {\frac {{\rm d}^{2}}{{\rm d}{x}^{2}}}y \left ( x \right ) \right ) f{\frac {{\rm d}^{3}}{{\rm d}{x}^{3}}}y \left ( x \right ) + \left ( {\frac {\rm d}{{\rm d}x}}y \left ( x \right ) \right ) ^{3} \left ( \left ( {\frac {\rm d}{{\rm d}x}}f \left ( x \right ) \right ) {\frac {\rm d}{{\rm d}x}}y \left ( x \right ) +f \left ( x \right ) {\frac {{\rm d}^{2}}{{\rm d}{x}^{2}}}y \left ( x \right ) \right ) +2\,q \left ( x \right ) \left ( {\frac {\rm d}{{\rm d}x}}y \left ( x \right ) \right ) ^{2}\sin \left ( y \left ( x \right ) \right ) + \left ( q \left ( x \right ) {\frac {{\rm d}^{2}}{{\rm d}{x}^{2}}}y \left ( x \right ) - \left ( {\frac {\rm d}{{\rm d}x}}q \left ( x \right ) \right ) {\frac {\rm d}{{\rm d}x}}y \left ( x \right ) \right ) \cos \left ( y \left ( x \right ) \right ) =0} \]
Mathematica: cpu = 0.806102 (sec), leaf count = 141 \[ \text {DSolve}\left [y'(x)^3 \left (f'(x) y'(x)+f(x) y''(x)\right )-y''(x) \left (f''(x) y'(x)+2 f'(x) y''(x)+f(x) y^{(3)}(x)\right )+y'(x) \left (f^{(3)}(x) y'(x)+3 f''(x) y''(x)+3 y^{(3)}(x) f'(x)+f(x) y^{(4)}(x)\right )+\cos (y(x)) \left (q(x) y''(x)-q'(x) y'(x)\right )+2 q(x) y'(x)^2 \sin (y(x))=0,y(x),x\right ] \]
Maple: cpu = 2.589 (sec), leaf count = 0 \[ \text {could not solve} \]