Prove: Let $A \subseteq \mathbb{R}$ be a compact set. Prove that the function $f \colon\mathbb{R^{n+1}} \to \mathbb{R}$
$\qquad f(x_0,..., x_n) = \sup_{x\in A} \prod_{j=0}^{n} (x-x_j)$
is continuous. Is it also differentiable?
It is clear to me that the polynomial inside the supremum is continuous and that it would make sense since x is in a compact set, that the supremum really gets attained and changes only slightly when changing coefficients, however I have not been able to formalize this hunch with $\epsilon-\delta$ criteria, sequence continuity or any other equivalent definitions despite my best efforts and asking people at my university. Thanks in advance!
Denote $(x_0, ...., x_n) : = \vec{x} \in \mathbb{R}^{n+1} $, and let $g(x,\vec{x} ) : = \prod\limits_{j=0}^n (x-x_j)$, where $x \in \mathbb{R} $ and $\vec{x} \in \mathbb{R}^{n+1}$. Clearly $g$ is continuous on $\mathbb{R}^{n+1}$. Observe also that $f(\vec{x}) = \sup\limits_{x \in A} g(x, \vec{x}) $.
We now show the continuity of $f$. Fix any point $\vec{x} \in \mathbb{R}^{n+1}$, then the set $K: = A \times \overline{B}(\vec{x}, 1) \subset \mathbb{R}^{n+2}$ is compact, where $\overline{B}(\vec{x}, 1)$ is the closed ball centered at $\vec{x}$ and having radius $1$. Since $g$ is continuous on $K$ and $K$ is compact, it follows by Cantor's theorem that $g$ is uniformly continuous. Hence for each $\varepsilon > 0 $ there exists $\delta> 0 $ such that whenever $\vec{y} \in \mathbb{R}^{n+1}$ is such that $ |\vec{x} - \vec{y}| \leq \delta $ then
$$ |g(x, \vec{x}) - g(x, \vec{y} ) | \leq \varepsilon \ \ \ \forall x\in A. $$ It follows that $$ g(x,\vec{x}) \leq g(x,\vec{y}) + \varepsilon , $$ hence $$ f(\vec{x}) = \sup\limits_{x\in A}g(x,\vec{x}) \leq \sup\limits_{x\in A}g(x,\vec{y}) + \varepsilon = f(\vec{y}) + \varepsilon . $$ Due to symmetry we also get $f(\vec{y}) \leq f(\vec{x}) + \varepsilon $, hence $$ | f(\vec{x}) - f(\vec{y}) | \leq \varepsilon \text{ if } |\vec{x} - \vec{y}| \leq \delta, \tag{1} $$ which establishes the continuity of $f$. Notice that our $\delta>0$ by construction might depend on $\vec{x}$, which was fixed, hence $(1)$ only shows continuity and not uniform continuity of $f$. Also note that we did not use the particular form of $f$ (the product of linear functions) only the continuity of $g$.
Finally, take $n=1$ and let $A = {0,1}$. Then $$f(x_0, x_1) = \max(x_0 x_1 , (1-x_0)(1 - x_1) ) $$ where $x_0, x_1 \in \mathbb{R}$. This should give you a counterexample for differentiability.