Attempt to construct a family of cut off functions satisfying certain conditions Let be $\Omega\subset \mathbb{R}^n $ an open bounded set of class $C^1$ and let be $\Omega'\subset \subset \Omega ''\subset \subset \Omega$.
I'm trying to construct a function $\varphi\in C^\infty (\Omega)$such that:


*

*$0\leq\varphi\leq1$

*$\varphi\equiv 1$ in $\Omega'$

*$\varphi\equiv 0$ in $\Omega \setminus \Omega''$

*$||\nabla \varphi ||_{L^{\infty}(\Omega, \mathbb{R}^n)}\leq \dfrac{2}{{\rm dist}(\Omega',\partial \Omega'')}$



My attempt:  My idea is to use the distance function ${\rm dist }$ and the mollifiers.
Let be $\alpha={\rm dist}(\Omega',\partial \Omega'')$.
I have in mind this function:
$$\varphi(x)=\big [\dfrac {2}{\alpha} {\rm dist}(x,\tilde{\Omega}^c)\wedge 1\big ]*\rho_\epsilon$$
where $\tilde{\Omega}=\big \{ x\in \Omega \;| \;{\rm dist}(x,\Omega')<\dfrac{\alpha}{2} \big \}$, $\rho_\epsilon$ is the standard mollifier (I use the convolution in order to have a $C^\infty$ function) and $\wedge$ is the minimum operator.

Is my example correct? 
My main concern is about the last point. I've constructed this function thinking of the domains as balls and for them the  distance function is linear with respect to the radius.
Does my function satisfy the last request?
Edit What can I say about the gradient of the function  $x \mapsto {\rm dist  }(x,\tilde{\Omega}^c)$? Can I say that it is linear or can I do some estimations?
Thanks for the help!
 A: Since you are actively thinking about this exercise, I will answer your question giving you just some hints. Tell me if you want to see more details.


*

*Your example is almost correct. In order to guarantee that $\varphi\equiv 1$ on $\Omega'$, you should mollify a function which equals $1$ on a neighbourhood of $\overline{\Omega'}$ (not just on $\Omega'$). To accomplish this, it suffices to correct the definition of $\tilde\Omega$ a little: just take $\tilde{\Omega}=\big \{x\in \Omega\mid{\rm dist}(x,\Omega')<\frac{2}{3}\alpha\big\}$ instead.

*Call $\psi(x):=\frac{2}{\alpha}{\rm dist}(x,\tilde{\Omega}^c)\wedge 1$ the function you are mollifying and think $\varphi$ and $\psi$ as functions from $\mathbb{R}^n$ to $\mathbb{R}$, extending them by zero outside $\Omega$ (notice that we still have $\varphi=\psi*\rho_\epsilon$ on $\mathbb{R}^n$).
$\psi$ is a Lipschitz function: can you estimate its Lipschitz constant?

*What happens to the Lipschitz constant of a Lipschitz function $f:\mathbb{R}^n\to\mathbb{R}$ when you mollify it? (this one is the crucial step)

*How is $\|\nabla\varphi\|_{L^\infty(\mathbb{R}^n,\mathbb{R}^n)}$ related to the Lipschitz constant of $\varphi$? Conclude.


As a side note, although $\psi$ could be non-differentiable somewhere, one can still give a meaning to the 'gradient' of $\psi$. There are many ways to do that (Sobolev spaces, Clarke's subdifferential, Dini derivatives, ...): you will surely meet some of them if you pursue your studies in analysis.
