Define the following function
\begin{eqnarray}
f(Q_p) &=& \max \quad x^T(Q-Q_p)x +\mbox{trace}(Q_p X) \\
&&s.t. \quad (x, X) \in \mathcal{P}
\end{eqnarray}
where $\mathcal{P}$ is a bounded polyhedron and we require $Q-Q_p \preceq 0$.
Apparently $f(Q_p)$ is a convex function about $Q_p$.
Now I want to minimize the function $f(Q_p)$ over $Q-Q_p \preceq 0$. This is a convex problem as we are minimizing a convex function over a convex set.
My first question is: is this function $f(Q_p)$ is differentiable? I read in Fiasco's book that if the optimal solution $x,X$ is unique, then the unique gradient is $X-xx^T$ and therefore it is differentiable. So if the optimal solution is not unique, then the subgradient are the convex hull $\mbox{cov}(X-xx^T)$ where $x,X$ are the optimal solutions. But I don't understand why can someone give me an easy explanation?
My second question is that $f(Q_p)$ is generally non-smooth (twice differentiable), but again why this function is generally non-smooth?