Given $f(f(x))=x+2$ does it necessarily follow that $f(x)=x+1$? This question comes from a precalculus algebra student.


Solution 1:

The answer to your question is no. For example, if you are working with function $f\colon\mathbb Z\to\mathbb Z$ then $$f(x)= \begin{cases} x-1; & x\text{ is even}, \\ x+3; & x\text{ is odd}; \end{cases} $$ is an example of a different function such that $f(f(x))=x+2$.

If you want the function $f\colon\mathbb R\to\mathbb R$, you can simply extend this one by putting $f(x)=x+1$ for $x\notin\mathbb Z$.


If you would like to see a continuous solution different from $x+1$, you could use the piecewise linear function obtained by putting $0\mapsto2/3, 2\mapsto2+2/3, 4\mapsto2+2/3, \dots$ and $2/3\mapsto 2, 2+2/3\mapsto 4, 4+2/3\mapsto 6,\dots$

The composition $f\circ f$ will be again piecewise linear and to check that $f(f(x))=x+2$ you only need to verify this for $x\in2\mathbb Z$ and $x\in\frac23+2\mathbb Z$.

continuous monotone solution

The intuition behind this is that the interval $[0,2/3]$ is stretched to the interval $[2/3,2]$ (which has twice the length of the original interval) and $[2/3,2]$ contracted to $[2,2+2/3]$. The same thing is done on other intervals $[2k,2(k+1)]$, $k\in\mathbb Z$.

Solution 2:

Answering the question in the topic: definitely not for all $f$. Consider $f(f(x))) = x$; is $f(x) = x$ or $f(x) = -x$?

Solution 3:

No.

In fact this belongs to a functional equation of the form http://eqworld.ipmnet.ru/en/solutions/fe/fe2315.pdf.

Let $\begin{cases}x=u(t)\\f=u(t+1)\end{cases}$ ,

Then $u(t+2)=u(t)+2$

$u(t+2)-u(t)=2$

For $u_c(t+2)-u_c(t)=0$ ,

$u_c(t)=\theta(t)$ , where $\theta(t)$ is an arbitrary periodic functions with period $2$

For $u_p(t)$ ,

Let $u_p(t)=At$ ,

Then $A(t+2)-At\equiv2$

$2A\equiv2$

$\therefore2A=2$

$A=1$

$\therefore u(t)=\theta(t)+t$ , where $\theta(t)$ is an arbitrary periodic functions with period $2$

Hence $\begin{cases}x=\theta(t)+t\\f=\theta(t+1)+t+1\end{cases}$ , where $\theta(t)$ is an arbitrary periodic functions with period $2$

In fact $f(x)=x+1$ is only a paticular solution when taking $\theta(t)=0$ .