1. ## Legendre Transformation

First, we begin with a definition.

Definition
: Let $f:A\to \mathbb{R}$ be a function defined on a subset $A\subseteq \mathbb{R}^k$. The Legendre transform $f^*$ of $f$ is defined by
$$f^*(p)=\sup\{x\cdot p-f(x)\mid x\in A\}$$
for all $p\in \mathbb{R}^k$ where this supremum on the right-hand side is finite. The domain of $f^*$ will be denoted by $D_{f^*}$ and it is custonary to call the variable $p$, on which $f^*$ depends, the conjugate variable to $x$.

Now, I've a problem as follows.

Let $f:\mathbb{R}\to\mathbb{R}$ be defined by
$$f(x)=\begin{cases} 1 & \text{ if } x<1 \\ 3 x-1 & \text{ if } x\geq 1 \end{cases}$$

a) Check, whether $f$ is a convex function. Is it continuous? [My answer: $f$ is convex, and it is not continuous, in particular at $1$].

b) Determine the Legendre transform $f^*$

c) Determine $f^{**}$ the Legendre transform of $f^*$.

I find it difficult to answer the subproblem b). My guess is by putting $A=\{x\cdot p-f(x)\mid x<1\}$, $B=\{x\cdot p-f(x)\mid x\geq 1\}$ and $C=A\cup B$, so we have to find when $C$ is bounded above when it depends on $p$. Since
$xp-f(x)=px-1$ for $x<1$, I would say that $A$ is bounded above for all $p\geq 0$, and since $xp-f(x)=(p-3)x+1$ for $x\geq 1$, I would say that $B$ is bounded above for all $p\geq 3$. Therefore $C$ must be bounded above for all $p\geq 3$, so $D_{f^*}=[3,\infty)$. But what is $f^*(p)$ here?