Is there a function so that $f(f(x))=1/x$?

1.9k Views Asked by At

I tried to look for a function that fulfills this rule; $$f(f(x))=\frac{1}{x}$$

I tried a lot, and I didn't find anything.

Can anyone help me find such a function? Or prove that there isn't? It doesn't have to be a real function.

4

There are 4 best solutions below

4
On BEST ANSWER

Define $f$ on $\mathbb R\setminus\{0\}$ as:

$$f(x)=\begin{cases} -x&x>0\\ -\frac1x&x<0\\ \end{cases}$$

There are infinitely many similar functions - if $g:\mathbb R^+\to\mathbb R^+$ is any $1-1$ and onto function with $g(1/x)=1/g(x)$ then:

$$f(x)=\begin{cases} -g(x)&x>0\\ \frac{1}{g^{-1}(-x)}&x<0 \end{cases}$$

has this property.

3
On

Assume that we have

$$f(x)=x^n$$

Plugging this in gives

$$(x^n)^n=x^{n^2}=x^{-1}$$

Thus, we have

$$n^2=-1\implies n=\pm i$$

Since these are complex exponents, we must be more careful. If we restrict $x$ to be positive, we have

$$x^i=e^{i\ln(x)}$$

where we use real valued logarithms. Thus,

$$f(x)=e^{i\ln(x)},e^{-i\ln(x)}$$

3
On

I think there is infinitely many such functions.

One such function that satisfies the conditions is

$$f(x)=i+\frac{2}{i + x}$$

4
On

There is no such function $f:\mathbb{C}\setminus\{0\}\to\mathbb{C}\setminus\{0\}$ that is continuous. Indeed, note that $x\mapsto 1/x$ induces multiplication by $-1$ on $\pi_1(\mathbb{C}\setminus\{0\})\cong\mathbb{Z}$, which cannot be $f_*\circ f_*$ for any homomorphism $f_*:\mathbb{Z}\to\mathbb{Z}$.

Similarly, there is no such continuous function $f:(0,\infty)\to(0,\infty)$, since $f$ would have to be injective and thus monotone, and then $f\circ f$ would be increasing no matter what.

You can get such a continuous function $f:\mathbb{R}\setminus\{0\}\to\mathbb{R}\setminus\{0\}$ by defining $$f(x)=\begin{cases}-x&\text{ if }x>0\\ -1/x&\text{ if } x<0.\end{cases}$$

Finally, if you don't require continuity, it is very easy to get such functions. Here's one way to do so. Just define $f(1)=1$, $f(-1)=-1$, and then partition the rest of the domain of $f$ into sets of the form $\{a,1/a,b,1/b\}$ (where these elements are all distinct). In each such set, define $f(a)=b$, $f(b)=1/a$, $f(1/a)=1/b$, and $f(1/b)=a$.