Prove that for $x\in\mathbb{R}$ $$ \cos x\geq 1-\frac{x^2}{2}. $$
My try:
Consider $g(x)=\cos(x)-1+\frac{x^2}{2}.$ If I differentiate $g(x)$ then we get $g'(0)>0$ so locally we get $g(x)>g(0)=0$ and then we can see that the function is increasing for any $x$ the function is increasing and hence we have $g(x)\geq 0$ for any $x \geq 0$. But I am getting that if $x<0$ then $g(x) \leq 0.$ So this inequality isn't true in general for all $x \in \Bbb R$.
But, if we use Taylor's theorem with Lagrange's remainder then also I am not sure what will be the point $\zeta\in [-x,0]$ where $\cos(x)=1-\frac{x^2}{2}+\frac{x^4}{4}\cos(\zeta).$

You can use the following corollary of the Mean value theorem:
Now, as both sides of the inequality are even functions, it is enough to prove it for $x\ge 0$.
Let $f(x)=\cos x$, $\:g(x)=1-\dfrac{x^2}2$, $x_0=0$. We indeed have $f(0)=g(0)$, and $f'(x)=-\sin x$, $g'(x)=-x$, and it is well-known that $\sin x \le x$ on the interval $\bigl[0,\frac\pi 2\bigr]$, because $\sin x$ is concave on this interval. As $\frac\pi 2>1$, a fortiori, we have $\sin x \le x $ on $\mathbf R^+$. Therefore $$f'(x)=-\sin x\ge g'(x)=-x\qquad \forall x\ge 0$$