How to find period of a real function $f$ given the functional equation $\sqrt{3}f(x) = f(x-1) + f (x+1) $? If a periodic function satisfies the equation $\sqrt{3}f(x) = f(x-1) + f (x+1) $ for all real $x$  then prove that fundamental period of the function is $12$.
Here fundamental period means the smallest positive real for which function repeats its value for all $x$.
I tried replacing $x$ by $x \pm 1$ then try to find $f(x)$ in terms of other but always end up with it in terms of sum of other two arguments in the function eg $f(x-2)$ + $f (x+2)$  etc. 
Please provide a general method and also especially do give the thought process or reasoning for all the steps ie why you are doing these particular steps or what led you to thinking that doing these steps would give you the period of f.
 A: 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)$.
A: Define the linear operator $T$ by
$$Tf(x):=- √3f(x) + f(x-1) + f(x+1)$$
and $E$ by
$$Ef(x)=f(x+1).$$
One can see that $T=E-\sqrt{3}+E^{-1}$.
Consider solving $$x-\sqrt{3}+x^{-1}=0$$
$$\implies x^2-2x\frac{\sqrt{3}}{2}+1=0$$
$$\implies\left(x-\frac{\sqrt{3}}{2} \right)^2=-\frac{1}{4}$$
$$\implies x = \frac{\sqrt{3}\pm i}{2}=\exp\left(\frac{\pm i\pi}{6}\right)=\omega_{\pm}$$
One can thus see that $T=E^{-1}(E-\omega_+)(E-\omega_-)$.
Note that the $\omega_\pm$ are primitive $12^{th}$ roots of unity, so the smallest $n$ such that $T$ will factor exactly into $E^n-1$ is $12$.
It thus follows that the fundamental period of such a function must be $12$.
A: 
I tried replacing $x$ by $x \pm 1$ then try to find $f(x)$ in terms of other but always end up with it in terms of sum of other two arguments in the function eg $f(x-2)$ + $f (x+2)$  etc. 

Start with:
$f(x+1) = \sqrt{3}\,f(x) - f(x-1) \tag{1}$
Using $(1)\,$:
$$
f(x+3) = \sqrt{3}\,\big(\sqrt{3}\,f(x+1) - f(x)\big) - f(x+1) = 2 f(x+1) - \sqrt{3}\,f(x)\tag{2}
$$
Using $(1)$ and $(2)\,$:
$$\require{cancel}
\begin{align}
f(x+6) &= 2 f(x+4) - \sqrt{3}f(x+3) \\
 &= 
2 \big(2 f(x+2) - \sqrt{3} f(x+1)\big) - \sqrt{3} \big(2 f(x+1) - \sqrt{3}\,f(x)\big) \\
 &= 4 f(x+2) - 4 \sqrt{3} f(x+1) + 3 f(x) \\
 &= 4 \big(\cancel{\sqrt{3} f(x+1)} - f(x)\big) - \cancel{4 \sqrt{3} f(x+1)} + 3 f(x) \\
 &= -f(x) \tag{3}
\end{align}
$$
Therefore $f(x+6)=-f(x)\,$, so $\,f(x+12) = -f(x+6) = f(x)\,$.

[ EDIT ]   To address this part of the question:


Please ... do give the thought process ... what led you to thinking ...

You wrote I have no idea what recursive relation is in a comment, which precludes getting the hint from the roots of the characteristic polynomial, like other answers used.
One possible intuition would be to recognize something reminiscent of trig in the relation and, with a leap of imagination, think at the identity:
$$
\sin\left(x+ \frac{\pi}{6}\right)+\sin\left(x- \frac{\pi}{6}\right) = \sqrt{3} \,\sin(x)
$$
Other than that, by brute force, you can express $f(x+k)$ in terms of $f(x+1)$ and $f(x)\,$ by recursively applying the given relation, so you could try and calculate $f(x+2)\,$, $f(x+3)\,$, $f(x+4)\,$ etc in hope that the term $f(x+1)$ cancels out at some point, and you get a relation between $f(x+k)$ and $f(x)$ alone for some $k\,$, which is what happened in my answer at $k=6\,$.

[ EDIT #2 ]  To elaborate on the last paragraph as asked in a comment, $\,f(x+k)\,$ can be expressed in terms of $\,f(x+1)\,$ and $\,f(x)\,$ by applying the given relation repeatedly:


*

*$\,k=2\,$: $\;\;f(x+2) = \sqrt{3}\,f(x+1) - f(x)$

*$\,k=3\,$: $\;\;f(x+3) = 2 f(x+1) - \sqrt{3}\,f(x)$

*$\,k=4\,$: $\;\;f(x+4) = \sqrt{3}f(x+1)-2f(x)$

*$\,\cdots$
In other words $\,f(x+k) = a_k f(x+1) + b_k f(x)\,$ where $a_k,b_k$ are some constants. If a $k=n$ is found such that $\,a_n=0\,$ then that leaves $\,f(x+n)=b_n f(x)\,$. If furthermore $b_n^{\,m}=1$ for some $\,m\,$, then $\,f(x+ m \cdot n)=b_n f(x+(m-1) \cdot n)=\cdots=b_n^{\,m}f(x)=f(x)\,$ so $m \cdot n$ is a period for $f(x)$. In the given problem, this happens for $n=6$ with $b_6=-1$ and $m=2\,$, so $2 \cdot 6 =12$ is a period.
A: I think you can start out in a simple way. Suppose $f(0)=a, f(1)=b$. Using the equation you gave with $x=1$ so can solve for $f(2)$ and get $f(2) = \sqrt{3}b - a$. Using the equation with $x=2$ solve for $f(3) = 2b-\sqrt{3}a$. In a few more steps you find $f(6) = -a, f(7) = -b$. This is true for any given $a,b$. What does this tell you about $f(12), f(13)$? If you can answer this you can show that $f(n+12)=f(n)$ for all integer $n$. Also for all real $n$ as well because instead of $0,1$ we could have started at $x,x+1$.
