How can I prove that $0\leq{f(x)}<\frac{1}{2}$ for every $x\neq{0}$, when
$$f(x)= \begin{cases} \frac{1-\cos(x)}{x^2}, & x\neq{0} \\ \frac{1}{2}, & x=0 \end{cases} $$
I know how to see that $0\leq{f(x)}$ but I dont know how to prove the other boundary.
Note that for $x\neq 0$
$$1-\frac{x^2}2< \cos x \le 1$$
thus
$$0\le \frac{1-\cos x}{x^2}< \frac12$$
Observe that $\cos x>1-\frac{x^2}2$ can be easily shown by MVT.
Using mean value theorem to show that $\cos (x)>1-x^2/2$