I am looking for a $C^\infty $ function $g:\mathbb{R}^3\to \mathbb{R}^3$ such that $g(x)=0$ for $|x|\le 1$ and $g(x)=x$ for $|x|\ge 2$. Certainly such $g$ can be constructed, but I also want it to satisfy the additional property that for each $j=1,2,3$,

Either I misread the problem, or the function $f=\sum_i|(g_i)_{x_i}|$ satisfies $|\nabla f|\le Cf$, so, by Gronwall, $f=0$, whence $g_1$ does not depend on $x_1$, etc. But we want $g_1=x_1$ for large $x$.
–
fedjaNov 24 '11 at 14:21