What’s going wrong in the proof of $1-\cos x\le\frac{x^2}2$

inequalityreal-analysistrigonometry

Trivial question, but I'm obviously missing something: What's going wrong in the following attempt to show $$1-\cos x\le\frac{x^2}2\tag1$$ for all $x\in\mathbb R$?

I would argue in the following way: Let $f(x):=\frac{x^2}2+\cos x$. For all $x\in\mathbb R$, $$f'(x)=x-\sin x\tag1$$ and $$f''(x)=1-\cos x\ge0\tag2.$$

By $(2)$, $f'$ is nondecreasing and hence $$f'(x)\ge f'(0)=0\;\;\;\text{for all }x\ge0\tag3$$ which in turn implies that $f$ is nondecreasing on $[0,\infty)$ and hence $$f(x)\ge f(0)=1\;\;\;\text{for all }x\ge0\tag4.$$

However, analogously, since $f'$ is nondecreasing, we obtain $$f'(x)\le f'(0)=0\;\;\;\text{for all }x\le 0\tag5$$ which in turn implies that $f$ is nonincreasing on $(-\infty,0]$ and hence $$f(x)\le f(0)=1\;\;\;\text{for all }x\le 0.\tag6$$

Now $(4)$ yields $$0\le1-\cos x\le\frac{x^2}2\;\;\;\text{for all }x\ge0\tag7,$$ while $(6)$ yields $$\frac{x^2}2\le1-\cos x\;\;\;\text{for all }x\ge0\tag8.$$ What am I missing?

Best Answer

I think you meant to define $f(x)=x^2/2 + \cos(x)$ in the beginning.

Only line $(6)$ is wrong, If $f$ is non increasing on $x≤0$ then $f(x)≥f(0)$ for all $x≤0$.

Related Question