6

Does a function $f:\mathbb{R}\to\mathbb{R}$ such that $f^{-1}(x)=1-f(x)$ exist?


Edit: I tried with different “simple” forms of function ($ax+b$, polynomes, $ae^{bx}+c$) without any inside as where to go. So I don't even know how to solve equations with a function and its inverse in it.

mr_georg
  • 163
  • 5
  • 1
    Are you able to provide any context or motivation for the problem? Any thoughts on what you could do (or have done, but it ultimately failed)? – Clayton Aug 08 '18 at 13:10
  • Yes, obviously. There's nothing contradictory about that condition. – Allawonder Aug 08 '18 at 13:14
  • 1
    Isn't that the inverse of $f$ on the LHS? Your function should be bijective @TheSimpliFire – asdf Aug 08 '18 at 13:19
  • 2
    A function with this property will certainly not be monotonic because the inverse has the same monotonicity as $f$ but here they are different. The function is one-one though so it is not continuous. – Μάρκος Καραμέρης Aug 08 '18 at 13:24
  • 1
    Any function of the form $f(x)=ax+b$ wouldn't work, since the inverse would be $f^{-1}(x)=\frac{x-b}{a}$, so comparing the coefficient of $x$ in the equation $f^{-1}(x)=1-f(x)$, we would have $a^2=-1$. We may not choose $f$ to be simply affine. – Suzet Aug 08 '18 at 13:25
  • 1
    I have no context – a friend of mine gave me that puzzle. It is bugging me for days now. – mr_georg Aug 08 '18 at 13:27
  • 1
    @Suzet, similarly by induction on the degree, no polynomial will work. – Pjotr5 Aug 08 '18 at 13:31
  • 2
    Why „on hold as off-topic“? There are a multitude of questions of the same form (for example: https://math.stackexchange.com/questions/897113/a-function-f-mathbbr-to-mathbbr-such-that-f-1x-frac1fx?rq=1, https://math.stackexchange.com/questions/1906059/does-there-exist-a-non-constant-function-f-mathbb-n2-rightarrow-mathbb-n-s?rq=1, https://math.stackexchange.com/questions/1184899/does-there-exist-a-function-such-that-fafb-fa2b2?rq=1). Shouldn't that ones also be put on-hold then? – mr_georg Aug 09 '18 at 07:17

3 Answers3

10

Partition $\mathbb{R}$ according to the equivalence relation $x\sim y$ if and only if $x=y$, or $x=1-y$, or $1-x=y$.

There is one class with one element, $\{1/2\}$ and the rest have two elements.

Partition the classes with two elements in two disjoint sets of the same cardinality $A$, $B$. Let $H$ be a bijection $H:A\to B$. Fix an order within each element of $A$ and within each element of $B$, such that for an element $\{a_1,a_2\}\in A$ we can name the first element $a_1$, and the second $a_2$. Likewise for elements of $B$.

Consider each element $\{a_1,a_2\}\in A$ and its corresponding pair in $B$ defined by the bijection $H$, say $\{b_1,b_2\}=H(\{a_1,a_2\})\in B$, define $g(a_1)=b_1$, $g(a_2)=b_2$, $g(b_1)=a_2$, and $g(b_2)=a_1$. Define also $g(1/2)=1/2$.

Then $g:\mathbb{R}\to\mathbb{R}$ is a bijection of $\mathbb{R}$ such that $1-g(1-g(x))=1-x$.

Define $f(x)=1-g(x)$. Then $f:\mathbb{R}\to\mathbb{R}$ is bijective, since it is a composition of the bijections $g$ and $1-x$, is a function that satisfies $f(f(x))=1-x$. Therefore, composing with $f^{-1}$, we get $$f^{-1}(x)=1-f(x)$$

  • 1
    Composing with $f$ yields $f(1-f(x)) = x$ right? – Pjotr5 Aug 08 '18 at 13:27
  • 1
    @Pjotr5 It depends on which side in which you compose. Since that is not the result I wrote, then you understood the wrong side. –  Aug 08 '18 at 13:32
  • Right. I see what you are saying now. – Pjotr5 Aug 08 '18 at 13:33
  • @floodbaharak So what is the result ? – S.H.W Aug 08 '18 at 13:35
  • @S.H.W The huge number of solutions are written there. Read it. –  Aug 08 '18 at 13:36
  • @floodbaharak your last line gives that $f(f(x))=1-g(1-g(x))=x$ but we need that $f(f(x))=1-x$. – Malkin Aug 08 '18 at 13:48
  • @EMalkin Fixed. –  Aug 08 '18 at 14:11
  • @floodbaharak now I think your argument is somewhat circular. For a specific $x$ you've defined $y$ to be $1-x$ then said that $g$ is such that $g(g(x))=y$. But such a $g$ is exactly what we're looking for! You've effectively answered the question "find $f$ such that $f(f(x))=1-x$" by saying "let $f$ be such that $f(f(x))=1-x$, then $f$ is a function that works". – Malkin Aug 08 '18 at 14:18
  • @EMalkin No circularity. Pick any such $g$, that defines an $f$ that satisfies the properties. Defining $g$ is not a problem, because the only requirement is to define it in that crossed way between each pair of equivalent pairs. –  Aug 08 '18 at 14:28
  • @EMalkin I have constructed a $g$, by partitioning the equivalence classes that contain two elements, Then defined $g$ for each pair of pairs. And then defined $f$ using such $g$. –  Aug 08 '18 at 14:31
  • Your edit is excellent, @floodbaharak , making it much clearer what you mean! – Malkin Aug 08 '18 at 14:56
  • I don't get the very last step … Composing with $f^{-1}$ gives $f(x)=f^{-1}(1-x)$, and then? – mr_georg Aug 09 '18 at 14:39
  • 1
    @mr_georg Again, one can compose from the left and from the right. You composed from the left and didn't get what I meant. Compose instead from the right: $f(f(f^{-1}(x)))=1-f^{-1}(x)$ gives $f(x)=1-f^{-1}(x)$, or what is the same $f^{-1}(x)=1-f(x)$. –  Aug 09 '18 at 15:03
1

Here is a geometric approach which is equivalent to the solution from user582578 above:

Consider the graph of $f$ i.e. $\{(x,f(x))| x \in \mathbb{R} \}$. The transformation $f \to f^{-1}$ reflects this graph in the line $x=f(x)$. The transformation $f \to 1-f$ reflects this graph in the line $f(x)=\frac{1}{2}$.

So $f^{-1} = 1-f$ means that $f$ has a graph such that its reflection in $x=f(x)$ and its reflection in $f(x)=\frac{1}{2}$ are the same.

Given any $a,b \in \mathbb{R} \backslash \{ \frac{1}{2} \}$ with $a \ne b$ consider the (irregular) octagon with vertices

$\{P_0=(a,b),P_1=(b,a),P_2=(b,1-a),P_3=(1-a,b),$ $P_4=(1-a,1-b),P_5=(1-b,1-a),P_6=(1-b,a),P_7=(a,1-b)\}$

$f \to f^{-1}$ transforms this octagon as follows:

$P_0 \leftrightarrow P_1, P_2 \leftrightarrow P_3, P_4 \leftrightarrow P_5, P_6 \leftrightarrow P_7$

whereas $f \to 1-f$ transforms the octagon as follows:

$P_0 \leftrightarrow P_7, P_1 \leftrightarrow P_2, P_3 \leftrightarrow P_4, P_5 \leftrightarrow P_6$

so if the graph of $f$ contains the points $\{P_0, P_2, P_4, P_6\}$ then both transformations will map these points to $\{P_1, P_3, P_5, P_7\}$ and we have $f^{-1}=1-f$ for the restriction of $f$ to the domain $\{a,b,1-a,1-b\}$. Reading off the co-ordinates of $\{P_0, P_2, P_4, P_6\}$ we have

$f(a) = b\\f(b) = 1-a\\f(1-a) = 1-b\\f(1-b) = a$

and so

$f^{-1}(a) = 1-b = 1-f(a)\\f^{-1}(b) = a = 1-f(b)\\f^{-1}(1-a) = b = 1-f(1-a)\\f^{-1}(1-b) = 1-a = 1-f(1-b)$

As user582578 points out, we can partition $\mathbb{R} \backslash \{ \frac{1}{2} \}$ into pairs $\{a,1-a\}$, combine these pairs into pairs of pairs $\{ \{a, 1-a\}, \{b, 1-b\}\}$ and then use this construction to define $f$ on the four values in each pair of pairs. We then just add the special case $f(\frac{1}{2}) = \frac{1}{2}$ to complete the definition of a $f$ for which $f^{-1}=1-f$.

gandalf61
  • 15,326
0

I offer a proof that $f$ cannot be a real polynomial...

Putting $f(x)$ back into $f^{-1}(x)=1-f(x)$ gets:

$$f^{-1}(f(x))=1-f(f(x)) \\ \implies x=1-f(f(x)) \\ \implies f(f(x))=1-x$$

Suppose that $f(x)$ was a polynomial of degree $n$. Then $f(f(x))$ has degree $n^2$.

$f(f(x))=1-x$ then gives us that $n^2=1$ and so $n=1$.

So $f(x)$ must be linear and we can write $f(x)=ax+b$ for some $a,b \in \mathbb{R}$ and:

$$ f(f(x))=a(ax+b)+b=a^2x+ab+b$$

Equating this to $1-x$ gives:

$$ \left\{ \begin{array} \\ a^2=-1 \\ ab+b=1 \end{array} \right. $$

$$ \implies \left\{ \begin{array} \\ a=i \\ b=\frac{1}{2}(1-i) \end{array} \right. $$

... which is obviously not real.

It does nicely give $f(x)=ix+\frac{1}{2}(1-i)$ as a function that works on $\mathbb{C}$ though!

Malkin
  • 2,113
  • It is easy to prove that $f$ can't be continuous. Since $1-x$ has only one fixed point $1/2$, then $f(x)$ can only have $1/2$ as fixed point. Since $f$ is invertible, if it were continuous, it must be strictly monotonic. But then $f(f(x))$ would be strictly increasing near $1/2$. But $1-x$ is decreasing. Therefore, $f$ cannot be continuous. –  Aug 08 '18 at 14:36