For example cot(x) has this property, as does tanh(-x) and coth(-x). I am looking to approximate the following dome-shaped function:
$s(x)=\exp(-(x-\theta_1)^2/\theta_2)$
with a function that has the desired property (derivative minus its square is a constant). I have discovered that I can approximate it suitably well for $x>\theta_1$ using $\alpha + \beta$ tanh$(-\gamma x+\delta)$ where the $\beta$tanh$(-\gamma x+\delta)$ part retains the property (I only require the function to have this property "up to addition", i.e. the $\alpha$ term can be ignored).
It is ok if the function is piecewise. But I can't seem to find an appropriate functional form for $x<\theta_1$. coth(-x) provides the right form for some of this domain, but not for all of it.
My question is: is this possible? More precisely, let us say we limit ourselves to a 4-piece function, corresponding to intervals where the function to be approximated is (i) concave increasing, (ii) convex increasing, (iii) convex decreasing and (iv) concave decreasing. Then is it possible to find four or less functions with the desired property for each of theses pieces? Their derivative minus their square over this interval must be constant, but it does not have to be the same constant.
It is curious to me that tanh(-x) does the job for intervals (iii) and (iv), but on the increasing side coth(-x) is only appropriate for interval (i).
The question therefore comes down to: is there a function with this property that is convex increasing?
The less pieces the better of course, so ideally there would be something like tanh(-x) that covers off both concave and convex behaviours on the increasing side of the dome.
tan(x) has both concave increasing and convex increasing behaviour.
Credit for this observation to Tomislav Buric.