Seems simple enough, but I have no idea how one would get all solutions to this. Wolfram Alpha gives $5$ answers, the first $2$ of which I could get myself, but the following $3$ completely defeat me.
-
3$\begingroup$ Such functions are known as involutions. In general, given an invertible function $g$, $f(x)=g^{-1}(-g(x))$ is an involution. $\endgroup$– WorkaholicSep 22, 2016 at 12:58
-
7$\begingroup$ This is simple indeed, only on an entirely different level. There is a great deal of solutions, not just mere 5 or 50. $\endgroup$– Ivan NeretinSep 22, 2016 at 13:02
-
1$\begingroup$ At first I thought the question was how to solve $f(f(x) = x$ for $x$. Obviously that depends on $f$! Now I understand the question is how to solve $f \circ f = \text{Id}$ for $f$, which is definitely nontrivial. $\endgroup$– Matthew LeingangSep 22, 2016 at 13:09
-
1$\begingroup$ interesting question (+1) $\endgroup$– tiredSep 22, 2016 at 13:10
-
2$\begingroup$ notice also that solutions one and two are special cases of the solution 3 $\endgroup$– tiredSep 22, 2016 at 13:12
1 Answer
If you want a continuous solution:
- Draw a graph of $y=x$ (this is an auxiliary construction, you will erase it later).
- Starting at any point on the graph, draw a freehand graph of a decreasing function.
- Draw the reflection of that graph with respect to the line $y=x$.
- Erase the line $y=x$. What remains is the graph of your function.
If you want just any solution:
- Select two arbitrary non-intersecting equinumerous sets $A,B\in\mathbb R$. (They can be empty, or finite, or countably infinite, or uncountably infinite; that doesn't matter.)
- Select any bijection $A\leftrightarrow B$.
- For any $x\in A$, let $f(x)$ be the image of $x$ in $B$ under that bijection, and vice versa.
- For any $x\in\mathbb R\setminus(A\cup B)$, let $f(x)=x$.