# A convex function with its related increasing function

Let $$I$$ be an open interval, $$f:I\rightarrow \mathbb{R}$$ be a convex function and $$g:I\rightarrow \mathbb{R}$$ increasing. Then, $$g(x^-), g(x^+)$$, $$f'_-(x)$$ and $$f'_+(x)$$ exist, for all $$x\in I$$. Now, assume that the following inequalities hold $$$$g(x^-)\leq f'_-(x)\leq g(x)\leq f'_+(x)\leq g(x^+)\;\; ;\;\; x \in I.$$$$ For example, the functions $$f(x)=|x|$$ and $$g(x)=\mbox{sgn}(x)$$ satisfy all the above conditions ($$I=\mathbb{R}$$).

Putting $$I_g:=\{x\in I: g\mbox{ is continuous at } x\}$$ and $$I_f:=\{x\in I: f\mbox{ is differentiable at } x\}$$ we have $$I_g\subseteq I_f$$ and $$f'(x)=g(x)$$ on $$I_f$$.

Now, we are looking for such functions $$f$$ and $$g$$ such that $$I_f\neq I_g$$.

Also, some examples such that $$g(x^+)\neq f'_+(x)$$ but $$g(x^-)= f'_-(x)$$, for some $$x\in I$$ (and similarly $$g(x^-)\neq f'_-(x)$$ but $$g(x^+)=f'_+(x)$$, for some $$x\in I$$).

The condition $$g(x^-)\leq f'_-(x)\leq g(x)\leq f'_+(x)\leq g(x^+)$$ for all $$x \in I$$ implies that in fact $$\tag{*} f'_+(x) = g(x^+) \text{ and } f'_-(x) = g(x^-)$$ for all $$x \in I$$, so that $$f$$ is differentiable exactly at the points where $$g$$ is continuous, i.e. the sets $$I_f$$ and $$I_g$$ are identical.
Proof: For fixed $$x < y$$ consider the function $$h(t) = f(t) - \frac{f(y)-f(x)}{y-x}(t-x)$$ which has the left derivative $$h'_-(t) = f'_-(t) - \frac{f(y)-f(x)}{y-x} \, .$$ We have $$h(x) = h(y)$$ so that $$h$$ attains its minimum on the interval $$[x, y]$$ at some point $$t_0$$ with $$x < t_0 \le y$$. Then $$h'_-(t_0) \le 0$$ so that $$\frac{f(y)-f(x)}{y-x} = f'_-(t_0) - h'_-(t_0) \ge f'_-(t_0) \ge g(t_0^-) \ge g(x^+) \, .$$ Taking the limit $$y \to x^+$$ we conclude that $$f'_+(x) \ge g(x^+)$$. This proves the first equality in $$(*)$$, the second one can be proved in the same way.
• The essential idea in the proof is that $$g(x^+) \le g(y^-) \le f'_-(y)$$ for $$x < y$$ and that a lower bound on the left derivative implies a lower bound on the right derivative, compare Infimum of right derivative and infimum of left derivative are equal?.
• For the desired examples you can choose $$g = f'_-$$ or $$g= f'_+$$.
• Many thanks for your nice answer. Only, the first $-$ in the definition of $h(t)$ should be replaced by $+$. Regards. Oct 4 '20 at 6:01
• @M.H.Hooshmand: What exactly do you mean? $h(t)$ is defined such that $h(x) = f(x) = h(y)$, so I think the definition is correct. Or am I misunderstanding something? Oct 4 '20 at 7:35
• $h(x)=f(x)$ but $h(y)=f(y)+f(y)-f(x)$ (thus $x-t$ should be replaced by $t-x$). Oct 4 '20 at 8:10
• @M.H.Hooshmand: OK, now I see the error, it should be fixed now: I meant the second factor to be $(t-x)$, not $(x-t)$. Oct 4 '20 at 8:14