How can I determine $ f(x)$ if $f(1-f(x))=x$ for all real $x$? I have already recognized one problem caused from this: it follows that $ f(f(x))=1-x $, which is discontinuous. So how can I construct a function $f(x)$?
Best regards and thanks, John
How can I determine $ f(x)$ if $f(1-f(x))=x$ for all real $x$? I have already recognized one problem caused from this: it follows that $ f(f(x))=1-x $, which is discontinuous. So how can I construct a function $f(x)$?
Best regards and thanks, John
This answer is heavily inspired by Adrian Keister's work. Define $$g(x):=f\left(x+\frac{1}{2}\right)-\frac12\text{ for each }x\in\mathbb{R}\,.$$ (Note that $f(x)=g\left(x-\dfrac12\right)+\dfrac12$ for all $x\in\mathbb{R}$.) Thus, $$\begin{align}g\big(-g(x)\big)&=f\left(-g(x)+\frac12\right)-\frac12\\&=f\Biggl(1-f\left(x+\frac{1}{2}\right)\biggr)-\frac12\\&=\left(x+\frac12\right)-\frac12=x\end{align}$$ for all $x\in\mathbb{R}$. Thus, $g:\mathbb{R}\to\mathbb{R}$ is a bijection and $$g^{-1}(x)=-g(x)\text{ for every }x\in\mathbb{R}\,.$$ Now, $$\begin{align}g(x)+g(-x)&=g(x)+g\Big(-g\big(g^{-1}(x)\big)\Big)\\&=g(x)+g^{-1}(x)=g(x)-g(x)=0\end{align}$$ for all $x\in\mathbb{R}$. That is, $g$ is an odd function, and so $g(0)=0$.
In fact, $x=0$ is the only fixed point of $g$; for $g(t)=t$ implies $$t=g\big(-g(t)\big)=g(-t)=-g(t)=-t\,.$$ Suppose also that $g(s)=-s$ for some $s\in\mathbb{R}$. Then, $$s=g\big(-g(s)\big)=g(s)=-s\,.$$ Therefore, $s=0$.
Let $a\neq 0$. Suppose that $g(a)=b$ (noting that $b\neq a$ and $b\neq -a$). We then have $$g(b)=-g(-b)=-g\big(-g(a)\big)=-a\,.$$ Thus, we have a pattern $$a\mapsto b\mapsto -a\mapsto -b\mapsto a$$ under $g$. Therefore, the sets $$\big\{a,g(a),-a,-g(a)\big\}$$ form a partition of $\mathbb{R}_{\neq 0}$ into four-element subsets. In fact, for any such a partition, there exists a function $g:\mathbb{R}\to\mathbb{R}$ with the required property.
Partition the set of nonzero real numbers into $4$-element subsets of the form $\{+a_\nu,+b_\nu,-a_\nu,-b_\nu\}$, where $\nu\in J$ for some index set $J$. Take $$g(+a_\nu):=+b_\nu\,,\,\, g(+b_\nu):=-a_\nu\,,\,\,g(-a_\nu):=-b_\nu\,,\text{ and }g(-b_\nu):=+a_\nu$$ for every $\nu\in J$. Then, $g$ satisfies the required functional equation. In addition, we set $g(0):=0$. For example, note that $$\mathbb{R}_{\neq 0}=\bigcup_{k\in\mathbb{Z}_{\geq 0}}\,\bigcup_{\lambda\in(0,1]}\,\Big\{+a_{k,\lambda},+b_{k,\lambda},-a_{k,\lambda},-b_{k,\lambda}\Big\}$$ with $a_{k,\lambda}:=2k+\lambda$ and $b_{k,\lambda}:=2k+1+\lambda$ for all $k\in\mathbb{Z}_{\geq 0}$ and $\lambda\in(0,1]$.
It is easy to translate the result back to $f$. All solutions $f:\mathbb{R}\to\mathbb{R}$ satisfying $$f\big(1-f(x)\big)=x\text{ for all }x\in\mathbb{R}$$ can be retrieved as follows. First, partition $\mathbb{R}_{\neq \frac{1}{2}}$ into $4$-element subsets of the form $$\left\{A_\nu,B_\nu,1-A_\nu,1-B_\nu\right\}\text{ for }\nu\in I\,,$$ where $I$ is an index set. Then, take $$f(A_\nu):=B_\nu\,,\,\,f(B_\nu):=1-A_\nu\,\,\,f(1-A_\nu):=1-B_\nu\,,\text{ and }f(1-B_\nu):=A_\nu$$ for every $\nu \in I$. Finally, set $f\left(\dfrac12\right):=\dfrac12$. For example, note that $$\mathbb{R}_{\neq \frac12}=\bigcup_{k\in\mathbb{Z}_{\geq 0}}\,\bigcup_{\lambda\in(0,1]}\,\Big\{A_{k,\lambda},B_{k,\lambda},1-A_{k,\lambda},1-B_{k,\lambda}\Big\}$$ with $A_{k,\lambda}:=2k+\dfrac12+\lambda$ and $B_{k,\lambda}:=2k+\dfrac32+\lambda$ for all $k\in\mathbb{Z}_{\geq 0}$ and $\lambda\in(0,1]$.
This is a partial answer.
We know that $f(x)$ is invertible, because $f^{-1}(x)=1-f(x),$ from the original; from here we get the very interesting relationship of $f(x)+f^{-1}(x)=1.$ Suppose we try to find out what $f(0)$ is (set it equal to $a$). By repeated alternating applications of $f$ and the equation $f^{-1}(x)=1-f(x),$ we wind up with the following interesting table: $$ \begin{array}{c|c|c} x &f(x) &f^{-1}(x) \\ \hline 0 &a &1-a \\ \hline 1-a &0 &1 \\ \hline 1 &1-a &a \\ \hline a &1 &0 \end{array} $$ One more step gets you where you started. In studying this table, we see that if $f$ and $f^{-1}$ are to be well-defined, we cannot have $a=0, 1/2,$ or $1$. We get a similar table if we start off with $x=-1:$ $$ \begin{array}{c|c|c} x &f(x) &f^{-1}(x) \\ \hline -1 &b &1-b \\ \hline 1-b &-1 &2 \\ \hline 2 &1-b &b \\ \hline b &2 &-1 \end{array} $$ From here we find that $b\not=-1, -3, 2, 1/2.$ Yet another table generates when we start with $x=-2:$ $$ \begin{array}{c|c|c} x &f(x) &f^{-1}(x) \\ \hline -2 &c &1-c \\ \hline 1-c &-2 &3 \\ \hline 3 &1-c &c \\ \hline c &3 &-2 \end{array} $$ From this we get that $c\not=3, 1/2, -2.$ This generalizes to the following table: $$ \begin{array}{c|c|c} x &f(x) &f^{-1}(x) \\ \hline 1-n &m &1-m \\ \hline 1-m &1-n &n \\ \hline n &1-m &m \\ \hline m &n &1-n \end{array} $$
From here, we can see that $n=1/2$ forces $m=1/2,$ which would be consistent in this table. So $f(1/2)=1/2.$
Moving on, we can see that the following are true: \begin{align*} f(1-x)&=y \\ f(1-y)&=1-x \\ f(x)&=1-y \\ f(y)&=x. \end{align*} Combining two of these equations yields $f(1-x)=1-f(x)$. Differentiating yields $f'(1-x)=f'(x).$
These are mostly negative results, obviously. My hope is that perhaps these ideas might spur someone else on to a solution.