I got this problem:
Prove that the only function $ f:\Bbb{R}\to\Bbb{R}$ with the intermediate value property such that $\exists 1\leq n\in\Bbb{Z}, \forall x\in\Bbb{R}, f^n(x)=-x$ where $f^n =f\circ ... \circ f$ ($n$ times)
(i.e. function composition and not function multiplication)
is $f(x)=-x$ .
Hint: prove that $f$ is a bijection and use the fact that $f$ has the intermediate value property to conclude that $f$ is monotone and by using this fact show that $f $ is decreasing.
Any help on how to continue will be appreciated.
We'll show that the only function that satisfies the conditions in the question is $f(x)=-x$:
First We'll prove that $f$ is one to one:
that is we'll show that $\forall x,y\in\Bbb{R},f(x)=f(y)\to x=y$:
let $x,y\in\Bbb{R}$ such that $f(x)=f(y)$. Now we get that $f^{n-1}(f(x))=f^{n-1}(f(y))$ and so $f^n(x)=f^n(y)$ which implies that $-x=-y$ and so $x=y$, Thus $f$ is one to one.
Now since $f$ is one to one and got the intermediate value property we get that $f$ is strictly monotone, And so $f$ is increasing or $f$ is decreasing.
We'll suppose that $f$ is increasing and reach a condradiction.
Now we'll prove by induction that $\forall 1\leq k\in\Bbb{Z}, f^k \text{ is increasing}$:
If $k = 1$ then $f^k=f^1=f$ and so, by our assumption we get that $f^k$ is increasing.
Now suppose that for some $1\leq m\in\Bbb{Z}, f^m \text{ is increasing}$ (induction hypothesis).
And we'll prove that $f^{m+1} \text{ is increasing}$:
That is, we'll show that $\forall x,y\in\Bbb{R}, x<y \to f^{m+1}(x)<f^{m+1}(y)$:
Let $x,y\in\Bbb{R}$ such that $x<y$, now since $f$ is increasing we get that $f(x)<f(y)$ and beacuse $f^m$ is increasing (by induction hypothesis) we get that $f^m(f(x))<f^m(f(y))$ and so $f^{m+1}(x)<f^{m+1}(y)$ which implies that $f^{m+1}$ is increasing as was to be shown.
And so $\forall 1\leq k\in\Bbb{Z}, f^k \text{ is increasing}$ which implies that $f^n$ is increasing, but since $\forall x\in\Bbb{R}, f^n(x) = -x$ we get that $f^n$ is decreasing, and so, we reached a contradiction, and therefore $f$ cannot be increasing, and so $f$ is decreasing.
Now we'll show that $f$ is an odd function, that is $\forall x\in\Bbb{R}, f(-x)=-f(x)$:
Let $x\in\Bbb{R}$, Now $f^{n+1}(x)=f^n(f(x))=-f(x)$ and $f^{n+1}(x)=f(f^n(x))=f(-x)$, and hence $f(-x)=-f(x)$, and so $f$ is odd.
Now because $f$ is odd we get that $f(0)=0$.
Now we'll prove that $\forall x\in\Bbb{R}-\{0\}, xf(x)<0$:
Let $x\in\Bbb{R}-\{0\}$, there are two cases: $x\in(0,\infty)$ or $x\in(-\infty,0)$.
If $x\in(0,\infty)$ then since $f$ is decreasing we get that $0=f(0)>f(x)$ and so $xf(x)<0$.
If $x\in(-\infty, 0)$ then since $f$ is decreasing we get that $f(x)>f(0)=0$ and so $xf(x)<0$.
And so $\forall x\in\Bbb{R}-\{0\}, xf(x)<0$.
Now we'll prove that $\forall x\in(0,\infty), f(x)=-x$:
Let $x_0\in(0,\infty)$, define $\forall 1\leq k\in\Bbb{Z}, x_k=f(x_{k-1})$ and we'll prove that (1) $\forall 0\leq k\in\Bbb{Z^\text{even}}, 0<x_k$ and that (2) $\forall 0\leq k\in\Bbb{Z^\text{odd}}, x_k<0$ by induction:
(Note $\Bbb{Z^\text{even}}$ is the set of even integers and $\Bbb{Z^\text{odd}}$ is the set of odd integers).
(1)
If $k = 0$ then $x_k=x_0>0$.
Now suppose that for $k=m, 0<x_m$ ($m$ even) and we'll show that for $k=m+2, 0 < x_{m+2}$:
Because $f$ is decreasing and since $0<x_m$ we get that $f(x_m)<f(0)=0$ and again because $f$ is decreasing we get that $0=f(0)<f(f(x_m))$ Now beacuse $x_{m+2} = f(x_{m+1})=f(f(x_m))$ we get $0<x_{m+2}$ as was to be shown.
And so $\forall 0\leq k\in\Bbb{Z^\text{even}}, 0<x_k$.
(2)
If $k = 1$ then $x_k=x_1=f(x_0)$ and since $0<x_0$ and because $f$ is decreasing we get that $f(x_0)<0$ and so $x_k<0$.
Now suppose that for $k=m, x_m<0$ ($m$ odd) and we'll show that for $k=m+2, x_{m+2}<0$:
Because $f$ is decreasing and since $x_m<0$ we get that $0=f(0)<f(x_m)$ and again because $f$ is decreasing we get that $f(f(x_m))<f(0)=0$ Now beacuse $x_{m+2} = f(x_{m+1})=f(f(x_m))$ we get $x_{m+2}<0$ as was to be shown.
And so $\forall 0\leq k\in\Bbb{Z^\text{odd}}, x_k<0$.
Now we'll prove that $\forall 0\leq k\in\Bbb{Z}, 0<(-1)^kx_k$ by induction:
if $k=0$ then $(-1)^kx_k=(-1)^0x_0=x_0>0$.
Now we'll suppose that for $k=m, 0<(-1)^mx_m$ and we'll show that $k=m+1, 0<(-1)^{m+1}x_{m+1}$:
There are two cases: $m$ is even or $m$ is odd.
if $m$ is even then we get $(-1)^mx_m=x_m$ and so by induction hypothesis we get that $0<x_m$, Also we get then $m+1$ is odd and so $(-1)^{m+1}x_{m+1}=-x_{m+1}$. Now since $f$ is decreasing we get that $f(x_m)<f(0)=0$ and so $0<-f(x_m)$, now since $x_{m+1}=f(x_m)$ we get $0<-x_{m+1}$ and so $0<(-1)^{m+1}x_{m+1}$.
if $m$ is odd then we get $(-1)^mx_m=-x_m$ and so by induction hypothesis we get that $0<-x_m$ and so $x_m<0$ which implies that $0=f(0)<f(x_m)$, Also we get that $m+1$ is even and so $(-1)^{m+1}x_{m+1}=x_{m+1}$, Now since $x_{m+1}=f(x_m)$we get $0<x_{m+1}$ and so $0<(-1)^{m+1}x_{m+1}$.
Therefore we've shown that $\forall 0\leq k\in\Bbb{Z}, 0<(-1)^kx_k$.
Now we'll prove that $\forall 1\leq k\in\Bbb{Z}, x_k=f^k(x_0)$:
If $k=1$ then $x_k = x_1 = f(x_0) = f^k(x_0)$
Now suppose that for $k=m, x_m = f^m(x_0)$
and we'll show that for $k=m+1, x_{m+1}=f^{m+1}(x_0)$:
$x_{m+1}=f(x_m)=f(f^m(x_0))=f^{m+1}(x_0)$ as was to be shown.
and so $\forall 1\leq k\in\Bbb{Z}, x_k=f^k(x_0)$.
Now we'll prove that $x_1=-x_0$, because if not, that is if $x_1\neq -x_0$ then there are two cases: $x_1>-x_0$ or $x_1<-x_0$.
If $x_1>-x_0$ then we'll prove by induction that $\forall 0\leq k\in\Bbb{Z}, (-1)^{k+1}x_{k+1}<(-1)^kx_k$:
If $k=0$ then $(-1)^1x_1=-x_1$ and $(-1)^0x_0=x_0$ and since $x_1>-x_0$ we get that $-x_1<x_0$ and so $(-1)^1x_1<(-1)^0x_0$ and so $(-1)^{k+1}x_{k+1}<(-1)^kx_k$.
Now suppose that for $k=m, (-1)^{m+1}x_{m+1}<(-1)^mx_m$
And we'll prove that $(-1)^{m+2}x_{m+2}<(-1)^{m+1}x_{m+1}$:
There are two cases: $m$ is even or $m$ is odd.
if $m$ is even then $m+1$ is odd and we get $(-1)^m=1$ and $(-1)^{m+1}=-1$, Now by induction hypothesis we get that $-x_{m+1}<x_m$ and since $f$ is decreasing and odd we get $x_{m+1}=f(x_m)<f(-x_{m+1})=-f(x_{m+1})=-x_{m+2}$ and so $x_{m+2}<-x_{m+1}$, now since $m+2$ is even we get that $(-1)^{m+2}=1$ and so $(-1)^{m+2}x_{m+2}<(-1)^{m+1}x_{m+1}$ as was to be shown.
Similarly we show for that case $m$ is odd.
And so $\forall 0\leq k\in\Bbb{Z}, (-1)^{k+1}x_{k+1}<(-1)^kx_k$.
Now we'll prove by induction that $\forall 1\leq k\in\Bbb{Z}, (-1)^kx_k<x_0$:
if $k=1$ then $(-1)^kx_k=-x_1$ and since $x_1>-x_0$ we get that $-x_1<x_0$ and so $(-1)^kx_k<x_0$.
Now we'll suppose that for some $k=m, (-1)^mx_m<x_0$ and we'll prove that for $k=m=1, (-1)^{m+1}x_{m+1}<x_0$:
There are two cases: $m$ is even or $m$ is odd.
if $m$ is even then bt induction hypothesis we get that $x_m<x_0$ and so $x_{m+1}=f(x_m)>f(x_0)=x_1>-x_0$ and so we get $-x_{m+1}<x_0$, now since $m+1$ is odd we get that $(-1)^{m+1}=-1$ and so $(-1)^{m+1}x_{m+1}<x_0$.
Similarly we prove for the case $m$ is odd.
Now since $1\leq n\in\Bbb{Z}$ we get that $(-1)^nx_n<x_0$, but since we've shown that $n$ is odd we get that $-x_n<x_0$ and so $x_n>-x_0$ which contradict the fact that $x_n=-x_0$ and so we reached a contradiction.
Similarly, for that case $x_1<-x_0$ we reach the contradiction $x_n<-x_0$.
And $x_1 = -x_0$ which implies that $f(x_0)=-x_0$.
Therefore we've shown that $\forall x\in(0,\infty), f(x)=-x$.
Now we'll show that $\forall x\in\Bbb{R}, f(x)=-x$:
Let $x\in\Bbb{R}$, there are three cases: $x\in(0,\infty)$ or $x=0$ or $x\in(-\infty,0)$.
If $x\in(0,\infty)$ then we've already shown that $f(x)=-x$.
If $x=0$ then $f(x)=f(0)=0=-0=-x$.
If $x\in(-\infty, 0)$ then $-x\in(0,\infty)$ and so $f(-x)=-(-x)=x$ now since $f$ is odd we get that $f(-x)=-f(x)$ and so $-f(x)=x$ which implies that $f(x)=-x$.
And so the only function that satisfies the conditions in the question is $f(x)=-x$ as was to be shown.
Q.E.D.