In my assignment I have to solve the following question. I know the answer, but I keep getting it wrong, and I don't know how to solve it.
$$\lim_{x \to 0} \frac{1-\cos x}{x\sin x}$$
I have tried several things, but first I tried to multiply by $(1+\cos x)$, both numerator and denumerator, to get $$\lim_{x \to 0} \frac{1-\cos^2x}{(x\sin x)(1+\cos x)}$$ I keep getting that the limit is equal to $0$, by calculating (for example) $$\lim_{x \to 0} \frac{\frac{1}{\cos^2x}-\frac{\cos^2x}{\cos^2x}}{\frac{(x\sin x)}{\cos^2x}\frac{(1+\cos x)}{\cos^2x}},$$
which equals $$\frac{1-1}{1-1}$$
However, I know the answer is $\frac{1}{2}$.
Any ideas?
Thanks