Concave to convex shape (image inside)

176 Views Asked by At

I am trying to define a simple function that is first concave and then convex as shown in the picture below. Since the resulting equation have to be explained/used by a non-technical audience, the function should be ideally as simple as possible, but I have been unable to find any simple form that matches the requirements below.

enter image description here

Any help of ideas would be greatly appreciated.

EDIT: to further clarify

  1. The dashed red line is the constant line $Y=X$
  2. $X_1$ and $X_2$ should be ideally points that I can control within the function.
4

There are 4 best solutions below

0
On

$f(x)=(x-1)^3+1$ should do.

Lowest power polynomial with desired properties

EDIT

$f(x)=(x-a)^3+a^3+b*x^2$ should give you some control by adequate choice of a and b.

1
On

How about $f(x) = x^3$?

$f''(x) = 6x$ for all $x \in \mathbb{R}$ which means that:

  • $f'' > 0$ for $x > 0$ (concave up)
  • $f'' < 0$ for $x < 0$ (concave down)

You can also shift it up/down and left/right to put the inflection point (currently at $(0,0)$) wherever you want.

0
On
0
On

Assume $f(0) = 0$ and $f(x)$ at $x=0$ is increasing faster than $x$, that is $f'(0) > 1$.

Suppose $A=x_1>0$ is a midpoint of the range, where $f(x)>x$.
Hence the next point of $f(x)=x$ is $x=2A$.

Let $B=x_2$ be the midpoint of the range of $f(x)<x$.
Of course $B>2A$ and then the next $f(x)=x$ shall happen at $x=2B-2A$.

So we can make a function as $$f(x) = x + kx(x-2A)(x-(2B-2A))$$ with $k>0$.

The slope of the graph at the origin: $$f'(0) = 1 + 4kA(B-A)$$