Case 1: Let 0≤x<1 then [x]=0 , which is even ∴f(x)=1+[x]−x =1+0−x =1−x Case 2 : Let 1≤x<2 then [x]=1 , which is odd ∴f(x)=x−[x] =x−1 Case 3 : Let 2≤x<3 then [x]=2 , which is even ∴f(x)=1+[x]−x =1+2−x =3−x Case 4 : Let 3≤x<4 then [x]=3 , which is odd ∴f(x)=x−[x] =x−3 ∴f(x)={
1−x
0≤x<1
x−1
1≤x<2
3−x
2≤x<3
x−3
3≤x<4.
∴f(x) is periodic and period of f(x)=2 And period of cosπx=