I want to construct a function $f$ on the unit ball $B$ of $\mathbb{R}^n$, such that it is negative on a closed subset of the boundary $\partial'B\subsetneqq\partial B$, zero on a given point $p\in B$, and there exists an $\epsilon >0$ such that $||grad f||>\epsilon$
My aproach was this. I take an open neighborhood $U\subset \partial B$ of a point on the boundary such that $\bar{U}\cap\partial'B=\emptyset$.
I can find an appropriate affine function $f$ such that it is positive on $U$ and negative on $\partial B\backslash U$. This function also has constant positive $||grad f||$. The problem is, it might not be zero at the given point.
To fix this I tried to move the inside of $B$ while keeping the boundary invariant. I can do this if I take the flow $\Phi$ of a vector field on $B$, which vanishes on the boundary. Then $f\circ\Phi$ has the same boundary behaviour as $f$, and is zero at $p$. My concern is, it might not longer have $||grad (f\circ\Phi)||>\epsilon$ for some $\epsilon$
Please let me know if it can be proved that this function's gradient has the wanted property, or if there's a different approach that works. Thank you
Let's denote the closed set by K, and fix a point $q\in \partial B\backslash K$. You can diffeomorphically map $B \backslash q$ to upper-half $R_n$ by $\Phi$. Denote the coordinates on $R_n$ by $y^i$, for $i=1,...,n$. Now $\Phi(K)$ is on $\{y^n=0\}$. Denote the $y^n$ coordinate of $\Phi(p)$ by $\psi^n$. Then $h=−exp(−y^n)+exp(-\psi^n)$ is negative on $\Phi(K)$ and equals to zero at $\Phi(p)$.
The function $h(\Phi)$ almost satisfy your condition, it is smooth and has non-vanishing gradient on $\overline B\backslash q$, and negative on K, and equals to zero at $p$. However it's singular at $q$. Then we can do a small perturbation to eliminate the singularity.