Functional equation $f(x)f(f(x))=1$ Assume that $f(x)$ is continuous on $\mathbb{R}$ and satisfies the conditions $f(x)f(f(x)) = 1 \space \forall x \in \mathbb{R}$ and $f(2007)=2005$.

*

*Find $f(2006)$.


*Provide an example of $f(x)$.
I could only think of a piecewise function, e.g. $f(x) = \frac{1}{x}, \space x \in (-\infty, 2006]$, while being $f(x) = 2005, \space x \in [0, \frac{1}{2005}]$ then it grows linearly in the interval $[2006, 2007]$. I don't even think it's continuous and I'm somewhat stuck at this point. Any suggestions?
 A: I can only answer the second question and I think the answer to the first question is not unique.
We define

*

*$f(x) = 2005$ for $x \in (-\infty, \frac 1 {2005}]$;

*$f(x) = \frac 1 x$ for $x \in [\frac 1 {2005}, 2005]$;

*$f(x) = 2005$ for $x \in [2007, +\infty)$.

On the interval $[2005, 2007]$, we can choose $f$ to be any continuous function such that $f(2005) = \frac 1 {2005}$, $f(2007) = 2005$ and the values of $f$ are all in the interval $[\frac 1 {2005}, 2005]$.
In particular, the value of $f(2006)$ can be arbitrarily chosen from $[\frac 1 {2005}, 2005]$.
This function $f$ then is continuous and satisfies the requiring property. In fact, for any $x\in \Bbb R$, we have $f(x) \in [\frac 1 {2005}, 2005]$ and hence $f(x)f(f(x)) = 1$ holds.
A: As $f$ is never zero, it must have constant sign, and therefore $f(x)>0$  for all $x$.
Let $s=\inf f\ge0$. Consider a sequence $x_n$ with $f(x_n)\to s$. Then $f(s)=\lim f(f(x_n))=\lim \frac1{f(x_n)}=\frac1s$ (and as a collateral result, $s>0$) and $f(\frac1s)=f(f(s))=\frac1{f(s)}=s$, i.e., $f$ attains its minimum $s$. It also attains its maximum $\frac1s$ and we must have $s\le 1$.
Let $I=\{\,x\in\Bbb R\mid f(x)=\frac 1x\,\}$. Then clearly $[s,\frac1s]=f(\Bbb R)\subseteq I$ and by the above, $I\subseteq [s,\infty)$.
As $f(2007)=2005)$, we have $\frac1s\ge 2005$ so that
$$f(x)=\frac1x\quad\text{(at least) for } \frac1{2005}\le x\le2005.$$
It seems this is all we can conclude about $f$. That is, pick

*

*any $a\in[2005,2007)$,

*any continuous function $f_1\colon[a,\infty)\to [\frac1a,a]$ with $f_1(a)=\frac1a$ and $f(2007)=2005$,

*and any continuous function $f_2\colon(-\infty,\frac1a]\to [\frac1a,a]$ with $f_2(\frac1a)=a$.

Then
$$f(x)=\begin{cases}f_2(x)&x\le \frac1a\\
\frac1x&\frac1a\le x\le a\\f_1(x)&x\ge a\\\end{cases} $$
is a solution to the functional equation. Indeed, we verify that $f$ is continuous and that $f(2007)=2005$. And as $\frac1a\le f(x)\le a$ for all $x\in \Bbb R$, we have $f(f(x))=\frac1{f(x)}$ for all $x\in\Bbb R$.
Note that $f(2006)=\frac1{2006}$ is $a\ge 2006$, whereas $f(2006)=f_1(2006)$ can be any value $\in[\frac1a,a]$ if $a<2006$. In other words, we can achieve any value with $$f(2006)\in[\tfrac1{2006},2006).$$
