Creating a smooth function which is positive on some arbitrary open set $U \subset \mathbb{R}^n$. I am looking for a $C^\infty$ function which is positive on an arbitrary open $U\subset \mathbb{R}^n$ and is zero on the boundary of $U$. Furthermore, the differential of the function on the boundary should not be zero.
How can such a function be constructed?
 A: This is what a believe to be an example of such a function.
Let's consider first $ V \subset \mathbb{R} $, where $ V = ( a, b ) $ is an open set for some real numbers $ a, b \in \mathbb{R} $.
Consider the function
$\ f : V \to ( 0, 1 ) $ defined by:
$ f(x) = \mathrm{sin} \left(  \frac{  \pi\ (x-a) } { b-a } \right) $
A quick plot:

We see that $\ f(x)>0$ always positive for $x \in ( a, b ) $. In addition to this, the derivative of $\ f$ is non zero at $x=a$ and $x=b$. This function is also $C^{\infty}$.
Now let's generalize this. Consider the set $ U = ( a_{1}, b_{1} ) \times ( a_{2}, b_{2} ) \times \times ..... \times ( a_{n}, b_{n} ) \subset \mathbb{R}^{n} $, where $a_{1}, a_{2}, .....a_{n}, b_{1}, b_{2}, ..... b_{n} \in \mathbb{R}$.
Consider the function $\ g : U \to ( 0, 1 ) $ defined by:
$g(x_{1},x_{2},...,x_{n}) = $  $\mathrm{sin} \left(  \frac{  \pi\ (x_{1}-a_{1}) } { b_{1}-a_{1} } \right) $ $\mathrm{sin} \left(  \frac{  \pi\ (x_{2}-a_{2}) } { b_{2}-a_{2} } \right) $ ..... $\mathrm{sin} \left(  \frac{  \pi\ (x_{n}-a_{n}) } { b_{n}-a_{n} } \right) $
That function is positive for every value on the set $U$ (which is an open "box" of numbers in $\mathbb{R}^n$). Somebody call me out on this if I'm wrong.
