When calculating the limit of a fraction, it can be useful to know l'Hôpital's Rule. L'Hôpital's Rule states that if f(a) = g(a) = 0, then the limit as x tends to a of $$\frac{f(x)}{g(x)}$$ is the same as the limit as x tends to a of $$\frac{f'(x)}{g'(x)}.$$ So, for example, the limit as x tends to 0 of $$\frac{1 - \cos x}{x^2}$$ is the same as the limit of $$\frac{\sin x}{2x},$$ which in turn is the limit of $$\frac{\cos x}{2},$$ which is 1/2.
A couple of things to note:
(L'Hôpital's rule works because of Taylor's Theorem: $$\lim_{x \to a}\,\frac{f(x)}{g(x)} = \lim_{x \to a}\,\frac{f(a)+(x-a)f'(a)+\dots}{g(a)+(x-a)g'(a)+\dots}.$$ Now, if f(a)=g(a)=0, but g'(a) is non-zero, this is simply $$\frac{f'(a)}{g'(a)}.$$ This mini-proof doesn't cover cases like our example, in which f'(a)=g'(a)=0 and we need to differentiate again, but it's not hard to extent it to such cases.)