Let $f: \mathbb R \rightarrow (-\infty,+\infty]$ be a lower-semicontinuous convex function.


Question
========


* Under what futher conditions does there exists a convex decreasing function $\phi: \mathbb R \rightarrow \mathbb R$ such that $f(x) = \sup\_y x\phi(y)-\phi(-y)$ for all $x \in \mathbb R$ ?
* Construct such a $\phi$ explicitly.


Examples
========


$f(x) = -2\sqrt{x}$ if $ x \ge 0$ and $f(x)=+\infty$ else, then one may take $\phi(x) \equiv e^{-x}$.


Observations
============


Given a decreasing function $\phi$, define its (pseudo-)inverse by $\phi^{-1}(x):=\inf\{t \in \mathbb R \mid \phi(t) \le x\}$, with the usual convention that $\inf\emptyset = +\infty$. Let $T\_\phi(x) := \phi(-\phi^{-1}(x))$, for all $x \in \mathbb R$. Then, with the change of variable $z := \phi(y)$ one has


$$
\sup\_y x\phi(y)-\phi(-y)=\sup\_zxz-\phi(-\phi^{-1}(z)) := T\_\phi^\*(x),
$$
where $T\_\phi^\*$ is the *convex conjugate* of $T\_\phi$. This suggests that one should consider the following problem rather:



> 
> **Reformulated problem.** Given a convex l.s.c function $g$, find decreasing convex function $\phi$ such that $g = T\_\phi$.
> 
> 
> 



Given convex l.s.c. function $f$, find decreasing convex function $\phi$ such that $f(x) \equiv \sup_y x\phi(y)-\phi(-y)$
$\newcommand{\R}{\mathbb{R}}
\newcommand{\tto}{\underset{\text{onto}}\to}$
Let us answer the reformulated question: given a convex function $g\colon C\to\R$, when is it possible to find a decreasing convex function $\phi\colon\R\to\R$ such that 
\begin{equation}
\phi\circ(-\phi^{-1})=g? \tag{1} 
\end{equation}
Here $C$ is a convex subset of $\R$, that is, an interval with some endpoints $c$ and $d$ such that $-\infty\le c<d\le\infty$ (excluding the trivial case when $c=d$). 


First here, note that any convex function from $\R$ to $\R$ is continuous. So, the generalized inverse $\psi:=\phi^{-1}$ of a decreasing convex function $\phi\colon\R\to\R$ is just a regular inverse, and the function $\psi=\phi^{-1}$ is also decreasing and convex. 


Also, (1) implies that $\psi=\phi^{-1}$ is defined only on $C$, so that we may write $\phi\colon\R\tto C$ (rather than $\phi\colon\R\to\R$) and $\psi=\phi^{-1}\colon C\tto\R$, where $\tto$ means that the map is onto. So, again in view of (1), we may write  

\begin{equation}
 g=\phi\circ(-\phi^{-1})\colon C\tto C. \tag{1.00}
\end{equation}
Moreover, because the function $\phi\colon\R\tto C$ is decreasing and convex, we see that necessarily 
\begin{equation\*}
 C=(c,d)\text{ for }d=\infty\text{ and some}\ c\in[-\infty,\infty). \tag{1.0}
\end{equation\*}


Next, (1) can be rewritten as 
\begin{equation}
 \psi\circ g=-\psi, \tag{1a}
\end{equation}
which implies $\psi\circ g\circ g=-\psi\circ g=\psi$ and hence 
\begin{equation}
g\circ g=\text{id}\_C, \tag{2} 
\end{equation}
where $\text{id}\_C$ is the identity map of $C$; this simple observation is crucial. 


In particular, $g$ is one-to-one. Since $g$ is convex and l.s.c., it follows that $g$ is continuous. Therefore and because $g$ is one-to-one, we see that either $g$ is increasing on $C$ or decreasing on $C$. The convexity of $g$ also implies the existence of the left and right derivatives $g'\_-(x)$ and $g'\_+(x)$ at any point $x\in(c,d)$. 


Consider first the case when $g$ is increasing on $C$. Then the identity $g(g(x))=x$ for $x\in C$ implies $g'\_-(g(x))g'\_-(x)=1$ and $g'\_+(g(x))g'\_+(x)=1$ for all $x\in(c,d)$. So, if $g'\_-(a)<g'\_+(b)$ for some $a$ and $b$ such that $c<a\le b<d$, then $g'\_-(g(a))>g'\_+(g(b))$, which latter contradicts the convexity of $g$ (which implies that $g'\_-(x)\le g'\_+(y)$ for all $x$ and $y$ such that $c<x\le y<d$). So, here we have $g'\_-(a)=g'\_+(b)$ for all $a$ and $b$ such that $c<a\le b<d$. 
Thus, if the function $g$ is increasing on $C$, it must be affine. It is then easy to see that the condition $g\circ g=\text{id}\_C$ implies $g=\text{id}\_C$. 
So, in this case the only solution of equation (1a) is $\psi=0$, which is not a decreasing function. 


It remains to consider the case when $g\colon C\tto C$ is decreasing and convex. Then $g(c+)=d$ and $g(d+)=c$, and $g$ is a bijection of $C$. Since $g$ is continuous and $c<d$, the equation 
\begin{equation}
g(z)=z \tag{3}
\end{equation}
has a unique root $z\in(c,d)$. 


Since $g$ is decreasing and convex, we also have $g'\_+(g(x))g'\_-(x)=1$ for all $x\in(c,d)$. Hence, $g'\_+(z)g'\_-(z)=1$. Also, $g'\_-(z)\le g'\_+(z)\le0$. Therefore, 
\begin{equation}
g'\_-(z)\le-1. \tag{4}
\end{equation} 


For $x\in C$, let now 
\begin{equation\*}
 \psi(x):=\left\{
 \begin{aligned}
 z-x&\text{ if }x\ge z,\\ 
 g(x)-z&\text{ if }x\le z. 
 \end{aligned}
 \right. \tag{5}
\end{equation\*}
This definition is valid, because, in view of (3), $z-x=0=g(x)-z$ if $x=z$. Next, $\psi$ is decreasing, since $g$ is decreasing. 


Further, $\psi$ is obviously convex on $[z,\infty)\cap C$, and $\psi$ is convex on $(-\infty,z]\cap C$ -- because $g$ is convex. Also, in view of (4), $\psi'\_+(z)=-1\ge g'\_-(z)=\psi'\_-(z)$. So, $\psi$ is convex on $C$. 


Moreover, (i) in view of (1.0), $\psi(d-)=\psi(\infty-)=-\infty$ and (ii) in view of (1.00), $\psi(c+)=g(c+)-z=d-z=\infty$, so that $\psi\colon C\tto\R$ and hence 
$\phi=\psi^{-1}\colon\R\tto C$. 


Finally, recalling that $g$ is decreasing and (2) holds, it is straightforward to check that (1a) holds for the so-defined $\psi$. 


Thus, for any l.s.c. convex function $g\colon C\to\R$, the following two conditions are equivalent to each other: 


(I) there exists a decreasing convex function $\phi\colon\R\to\R$ such that (1) holds; 


(II) $C$ is as in (1.0) and $g$ is a decreasing involution of $C$ -- that is, $g$ is a decreasing bijection of $C$ satisfying condition (2). 


One may also note that, if condition (II) holds and if $\psi$ is given by (5), then for $\phi=\psi^{-1}$ and all real $y$ we have 
\begin{equation\*}
 \phi(y)=\left\{
 \begin{aligned}
 z-y&\text{ if }y\le0,\\ 
 g^{-1}(z+y)&\text{ if }y\ge0. 
 \end{aligned}
 \right. 
\end{equation\*}


