# When do two functions have the same subdifferentials?

For two functions $$f$$ and $$g$$, if $$\nabla f(x) = \nabla g(x)$$, $$f = g + c$$ for some constant $$c$$. Does the same hold if the gradient is replaced by the (convex) subdifferential, ie $$\partial f(x) = \partial g(x)$$ for all $$x$$ ?

And, as a stronger result, can we characterize pairs $$(f, g)$$ for which $$\partial f(x) \cap \partial g(x) \neq \emptyset$$ for all $$x$$ ?

• On which space are $f$ and $g$ defined? Are they finite everywhere?
– gerw
Commented Feb 14 at 11:41
• @gerw This is really an open question so I'd be interested in the simple case where the space is Euclidean and both functions have full domain, or a similar reasonable assumption. If some result holds without this, I'm glad to hear about it too! Commented Feb 14 at 12:18

You need some extra assumptions on $$f$$ and $$g$$. If $$f,g \colon X \to \bar{\mathbb R}$$ are convex and lower semicontinuous and if $$X$$ is a Banach space, then $$\partial f = \partial g$$ imply that $$f$$ and $$g$$ differ by a constant. A proof can be found in the 1970 paper "On the maximal monotonicity of subdifferential mappings" by Rockafellar, see https://doi.org/10.2140/pjm.1970.33.209.
• This makes a lot of sense. This post characterizes $\partial f(x)$ in terms of the Fenchel conjugate $f^*\,.$ So, when we have two functions $f,g$ that are different but have the same Fenchel conjugate we have $\partial f(x)\not=\partial g(x)\,.$ Commented Feb 14 at 13:16
• @KurtG. I do not understand your comment. If $f$ and $g$ have the same Fenchel conjugate, then we trivially have $f = f^{**} = g^{**} = g$.
• $f^*$ is convex and therefore $f^{**}$ is convex. When the function $f$ we started with is not convex we can't have $f^{**}=f\,.$ Commented Feb 14 at 13:55
• When $f$ is not convex, $\partial f$ makes (almost) no sense anyway...