# construction of a smooth function using mollifiers

let $r>0$ and $B(x_0, r) \subset R^n$ . My problem is construct a function $u \in C^{\infty}_{0}(B(x_0, 2r))$ using mollification satisfying

$$u = 1 \text{ on } \overline{B(x_0, r)}$$ and $$|\nabla u| \leq \frac{2}{r}$$

maybe this help : using mollifiers I can construct a function $h \in C^\infty_0(B(x_0, 2r))$ where $h(x) = 1$ if $x \in B(x_0, r)$ and $h(x) = 0$ near the boundary of $B(x_0, 2r)$

Someone can help me ?

Let $x_0 =0$. Let $f(t)=e^{1+\frac{3}{t}}$ and $g(t)= f(t-4)$. Note
$$g(t)=1 \;\; 0 \leq t \leq 1$$ $$g(t)=0 \;\; t>4$$ $$|g'(t)| \leq \frac{1}{2}$$
Let $\eta(x) = g(\frac{|x|^2}{r^2})$. Then $\eta \in C^{\infty}(R^n)$ and by a direct computation we have that
$$\eta(x)= 1 \; \; on \; B(0,r)$$ $$\eta(x) =0 \; \; on \; R^n- B(0,2r)$$ $$|\nabla \eta(x) | \leq \frac{2}{r}$$
• the suport of your function is a compact inside of $B(0,2r)?$ – math student Jul 18 '13 at 19:36
• No! it coincides with $B(0,2r)$ (the function is null along the boundary of $B(0,2r)$. I thounght that you have been looking for a function like that...However i think that a small perturbation of the function above generates the requested function. I'm going to add it later in my answer. – user55449 Jul 19 '13 at 8:19