# What is the family / equation of this function?

I'm making up a function and I want to figure out the equation for it so that I can define it continuously. Right now I'm using ExcelGoogle Spreadsheets to define it on a point-by-point basis. I have a feeling it's a type of exponential/logarithmic/power function but I can't prove it.

The function $f(p;x)$ is defined such that given any two inputs $a$ and $b$, and their midpoint $c=\frac{a+b}{2}$, the function's value at $f(p;c)$ is some other fraction $p$ of the interval $[f(a), f(b)]$.

If $p=.5$, then the output $f(c)$ would be exactly the midpoint between $f(a)$ and $f(b)$. If however $p=.25$, then $f(c)=.25\left(f(b)-f(a)\right)+f(a)$. This is essentially "one-quarter" of the way between $f(a)$ and $f(b)$.

For example, if $f(10)=100$ and $f(20)=124$, and $p=.5$, then the value $f(15)$ would be half-way between $[100,124]$, so $f(.5;15) = 112$. But if $p=.25$, then $f(15)$ would be one-fourth of the way, so $f(.25;15)=106$. Similarly, $f\left(\frac{2}{3};15\right)=116$.

Here's the sort-of recursive definition I tried to come up with. In general, for any real $a$, $b$, and $p$,

$$f\left(p;\frac{a+b}{2}\right)=\left(p\right)\left(f(p;b)-f(p;a)\right)+f(p;a)$$

Playing around with some numbers, I found a few interesting properties:

• First of all, when $0\le p\le 1$, the function is increasing (a.k.a. order-isomorphic). That's because if $a\le c\le b$ then $f(a)\le f(c)\le f(b)$. I'm not sure if the function "works" for $p<0$ or $p>1$.

• $f(0;c)=f(0;a)$, even if $c\ne a$.

• When $0<p<0.5$, the function is concave-up, because if $c$ is the midpoint of $[a,b]$ then $f(c)$ is less than the midpoint of $[f(a),f(b)]$. So I think that a value of $0<p<0.5$ yields some sort of exponential or power function. It looks like $\lim_{p\to {0^+}} f(p;x) = \lim_{t\to\infty} x^t$.

• Obviously when $p=0.5$ then $f\left(\frac{a+b}{2}\right)=\frac{f(a)+f(b)}{2}$, which is linear. (I can't figure out how I know it's linear; I just know it is. For sure, it's an addition-preserving isomorphism. Bonus points if you can prove it.) It appears that $\lim_{p\to 1/2} f(p;x) = \lim_{t\to 1} x^t$.

• On the other hand, when $0.5<p<1$, $f(c)$ is greater than the midpoint of $[f(a),f(b)]$, so the function is concave-down, which makes me think logarithmic-like or root-like. It looks like $\lim_{p\to {1^-}} f(p;x) = \lim_{t\to {0^+}} x^t$.

• $f(1;c)=f(1;b)$, even if $c\ne b$.

Bottom line, how can I create an explicit rule that works for all real numbers for any $p$? Is there such a function that can be defined on a continuous interval?

-

Let's look at one of your examples, $p=1/4$. Say $f(0)=0$, $f(1)=1$. Then $f(2)=4$ (because $1=(0+2)/2$, we can get $f(2)$ from $f(0)$ and $f(1)$), and $f(3)=13$ (using $2=(1+3)/2$). Now looking at $f(2)$ and $f(3)$, we get $f(4)=40$; but looking at $f(0)=0$, $f(2)=4$, we get $f(4)=16$. So there is no consistent way to define even $f(4)$.
It doesn't really matter that I started with $f(0)=0$, $f(1)=1$. Start with $f(0)=a$, $f(1)=b$. Then $f(2)=4b-3a$, $f(3)=13b-12a$, and we get $f(4)=40b-39a$ but also $f(4)=16b-15a$. These are only equal if $a=b$, and in that case you will get $f(x)=a$ for every $x$ you can get by averaging, which is every fraction with denominator a power of 2. But those fractions are dense in the reals, so the only continuous functions satisfying just the condition for $p=1/4$ are the constant functions.
Note on the case $p=1/2$. If we apply the midpoint theorem, then $f$ is convex and concave at the same time, so $f$ is necessarily affine.