I have to find the subgradients of the following function.
$$F(x) := \max \left\{0, \frac1{2}(x^2 - 1)\right\}$$
Analytically I can see subdifferentials at $x=-1$ is $\nabla f(-1) \in [-1 ,0] $ and at $x =1$ is $\nabla f(1) \in [0,1]$.
I am facing difficulties while obtaining these subdifferentials ($v$) using following inequality, $f(x) - f(\bar x) \ge \langle v,x-\bar x \rangle, x\in R$.
If I apply $\bar x = -1$ what should be my $f(x)$?
Similarly what should be the $f(x)$ at $\bar x =1$?
How can we obtain above-observed subdifferential using the definition of subdifferential? (above inequality)