Let $f$ be of class $C^2$ in the plane, and let $S$ be a closed and bounded set such that $f_1(p) = f_2(p) = 0$ for all $p\in S$. Show that there is a constant $M$ such that $|f(p)-f(q)|\leq M\|p-q\|^2$ for all points $p,q\in S$.
So I get the function is locally constant on each point, given its differential is 0, so if $S$ is connected any $M$ works, but if it's made of more than 1 connected set, I'm only aware the $M$ I can find depends on both $\sup\{|f(p)-f(q)|:p,q\in S\}$ and the diameter of the set, but I still don't get how to get into it by using either second derivatives or chain rule (this problem comes from the chain rule section in my textbook).