Q:

y = floor(x)-x+2From the graph, it is periodic. But how to prove it?

Accepted Solution

A:
It is sufficient to prove that [tex]\lfloor x\rfloor-x[/tex] is periodic. We claim that the period is 1, and here's the proof:Let[tex]f(x)=\lfloor x\rfloor-x[/tex]by definition of periodic function, we are claiming that, for every value of x,[tex]f(x+1)=f(x) \iff \lfloor x+1\rfloor-(x+1)=\lfloor x\rfloor-x[/tex]The floor is additive with integers: if a is a real number and b is an integer, we have[tex]\lfloor a+b\rfloor=\lfloor a\rfloor+\lfloor b\rfloor[/tex]So, we have[tex]f(x+1)=\lfloor x+1\rfloor-x-1=\lfloor x\rfloor+\lfloor1\rfloor-x-1=\lfloor x\rfloor+1-x-1=\lfloor x\rfloor-x=f(x)[/tex]Which proves that the function is periodic with period 1. The idea is that [tex]\lfloor x\rfloor-x[/tex] is the decimal part of x. For example, if you start at x=2.5 you have[tex]\lfloor 2.5\rfloor -2.5=2-2.5=-0.5[/tex]If you go one period ahead, i.e. if you add 1, you have[tex]\lfloor 3.5\rfloor -3.5=3-3.5=-0.5[/tex]And as you can see, the integer part doesn't matter, because you'll always have a difference in the formxx - xx.5 = -0.5