Let $f(x) = \large\frac{a}{x^4}-\large\frac{b}{x^2}$$+\cos x$

$ f'(x) = \large\frac{d}{dx} \bigg(\large\frac{a}{x^4}\bigg)-\large\frac{d}{dx}\bigg(\large\frac{b}{x^2}\bigg)+\large\frac{d}{dx}$$(\cos x)$

$ = a \large\frac{d}{dx}(x^{-4})-b\large\frac{d}{dx}(x^{-2})+\large\frac{d}{dx}$$(\cos x)$

$ = a(-4x^{-5}) - b(-2x^{-3})+(- \sin x) \qquad \bigg[\large\frac{d}{dx}$$(x^n)=nx^{n-1}\: and \: \large\frac{d}{dx}$$ (\cos x)=-\sin x \bigg]$

$ = \large\frac{-4a}{x^5}$$+\large\frac{2b}{x^3}$$- \sin x$