What are sufficient conditions on $f, g : \mathbb{R}^n \to \mathbb{R}$ such that `$\{x : f(x) \geq t \} \cup \{ x : g(x) \geq u\}$` has piecewise-smooth boundary? What are sufficient conditions on $f, g : \mathbb{R}^n \to \mathbb{R}$ such that $\{x : f(x) \geq t \} \cup \{ x : g(x) \geq u\}$ has piecewise-smooth boundary?  
Some remarks:


*

*I don't mind if the conditions are stronger than necessary.  In my application, $f$ and $g$ will be extremely nice functions anyway.  My dream is just to have a simple-to-state condition backed up by a citation.

*Feel free to assume $f$ and $g$ are nonnegative, compactly supported, and $0 < t < \|f\|_\infty$, $0 < u < \|g\|_\infty$.  I imagine you'll want them to be smooth, too :)

*To be honest, I'm naive enough that I don't even know sufficient conditions on $f$ such that $\{x : f(x) = t\}$ is a piecewise-smooth $(n-1)$-dimensional hypersurface.  Maybe it's enough that $f$ is smooth and $\nabla f$ has only finitely many zeros?

*Perhaps it depends on the definition of "piecewise"?  At first I thought that if $\{x : f(x) \geq t \}$ and $\{ x : g(x) \geq u\}$ both had piecewise-smooth boundary then their union would too.  But now that looks to me like it could be wrong.  E.g., for $n = 2$ the set of points $\{(x,y) : -1 \leq x \leq 1, y \leq \exp(-1/x^2) \sin(1/x)\}$ has piecewise smooth boundary. If we take its union with $\{(x,y) : -1 \leq x \leq 1, y \leq 0\}$, then the "top part" of the resulting set's boundary is the curve $\max(\exp(-1/x^2) \sin(1/x), 0)$.  Is that a piecewise-smooth curve?  Seems like you need to break it into a (countably) infinite number of pieces to get all pieces smooth.  On the other hand, perhaps one could/should (nonstandardly?) define "piecewise-smooth" to allow for countably many pieces.

*Why do I even want the surface to be "piecewise-smooth"?  Well, I want to apply a (higher-dimensional) version of the Cauchy-Crofton formula to it.  In the textbooks I've looked at (e.g., Santalo) they usually assume that their surfaces are piecewise-$\mathcal{C}^1$.  So really, I only need that, but I'm happy to require piecewise-smoothness if that makes things simpler.  What I'd prefer not to have to do is to investigate what weaker conditions suffice for these Cauchy-Crofton-type formulas (e.g., is it okay for "piecewise" to allow for countably many pieces?).
Thanks very much, sorry for my naivete!
 A: If you need a general regularity assumption on $f,g$ but no structural assumption on the shape of the level sets, I think the best one can do is to assume that $f,g$ are real analytic functions. (Of course this requires to drop the assumption of compact support). Then your set is subanalytic and in particular its boundary is made of a finite number of real analytic pieces. Anything less, e.g. $f,g$ in $C^\infty$, may produce a countable number of pieces plus a fat set where the two level sets touch each other (think Cantor). Can't you approximate your problem with real analytic functions?
A: Assume that $\nabla f(x)$ does not vanish on $M:=\{ f=t \}$ and that $\nabla g(x)$ does not vanish on $N:=\{ g=u \}$. This implies that $M$ and $N$ are smooth $n-1$ dimensional submanifolds. Assume further that $\nabla f(x)$ and $\nabla g(x)$ are never linearly dependent at any point of $M\cap N,$ that is, $M$ and $N$ meet transversally; in particular the intersection is a smooth $n-2$ dimensional submanifold of both. So this makes the set $M\cup N$ a union of simple smooth pieces. 
