How do we find the maclaurin polynomial for $\displaystyle f(x)=\left\{\begin{array}{cc}\frac{cos(x)-1}{x},&\mbox{ if }x\not= 0\\0, & \mbox{ if } x=0\end{array}\right,$

Its not the maclaurin polynomial part that i dont understand its how i differentiate the pairwise function and find $\displaystyle f(0),f'(0),f''(0)....$

Thanks for any help