Second derivative of bump function? My question is?
Does there exist a function $f\in C^{2}\left(\mathbb{R}\right)$ such that 
$$\begin{cases}
f\left(x\right) & =1\quad\textrm{when }\left|x\right|<1,\\
f\left(x\right) & =0\quad\textrm{when }\left|x\right|\geq2,\\
f\left(x\right) & \in\left[0,1\right],\forall x\in\mathbb{R},\\
\left|f'\left(x\right)\right| & \leq2,\forall x\in\mathbb{R},\\
\left|f"\left(x\right)\right| & \leq2,,\forall x\in\mathbb{R}.
\end{cases}$$
Thanks.
 A: Observation: Since $f$ is continuous, $\lim_{|x|\rightarrow 1^-}f(x)=1$, so the first inequality is not strict.  (Alternately, $f^{-1}(1)$ is closed).
Therefore, $f(1)=1$ and $f(2)=0$.  So, by the mean value theorem, there is some $c\in(1,2)$ such that $f'(c)=\frac{f(2)-f(1)}{2-1}=-1$.
Since $f$ is constant for $|x|<1$ and $|x|>2$ and the first derivative is continuous, $f'(1)=0$ and $f'(2)=0$.  
Now, we can see that $c$ above must be $\frac{3}{2}$ since otherwise, if $c<\frac{3}{2}$, then there is some $d$ in $(1,c)$ so that $f'(d)=\frac{f(c)-f(1)}{c-1}=-\frac{1}{c-1}$.  Since $c<\frac{3}{2}$, $c-1<\frac{1}{2}$, so $\frac{1}{c-1}>2$, which contradicts the final assumption.
This last observation can be extended as follows: suppose that $a\in(1,\frac{3}{2})$, then $|f'(a)|\leq 2(a-1)$ since, once again by the mean value theorem, there would be a point $b\in(1,a)$ so that $f''(b)=\frac{f'(a)-f'(1)}{a-1}=\frac{f'(a)}{a-1}$, by the last condition, $\frac{|f'(a)|}{a-1}\leq 2$ and the result follows.
Therefore, we see that $f'(a)\geq -2(a-1)$ for all $a\in(1,\frac{3}{2})$.  Similarly, $f'(a)\geq -2(2-a)$ for all $a\in(\frac{3}{2},1)$.  Moreover, since the given bounds are not differentiable, the inequality must be strict at one point (and hence in a neighborhood of that point).
However, $-1=f(2)-f(1)=\int_1^2 f'(x)dx> \int_1^{3/2} -2(x-1)dx+\int_{3/2}^2 -2(2-x)dx=-\frac{1}{4}-\frac{1}{4}=-\frac{1}{2}$.  This is a contradiction.
I feel like I've made a mistake somewhere (since the argument didn't need to be as tight as I expected it to be), but I can't spot it - let me know if you see a hole!
A: Suppose such an $f$ exists. Note that the hypotheses imply $f'(1)=0=f'(2).$ Consider the line connecting $(1,1)$ and $(2,0).$ This line has slope $-1$. Because $f'(1) = 0,$ We have $f(1+h)$ above this line for small $h>0.$ It follows that for any such $h,$the line connecting $(1+h,f(1+h))$ to $(2,0)$ has slope less than $-1.$ That slope, by the mean value theorem, equals $f'(c)$ for some $c\in (1,2).$ Conclusion: $f'(c) < -1$ for some $c\in (1,2).$
Suppose $c\in (1,3/2].$ The mean value theorem then gives
$$|f''(d)| = |\frac{f'(c)-f'(1)}{c-1}| > \frac{1}{c-1}$$
for some $d \in (1,c).$ Because $0<c-1\le 1/2,$ we see $|f''(d)| >2,$ contradiction. A similar argument works if $c\in [3/2,2).$ Thus there can be no such $f.$
