\(\begin{array}{l}f'({x_0}) = \mathop {\lim }\limits_{x \to {x_0}} \frac{{f(x) - f({x_0})}}{{x - {x_0}}} = \mathop {\lim }\limits_{x \to {x_0}} \frac{{\cos x - \cos {x_0}}}{{x - {x_0}}} = \mathop {\lim }\limits_{x \to {x_0}} \frac{{ - 2\,.\,\sin \frac{{x + {x_0}}}{2}.\sin \frac{{x - {x_0}}}{2}}}{{x - {x_0}}}\\ = \mathop {\lim }\limits_{x \to {x_0}} \frac{{ - 2.\frac{{x - {x_0}}}{2}.\sin \frac{{x + {x_0}}}{2}}}{{x - {x_0}}} = \mathop {\lim }\limits_{x \to {x_0}} \,\left( { - \sin \frac{{x + {x_0}}}{2}} \right) = - \sin \frac{{2{x_0}}}{2} = - \sin {x_0}\\ \Rightarrow f'(x) = (\cos x)' = - \sin x\end{array}\)