Suppose we have four points, $x_1<x_2<x_3<x_4$
Is anyone able to provide me with an equation for a function that is
- nearly flat $x_1,x_2$ (i.e. $f(x_1)/f(x_2) \approx 1)$
- Steep between $x_3,x_4$ (specifically, I want $\frac{f(x_3)}{f(x_4)}<\frac{f(x_1)}{f(x_2)}$)
- strictly increasing, continuous, positive, and convex over the positive reals
For example, suppose $x_1 = 2.2,x_2=5,x_3=7.5,x_4=9$, Is there a convex, strictly increasing, function where $\frac{f(x_3)}{f(x_4)}<\frac{f(x_1)}{f(x_2)}$
Some comments:
- Im okay with either a general answer or an answer for the specific points i have given
- convexity is not a requirement as long as the function is strictly increasing (I prefer if it is convex though
- I'd like $f(0)=0$ if possible (but not required)
I've been generating a bunch of points in mathematica and trying to generate a curve, but i haven't had luck.
I have also tried an exponential function (this is the steepest thing I could think of),but then $x_1,x_2,x_3,x_4$ need to satisfy $x_1+x_4 > x_3+x_2$, (which my example points don't satisfy)
This has been bugging me because its so easy to draw such a function, but I haven't been able to come up with an equation.
If $g(x)$ is strictly increasing and convex then $f(x)=e^{g(x)}$ is strictly increasing, positive, and convex. Then the requirement $f(x_4)/f(x_3)>f(x_2)/f(x_1)$ reduces to $g(x_4)-g(x_3)>g(x_2)-g(x_1)$. It is much easier to construct such a function, for example by setting $g(x)=1/(c-x)$ when $x_1\le x\le x_4$ and extending linearly outside this interval.