We know that if we start with a connected, separable product space $V_1\times,...,\times V_n$ and a complete, transitive, and continuous preference relation $\succsim$ on this product space, that there exists a continuous! utility representation $u:V_1\times,...,\times V_n\rightarrow \mathbb{R}$. However, continuity $\neq$ differentiability. Thus, I am curious under which conditions there even exists a differentiable utility function.
My first idea would be to at least restrict the product space to $\mathbb{R}^n$, but there may be counterexamples. For example, if $n=1$ and $u$ is the Weierstrass function, $u$ is continuous, but not differentiable.
Since in Economics we constantly work with differentiable utility, I am wondering which assumptions are necessary to ensure differentiability.