# The Legendre transform of ##f(x) = \exp(\lvert x\rvert )##

## Homework Statement

Let the single variable real function $f:\mathbb{R}\rightarrow\mathbb{R}$ be given by $f(x)=e^{|x|}$.
Determine the Legendre transform of $f$.

## Homework Equations

Let $I\subseteq\mathbb{R}$be an interval, and $f:I\rightarrow\mathbb{R}$a convex function. Then its Legendre transform is the function $f^{\ast}:I^{\ast}\rightarrow\mathbb{R}$defined by : $f^{\ast}(p) = \sup\lbrace xp - f(x)\hspace{1mm}\vert\hspace{1mm}x\in\mathbb{R}\rbrace$.

## The Attempt at a Solution

The function f is clearly a convex function and the supremum can easily by evaluated by finding the global maximum for $xp-f(x)$. This yields

f^{\ast}(p) = \left\lbrace \begin{aligned} &p\big(\ln p - 1\big) \hspace{6pt},\hspace{12pt}p>0 \\ &-1 \hspace{6pt},\hspace{46pt}p=0\\ &f(-p) \hspace{6pt},\hspace{36pt}p<0 \end{aligned} \right.

My problem is that this function isn't convex nor isn't continuous on $\mathbb{R}$ as I would expect the Legendre transform to be... Have I misunderstood something or simply done the legendre transform wrong? If the latter what have I then done wrong?

Ray Vickson
Homework Helper
Dearly Missed

## Homework Statement

Let the single variable real function $f:\mathbb{R}\rightarrow\mathbb{R}$ be given by $f(x)=e^{|x|}$.
Determine the Legendre transform of $f$.

## Homework Equations

Let $I\subseteq\mathbb{R}$be an interval, and $f:I\rightarrow\mathbb{R}$a convex function. Then its Legendre transform is the function $f^{\ast}:I^{\ast}\rightarrow\mathbb{R}$defined by : $f^{\ast}(p) = \sup\lbrace xp - f(x)\hspace{1mm}\vert\hspace{1mm}x\in\mathbb{R}\rbrace$.

## The Attempt at a Solution

The function f is clearly a convex function and the supremum can easily by evaluated by finding the global maximum for $xp-f(x)$. This yields

f^{\ast}(p) = \left\lbrace \begin{aligned} &p\big(\ln p - 1\big) \hspace{6pt},\hspace{12pt}p>0 \\ &-1 \hspace{6pt},\hspace{46pt}p=0\\ &f(-p) \hspace{6pt},\hspace{36pt}p<0 \end{aligned} \right.

My problem is that this function isn't convex nor isn't continuous on $\mathbb{R}$ as I would expect the Legendre transform to be... Have I misunderstood something or simply done the legendre transform wrong? If the latter what have I then done wrong?