5

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.

76david76
  • 1,535

4 Answers4

10

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.

Thomas Andrews
  • 177,126
  • Whoops, yes. @EricWofsey – Thomas Andrews Nov 11 '16 at 01:32
  • 1
    I would add that you can find many such $g$ by taking $g:(1,\infty)\to(1,\infty)$ to be any bijection and then extending $g$ to $(0,1)$ so that $g(1/x)=1/g(x)$ (and defining $g(1)=1$). You can even easily find many such $g$ that are continuous by requiring your bijection $(1,\infty)\to(1,\infty)$ to be order-preserving. – Eric Wofsey Nov 11 '16 at 01:34
  • @Eric Wofsey and finding such g would amount to answering the original question. – Anixx Nov 11 '16 at 01:34
  • 1
    Not sure what you mean by that, @Anixx. It's certainly not an "equally hard" problem - there are lots of simple examples of such a $g$, include $g(x)=x$ and $g(x)=1/x$. But – Thomas Andrews Nov 11 '16 at 01:36
7

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$.

Eric Wofsey
  • 330,363
  • I do not see where in the question it is asked about everywhere continuous function. – Anixx Nov 11 '16 at 01:16
  • @Anixx The OP was not very restrictive about answers, so it is safe to make assumptions. – Simply Beautiful Art Nov 11 '16 at 01:16
  • 2
    It is totally excessive assumption. For instance, function $f(x)=i+\frac{2}{i + x}$ satisfies the conditions and it is discontinuous at only one point (the pole). – Anixx Nov 11 '16 at 01:17
  • 1
    The question was rather vague about what it is requiring, so I answered it in many different possible interpretations, including both a requirement of continuity and no such requirement. – Eric Wofsey Nov 11 '16 at 01:20
4

I think there is infinitely many such functions.

One such function that satisfies the conditions is

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

Anixx
  • 9,119
1

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)}$$