Question
Give an example, if any, of a non-constant periodic function, discontinuous in a subset of $\mathbb R$, but which has a period that is smaller than all the others.
My example
$$f(x)=\begin{cases}\sin x&\text { if } x\in]0,\pi[,]2\pi,3\pi[,... \newline -\sin x&\text { if } x\in]\pi,2\pi[,]3\pi,4\pi[,...\end{cases}$$
It works? Can you suggest me some more? Thanks in advance