Prove $2+2\cos(2\pi\theta) \leq 4\exp(-2\|\theta \|^2)$. Let $\theta \in \mathbb{R}$, and let $\|\theta\|$ denote the distance to the integer nearest to $\theta$.  I want to prove  $$2+2\cos(2\pi\theta) \leq 4\exp(-2\|\theta \|^2).$$  From the double angle formula we arrive at the equivalent  $$|\cos(\pi \theta) | \leq e^{-\|\theta\|^2},$$ and since both sides are 1-periodic, we need only check that $$0 \leq e^{-\theta^2} - \cos(\pi \theta) \qquad \text{for $\theta \in \left[0,\frac{1}{2}\right]$},$$ and $$0 \leq e^{-(1-\theta)^2} + \cos(\pi \theta) \qquad \text{for $\theta \in \left[\frac{1}{2},1\right]$}.$$  It seems like these aren't as easy as "take the derivative a few times."  Any suggestions?
 A: Let's prove the first inequality, namely
$$
\tag{1} \cos (\pi \theta) \leq e^{-\theta^2} \ \ \text{ for } \ \ \theta \in [0,1/2].
$$ 
First, we get rid of the exponential by observing that for any $x\geq 0$ we have $e^{-x} \geq 1-x$, hence it is enough to show
$$
\tag{2} \cos (\pi \theta) \leq 1-\theta^2 \ \ \text{ for } \ \ \theta \in [0,1/2].
$$
Consider the function $f(\theta) = 1-\theta^2 - \cos(\pi \theta)$. We will simply analyse it through differentiation.
We have 
$$f'(x) = -2\theta +\pi \sin(\pi \theta),$$
and 
$$
f''(\theta) = - 2 + \pi^2 \cos(\pi \theta).
$$
Set $\theta_0 = \frac{1}{\pi} \arccos \frac{2}{\pi^2}$ and notice that $f''(\theta) > 0$ for all $\theta \in [0, \theta_0)$ and $f''(\theta) <0 $ when $\theta> \theta_0$. This shows that $f$ is convex in $[0,\theta_0)$ and is concave in $(\theta_0, 1/2]$.
Since $f'(0)= 0$ and $f''>0$ in $[0,\theta_0)$ we see that $f'$ must be positive in $(0,\theta_0)$ and hence $f$ is increasing in $[0,\theta_0)$; in particular 
$f(\theta) \geq 0$ in $[0,\theta_0)$ and $f(\theta_0) >0$.
Finally, $f$ is concave in $(\theta_0, 1/2]$ and is positive at the both endpoints of this interval, hence it cannot become $0$ in $(\theta_0, 1/2]$, since concavity forces $f$ to stay above the straight line joining the points of its graph at $\theta_0$ and $1/2$.
I haven't tried the second inequality, but should be something similar.
A: In fact, because both sides of $|\cos\pi\theta|\le e^{-\Vert\theta\Vert^2}$ are symmetric around $\frac12$ ($f(\theta)=f(1-\theta)$), we only need to check $0\le e^{-\theta^2}-\cos\pi\theta$ for $\theta\in[0,1/2]$. This can be rewritten as
$$e^{-\theta^2}\ge\cos\pi\theta\tag1$$
The idea of the proof of $(1)$ is to find two polynomials $p(x),q(x)$ with $\cos\pi x\le q(x)\le p(x)\le e^{-x^2}$ with $x\in[0,1/2]$ and then prove $q(x)\le p(x)$ over the same range of $x$. These polynomials are truncations of the Maclaurin series of the two sides of $(1)$, to $x^2$ for the LHS and to $x^4$ for the RHS, so we have
$$e^{-x^2}\ge 1-\frac{x^2}2\ge1-\frac{(\pi x)^2}2+\frac{(\pi x)^4}{24}\ge\cos\pi x$$
$$-\frac{x^2}2\ge-\frac{(\pi x)^2}2+\frac{(\pi x)^4}{24}$$
$$-\frac12\ge-\frac{\pi^2}2+\frac{\pi^4x^2}{24}$$
$$\frac{\pi^2-1}2\cdot\frac{24}{\pi^4}\ge x^2$$
$$x\le\sqrt{\frac{\pi^2-1}2\cdot\frac{24}{\pi^4}}=1.045\dots$$
Since this contains $[0,1/2]$, $q(x)\le p(x)$ over the range in question and $(1)$ is proved.
A: To look at Parly Taxels answer from a different direction.
Prove that
$$|\cos(\pi \theta) | \leq e^{-\|\theta\|^2} 
   \quad \text{where} \ \theta \in [0, 0.5]\tag{1.}$$
and where $\|\theta\| = \left|\theta - \lfloor\theta + 0.5 \rfloor \right|$ is the distance to the integer nearest to $\theta$.
It's easy to check this for $\theta = 0$ and for $\theta = 0.5$. So we can ignore those numbers from here on. We can now rewrite eqn$(1)$ as
$$\cos(\pi \theta) \leq e^{-\theta^2} 
   \quad \text{where} \ \theta \in (0, 0.5)\tag{2.}$$
Since $\ln$ is strictly increasing on $(0, \infty)$, eqn$(2.)$ is equivalent to
$$\ln(\cos(\pi \theta)) \leq -\theta^2
   \quad \text{where} \ \theta \in (0, 0.5)\tag{3.}$$
Let $f(\theta) = -\ln(\cos(\pi \theta)) - \theta^2$.
Taking the derivative of both sides wrt $\theta$, we find
$$f'(\theta) = \pi \tan(\pi \theta) - 2\theta$$
Since $\pi \theta$ is in the first quadrant, we know that
$\tan(\pi \theta) > \pi \theta$. It follows that
$\pi \tan(\pi \theta) > \pi^2 \theta > 2 \theta$ Hence $f'(\theta) > 0$ and $f(\theta)$ is strictly increasing on $(0, 0.5)$.
It follows that eqn$(3.)$, eqn$(2.)$, and therefore eqn$(1.)$ is true.
