<s>[INST] Proving an inequality(with a term in cosine) using the mean value theorem Given that $x\in \mathbb{R}$ and
$-2\leq x\leq 2$
prove:
$|cos(x) -1 +\frac{x^2}{2}| \leq\frac{2}{3} $
What I have so far:
for all x in between -2 and 2, $cos(x)\in[0, 1] $ and $-1 +\frac{x^2}{2}\in[-1, 1] $
I've tried to solve for this inquality using the mean value theorem and just using the fact that the terms $cos(x)$ and $-1 +\frac{x^2}{2}$ are bounded.  But i can't seem to get to the number 2/3
 [/INST] It's easier.
$$
\cos(x)-1+\frac{x^2}{2} = \sum_{k = 0}^\infty \frac{(-1)^k x^{2k}}{(2k)!} -1+\frac{x^2}{2} = \sum_{k = 2}^\infty \frac{(-1)^k x^{2k}}{(2k)!} 
$$
So:
$$
\left \lvert \cos(x)-1+\frac{x^2}{2} \right \rvert \leq \left \lvert \sum_{k=2}^\infty \frac{ x^{2k}}{(2k)!} \right \rvert = \left \lvert \frac{x^4}{4!}-\frac{x^6}{6!} + \frac{x^8}{8!} - \frac{x^{10}}{10!}+...\right \rvert \leq \left \lvert \frac{x^4}{4!}-\frac{x^6}{6!} \right \rvert + \underbrace{\sum_{k = 4}^\infty \frac{2^{2k}}{(2k)!}}_{=\cosh(2)-\sum_{k = 0}^3 \frac{2^{2k}}{(2k)!}} \leq \frac{26}{45} + \cosh(2)-1-\frac{2^2}{2!}-\frac{2^4}{4!}-\frac{2^6}{6!} \approx 0.5844 
$$
It is a little delicate but works (only with a calculator).
</s>