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?
fc[s_] := MaxValue[s x - f[x], x]
? $\endgroup$MaValue[s x - Log[1+E^x], x]
says that no global maxima found (although clearly the function is strictly concave and the unique critical point is a global maximum). $\endgroup$