Prove $1-\frac{1}{2} x^{2} \leq \cos x,\: \forall x \in \mathbb{R}$ Prove that

$$1-\frac{1}{2} x^{2} \leq \cos x,\: \forall x \in \mathbb{R}$$

I am trying to prove this using taylor's theorem:
We have:
$$f(x)=f(0)+f'(0)x+\frac{x^2}{2!}f''(0)+...$$
Now approximating the function as a polynomial of degree $3$ we get:
$$\cos x=1-\frac{x^2}{2!}+\frac{\sin c}{6}x^3$$
where $c \in (0, x)$
Case $1.$ if $0 < x \le \pi$, then we have $\sin c \geq 0$ and $x^3 >0$, so we get
$$\cos x \geq 1-\frac{x^2}{2}$$
Case $2.$ If $\pi < x \leq 2\pi$, i am confused, because $\sin c<0$
Any help?

This proof uses that $|\sin y|\leq |y|.$
Consider the right triangle $A=(\cos x,0),$ $B=(\cos x,\sin x)$ and $C=(1,0).$
Then $$|BC|^2=(1-\cos x)^2+\sin^2 x=2-2\cos x.$$
But we can also show that $|BC|=2|\sin(x/2)|,$ by considering it as the base of an isosceles triangle, $OBC,$ with angle $x$ and equal sides $1.$
We also know that $|\sin y|\leq |y|.$
So $$2-2\cos x=4\sin^2\frac x2<x^2.$$
Rearranging gives your inequality.

This is almost entirely a geometric proof, except for the sine inequality we use.
We can show $|\sin y|\leq |y|$ geometrically, too, if we accept that the shortest path between two points is a line.
The line segment between $(\cos y,\sin y)$ and $(\cos y,-\sin y)$ is of length $2|\sin y|,$ while the path along the circle between the two points is length $2|y|.$ The circle path has to be at least as long as the shortest path, and we get our sine inequality.
