Finding values for $a,b$ such that $f(x) = 1 - (1 - x^a)^b$ is symmetric in the range $[0,1]$

52 Views Asked by At

I often use the function $f(x) = 1 - (1 - x^a)^b$ for computer graphics purposes to create smooth curves. The function has some nice properties, i.e. its monotonic and a self map in the range $x \in [0,1]$, given that $a,b > 0$.

I would like to generate smoothstep-like curves with this function by finding values for $a$ and $b$ such that the resulting curve is symmetric about the point $(0.5,0.5)$.

I tried to find a formula for $b$ depending on $a$ that satisfies the condition $f(x) = 1 - f(1-x)$ but did not really know how to continue...

Is it even possible to find a value for $b$ for every positive $a$ to satisfy this constraint?

1

There are 1 best solutions below

0
On BEST ANSWER

No such functions exist, except for the trivial case $\,a=b=1\,$ which gives $\,f(x)=x\,$.

The condition for symmetry around point $\,(1/2, 1/2)\,$ is $\,f(x)+f(1-x) = 2 f(1/2)\,$.

  • For $\,x=0\,$ this implies $f(1/2)=\frac{1}{2}\left(f(0)+f(1)\right)=\frac{1}{2}(0+1)=1/2\,$. Therefore:

$$ f(1/2) = 1/2 = 1 - (1- (1/2)^a)^b \quad\implies\quad b = - \frac{\ln(2)}{\ln(1 - (1/2)^{a})} \tag{1} $$

  • Let $\,x-1/2=y\,$, then $\,g(y)=f(y+1/2)-f(1/2)=1/2 - \big(1 - (1/2 - y)^a\big)^b\,$ must be an odd function. Its Taylor expansion at $y=0$ is: $$ g(y) \;=\; - \,\frac{2 a b (1 -2^{-a})^b}{2^a - 1} \cdot y \;-\, \frac{2 a b (1 - 2^{-a})^b \big(a b - (a-1)2^a - 1\big)}{(2^a - 1)^2} \cdot y^2 + \mathcal{O}(y^3) $$ For $\,g\,$ to be odd, the series must contain no even powers of $\,y\,$, in particular the coefficient of $\,y^2\,$ must be $\,0\,$, therefore: $$ a b - (a-1)2^a - 1 = 0 \quad\iff\quad b = \frac{(a-1)2^a+1}{a} \tag{2} $$

Eliminating $\,b\,$ between $(1)$ and $(2)$ gives the equation in $\,a\,$:

$$ - \,\frac{\ln(2)}{\ln(1 - 1/2^{a})} = \frac{(a-1)2^a+1}{a} $$

$a=1\,$ is an obvious solution, and can be verified to be the only real solution e.g. using WA.
Substituting back then gives $\,b=1\,$, so in the end $\,f(x) = x\,$.