I need some help with the following exercise:
Assume $A \subset \mathbb{R}$ is a compact set. Is the following function always differentiable?
$f: \mathbb{R}^{n+1} \rightarrow \mathbb{R}, \quad f(x_0, ... x_n) := \sup\limits_{x \in A} \prod\limits_{j=0}^{n} (x-x_j)$
My idea was to show this directly for all partial derivatives:
$\lim\limits_{h \rightarrow 0} \frac{f(x_0,..,x_j+h,..,x_n)-f(x_0,...,x_n)}{h}= \lim\limits_{h \rightarrow 0} \frac{\sup\limits_{x \in A} ((x-x_j-h)\prod\limits_{i\in\{0,...,n\}\setminus\{j\}} (x-x_i))- \sup\limits_{x \in A} (\prod\limits_{i=0}^{n} (x-x_i))}{h}=\lim\limits_{h \rightarrow 0} \frac{\sup\limits_{x \in A} (\prod\limits_{i=0}^{n} (x-x_i)-h(\prod\limits_{i\in\{0,...,n\}\setminus\{j\}}(x-x_i))- \sup\limits_{x \in A} (\prod\limits_{i=0}^{n} (x-x_i))}{h}$
At this point I think it should be possible to show that this limit is finite in general or to search for a example for a non differential case should be easier. Can someone give me a hint how to proceed?
Hint: Consider the situation where $A=[0,1]$. Is $g(x) = f(x,x) = \sup_{y\in A} (x-y)^2$ differentiable everywhere?