I have a problem finding a smooth function on R^k that equals 1 on the ball of radius a, zero outside of the ball of radius b, and is strictly between zero and 1 at intermediate points, where 0<a<b. Any suggestion?
Let r=(a+b)/2 and g the function given by r^k exp(-1/(1-|x|^2/r)) if |x|<r and 0 elsewhere. We denote by h the characteristic function of the ball of center 0 and radius r. Put f(x) =\int_{\mathbb R^k}g(x-y)h(y)dy.