Show that $x+a-[x-b],a,b\in\mathbb R^+$, is a periodic function. Find its period. $([.]$ represents greatest integer function.)
My Attempt: Replacing $x$ by $[x]+\{x\}$, where $\{x\}$ is a fractional part of $x$.
$[x]+\{x\}+a-[[x]+\{x\}-b]=[x]+\{x\}+a-[x]-[\{x\}-b]=\{x\}+a-[\{x\}-b]$
How to proceed next?
We know that $[x]=x-\{x\}$, so \begin{align*} x-a-[x-b]&=x-a-(x-b-\{x-b\})=x-a-x+b+\{x-b\}\\ &=b-a+\{x-b\}. \end{align*} Since $\{x\}$ has period 1, our function also has period 1