Convert function to convex on infinite range, knowing gradient and hessian

Let's take a function $$f=sech(x)$$ as an example. It is strongly convex in a limited range of $$x$$.

It is further assumed that:

1. $$f$$ is a "black box", $$x$$ as input ;
2. output is the value of the function $$f(x)$$ ;
3. as well as the gradient $$G(x)$$ and hessian $$H(x)$$ ;

How to convert $$f(x)$$ to a convex one on an infinite interval, i.e. $$x=[-\inf;\inf]$$, knowing only these 3 output signals.

Clear["Derivative"]
ClearAll["Global*"]

Plot[{Sech[x], -x^2 + 1}, {x, -1.7, 1.7}, PlotRange -> Full,
PlotPoints -> 100]
`

The figure shows an example. What is (blue) and what should be (orange).

• This seems rather like a math question, than a question on Mathematica. In terms of math, may be take a look into composition of convex and non-decreasing functions, see this. You can create your own model with parameters and calibrate it to given data. For instance, you can create input convex neural networks, see this article, and calibrate them to the known data. – Mauricio Fernández Apr 23 at 8:21