An important piece of information is:
Theorem: $f$ is not continuous.
Proof: Observe that $f$ is invertible, because
$$f(f(f(f(x)))) = f(f(-x)) = x$$
and so $f \circ f \circ f = f^{-1}$. Any continuous invertible function on $\mathbb{R}$ is either strictly increasing or strictly decreasing.
If $f$ is strictly increasing, then:
- $1 < 2$
- $f(1) < f(2)$
- $f(f(1)) < f(f(2))$
- $-1 < -2$
contradiction! Similarly, if $f$ is strictly decreasing, then:
- $1 < 2$
- $f(1) > f(2)$
- $f(f(1)) < f(f(2))$
- $-1 < -2$
contradiction! Therefore, we conclude $f$ is not continuous. $\square$
For the sake of completeness, the entire solution space for $f$ consists of functions defined as follows:
- Partition the set of all positive real numbers into ordered pairs $(a,b)$
- Define $f$ by, whenever $(a,b)$ is one of our chosen pairs,
- $f(0) = 0$
- $f(a) = b$
- $f(b) = -a$
- $f(-a) = -b$
- $f(-b) = a$
To see that every solution is of this form, let $f$ be a solution. Then we must have $f(0) = 0$ because:
- Let $f(0) = a$. Then $f(a) = f(f(0)) = 0$ but $-a = f(f(a)) = f(0) = a$, and so $f(0) = 0$
If $a \neq 0$, then let $f(a) = b$. We have:
- $f(b) = f(f(a)) = -a$
- $f(-a) = f(f(b)) = -b$
- $f(-b) = f(f(-a)) = a$
From here it's easy to see the set $\{ (a,f(a)) \mid a>0, f(a)>0 \}$ partitions the positive real numbers and so is of the form I describe above.
One particular solution is
$$ f(x) = \begin{cases}
0 & x = 0
\\ x+1 & x > 0 \wedge \lceil x \rceil \text{ is odd}
\\ 1-x & x > 0 \wedge \lceil x \rceil \text{ is even}
\\ x-1 & x < 0 \wedge \lfloor x \rfloor \text{ is odd}
\\ -1-x & x < 0 \wedge \lfloor x \rfloor \text{ is even}
\end{cases}$$
e.g. $f(1/2) = 3/2$, $f(3/2) = -1/2$, $f(-1/2) = -3/2$, and $f(-3/2) = 1/2$.
(This works out to be Jyrki Lahtonen's example)
First, let's discuss what the definition of a period is for a periodic function. A function $f$ is periodic with period $T$ means $f(t+T) = f(t)$ for all $t$.
The period of $\sin$ is $2\pi$ by definition. (You might ask why $\sin$ is defined this way, but that question may be outside the scope of this thread.) This means that $\sin(t+2\pi)=\sin(t)$ for all $t$.
Now that we know that the period of $\sin$ is, what is the period of $\sin(kt)$? Let us define a function $g$ as $g(t)=\sin(kt)$. We are asking, what is the period of $g$. That is, what value $T_g$ satisfies $g(t+T_g)=g(t)$ for all $t$.
We know $\sin(kt+2\pi)=\sin(kt)$ for all $t$. So what value of $T_g$ satisfies $k(t+T_g)=kt+2\pi$? Solving for $T_g$, we see that $T_g=\frac{2\pi}{k}$.
Best Answer
I do not know there is a general way to solve that type of functional equations, but it kind of satisfies recursive relation, so one may apply the knowledge of that. Here I prove that $12$ is the period of $f$ which satisfies the given relation. Indeed, let $x\in \mathbb{R}$ be fixed. Then $a(x, 0) := f(x)$, $a(x, 1):=f(x+1)$ and $a(x, n) := \sqrt{3} a(x, n-1) - a(x, n-2)$ for $n\geq2$. This is a linear homogeneous recursive relation, so its n-th term can be explicit. The roots of the characheristic polynomial $z^2 - \sqrt{3} z + 1$ are $\frac{\sqrt{3} + i}{2} = e^{\frac{\pi i}{6}}$, $\frac{\sqrt{3} - i}{2} = e^{-\frac{\pi i}{6}}$. So $a(x, n) = c_1 e^{\frac{n\pi i}{6}} + c_2 e^{-\frac{n\pi i}{6}}$ where $c_1$ and $c_2$ are determined from $a(x, 0)$ and $a(x, 1)$. Since $f(x+n) = a(x, n)$ it is obvious that $12$ is the period of $f$.
Now I prove that if $f$ is not identically $0$, $12$ is the fundamental period. Since $f$ is not identically $0$, one can find $x \in \mathbb{R}$ for which $f(x) \neq f(x+1)$. Note that one can readily construct $g$ which satisfies the given functional equation, which has the fundamental period of $12$ and for which $g(x) = f(x)$. Replacing $f$ by $f-g$, we can assume $f(x) = 0$. As a resulut of this and scalar multiplication we can assume that $f(x) = 0$ and $f(x+1) = 1$. Then $f(x+n) = \frac{1}{\alpha - \beta} (\alpha^n - \beta^n)$ where $\alpha = e^{\frac{\pi i}{6}}, \beta = e^{-\frac{\pi i}{6}}$. From this $f(x) = f(x+n)=0$ if and only if $n$ is a mutiple of $6$. But $6$ cannot be a period because $f(x+1) \neq f(x+7)$.