Define $J:L^1(0,T;L^1) \to \mathbb{R}$ by $$J(v) = \int_0^T \int_\Omega \Psi(v)$$ where $\Psi(v) = \int_0^v \beta(s)\;ds$ where $\beta$ is a nice function that passes through the origin.
We have that $\partial J(u) = \{v \in L^2(0,T;L^2) \mid v = \beta(u) \text{ a.e}\}.$ Why does this mean that
for all $w \in L^2(0,T;L^2)$ $$\int_0^T \int_{\Omega}(\beta(u)u + \Psi(w)) \geq \int_0^T\int_\Omega(\Psi(u) + \beta(u)w)?$$
I thought this may be due to definition of the subdifferential but it doesn't appear so..
I think that as a part of being "nice", $\beta$ should be increasing. This makes $\Psi$ convex.
Let $v=\beta(u)$ and consider the functional $$E(w) = \int_{0}^T \int_\Omega (v w - \Psi(w)) = \left(\int_{0}^T \int_\Omega v w \right)- J(w)$$ Its derivative is zero when $w=u$, because then it is equal to $$ h\mapsto \int_{0}^T \int_\Omega (v h - \beta(u) h) = 0$$ Therefore, $u$ is a point of minimum of $E$. This means $$\int_{0}^T \int_\Omega (v u - \Psi(u)) \le \int_{0}^T \int_\Omega (v w - \Psi(w)) $$ which is the desired inequality.