I wish to construct a function $f:\mathbb R \rightarrow \mathbb R$ of class $C^\infty (\mathbb R)$ with the folowing properties:
$f(x)=0$ for $|x|\leq 1$
$f(x)=x$ for $|x| \geq 2$,
$|f(x)| \leq |x|$ for $x \in \mathbb R$.
I wish to construct a function $f:\mathbb R \rightarrow \mathbb R$ of class $C^\infty (\mathbb R)$ with the folowing properties:
$f(x)=0$ for $|x|\leq 1$
$f(x)=x$ for $|x| \geq 2$,
$|f(x)| \leq |x|$ for $x \in \mathbb R$.
Hint: Define $$ f(x)=\begin{cases} 0 & x\leq 0,\\ \exp \left(-1/x\right) & 0<x. \end{cases} $$ The function $g(x)=f(x)f(1-x)$ is smooth. Also, it is non-zero for $x=1/2$ but vanishes when $x<0$ or $x>1$. Consider the function $$ F(x)=\frac{\int_{-\infty}^x g(t)dt}{\int g(t)dt}. $$