Skip to main content
1 of 3

Convex conjugate

What is the easiest way to compute the convex conjugagte of a real convex function $f: \mathbb{R} \to \mathbb{R}$, defined by $f^*(s) = \sup_{x} \{ s x - f(x) \}$

I know I can compute the derivative of the inner objective function w.r.t $x$, solve the equation comparing the derivative to 0, and substitute the result into the objective to discover $f^*$. However, is there a built-in function, or an easy one-liner to do that?