<s>[INST] $[\cos x+\sin x]=[\cos x]+[\sin x]$,where [.] is the greatest integer function. Solve the equation in interval $[0,\pi]:[\cos x+\sin x]=[\cos x]+[\sin x]$,where [.] is the greatest integer function.
How should i start this question,breaking it into intervals is difficult.Please guide me.
 [/INST] Here $x\in \left[0,\pi\right]\;,$ Then $0\leq \sin x\leq 1$. So we get $\displaystyle \lfloor \sin x\rfloor = 0,1$
Similarly $x\in \left[0,\pi\right]\;,$ Then $-1 \leq \cos x\leq 1$. So we get $\displaystyle \lfloor \cos x\rfloor = -1, 0,1$ 
Similarly $x\in \left[0,\pi\right]\;,$ Then $-1 \leq \sin x+ \cos x\leq \sqrt{2}$. So we get $\displaystyle \lfloor \sin x+\cos x\rfloor =-1, 0,1$ 
$\bullet \; $ If $\displaystyle \lfloor \sin x+\cos x\rfloor=0\;,$ Then $\lfloor \sin x \rfloor =0 $ and $\lfloor \cos x \rfloor  =0$
$\bullet \; $ If $\displaystyle \lfloor \sin x+\cos x\rfloor=0\;,$ Then $\lfloor \sin x \rfloor =1 $ and $\lfloor \cos x \rfloor  =-1$
$\bullet \; $ If $\displaystyle \lfloor \sin x+\cos x\rfloor=1\;,$ Then $\lfloor \sin x \rfloor =0 $ and $\lfloor \cos x \rfloor  =1$
$\bullet \; $ If $\displaystyle \lfloor \sin x+\cos x\rfloor=1\;,$ Then $\lfloor \sin x \rfloor =1$ and $\lfloor \cos x \rfloor  =0$
$\bullet \; $ If $\displaystyle \lfloor \sin x+\cos x\rfloor=-1\;,$ Then $\lfloor \sin x \rfloor =0$ and $\lfloor \cos x \rfloor  =-1$
</s>