\(\displaystyle y = \dfrac{2x - \cos\,x }{x^{2}}\)

\(\displaystyle y'= \dfrac{(x^{2})(2 - (-\sin\,x)) - (2x)(2x - \cos\,x) }{(x^{2})^{2}}\)

\(\displaystyle y'= \dfrac{(x^{2})(2 + \sin\,x) - (2x)(2x - \cos\,x) }{(x^{2})^{2}}\)

\(\displaystyle y' = \dfrac{2x^{2} + \sin^{3}x - 4x^{2} - 2\cos^{2}x}{x^{4}}\)

\(\displaystyle y' = \dfrac{-2x^{2} + \sin^{3}x - 2\cos^{2}x}{x^{4}}\)