# Smooth approximation (under supremum norm) of distance to algebraic set in $\mathbb{R}^n$.

Given a set $$S$$ which is the zeroes of a finite number of homogenous polynomials in $$x\in\mathbb{R}^n$$, I want a constant $$\alpha$$ and a $$C^2$$ approximation, denoted $$d$$, to the function $$d(x,S)=\inf_{y\in S}\parallel x-y\parallel_2$$ with bounded first and second derivatives such that $$\sup_{x\in\mathbb{R}^n}|d(x)-d(x,S)|\leq \alpha$$.

My initial approach was to first stratify $$S$$ into a finite number of Nash submanifolds $$\{S_j\}_j$$, each of which has a tubular neighbourhood $$\{U_j\}_j$$ on which $$d(x,S_j)$$ is analytic. I then tried to mollify between these, which was hard in $$\mathbb{R}^n$$, and I also tried a smooth approximation to the minimum of these functions which also didn't work. And Stone-Weierstrass isn't useful as I need these bounds on all of $$\mathbb{R}^n$$.

• This seems like it's really a real analysis question - the distance function to a closed set is actually Lipschitz continuous, and you're asking whether a Lipschitz continuous function can be approximated in the sup-norm by a $C^2$ function. I strongly suspect the answer is yes, but I do not have a reference offhand. Perhaps removing the submanifold tag and retagging as real-analysis would provide exposure to people with more specific knowledge. – KReiser Mar 26 '19 at 21:13