# Conditions for Function to be Maximum of its Legendre Transform Two-variable Equivalent

## Theorem

Let $x, p \in \R$.

Let $\map f x$ be a strictly convex real function.

Let $f^*$ be a Legendre transformed $f$.

Let $\map g {x, p} = - \map {f^*} p + x p$

Then:

$\displaystyle \map f x = \max_p \paren{- \map {f^*} p + x p}$

where $\displaystyle \max_p$ maximises the function with respect to a variable $p$.

## Proof

Function $g$ acquires an extremum along $p$, when its first derivative along $p$ vanishes:

 $\displaystyle \frac {\partial g} {\partial p}$ $=$ $\displaystyle -\frac{\partial f^*} {\partial p} + x$ $\displaystyle$ $=$ $\displaystyle 0$ Extremum condition $\displaystyle \leadsto \ \$ $\displaystyle \map { {f^*}'} p$ $=$ $\displaystyle x$

To check if the extremum is a global maximum, consider the second derivative:

$\dfrac {\partial^2 g} {\partial p^2} = - \dfrac {\partial^2 f^*} {\partial p^2}$

it holds that

 $\displaystyle \frac {\partial^2 f^*} {\partial p^2}$ $>$ $\displaystyle 0$ $\displaystyle \leadsto \ \$ $\displaystyle \frac {\partial^2 g} {\partial p^2}$ $<$ $\displaystyle 0$ $\displaystyle \leadsto \ \$ $\displaystyle \frac {\partial^2 g} {\partial p^2} \bigg \rvert_{\frac {\partial g} {\partial p} \mathop = 0}$ $<$ $\displaystyle 0$

Negative second derivative at the extremum implies extremum being a global maximum.

Therefore:

$\displaystyle \max_p \paren{- \map {f^*} p + x p} = \paren{- \map {f^*} p + x p} \big \rvert_{x = \map {{f^*}'} p}$

The right hand side is the Legendre Transform of $f^*$.

However, $f^*$ is a Legendre transformed $f$.

By Legendre Transform is Involution, this equals $f$.

$\blacksquare$