What is the period of a function which satisfies the condition $f(a-x)=f(a+x)$ where a is any positive integer?
I tried substituting $x$ with $x-a$ but that does not seems to help me a lot. I ended up getting $f(x)=f(-x+2a)$ I tried substituting other similar terms but was unable to get to a solution.
You need it true for $a=1,2$ to get periodicity.
Then $$f(2+x)=f(2-x)=f(1+(1-x))=f(1-(1-x))=f(x)$$
So you'd need to show that there is an example that has period $2$ and no smaller period to finish your proof. Try $f(x)=\sin(\pi x)$.
If $S\subseteq Z$ and $f(a+x)=f(a-x)$ for all $a\in S,x\in\mathbb R$, then $f$ must have periodicity $2\gcd\{s_1-s_2\mid s_1,s_2\in S\}$, and you can find an $f$ with this exact periodicity.