# Discuss the differentiability of $y=\sin(\pi(x-[x]))$

Discuss the differentiability of $y=\sin(\pi(x-[x]))$ in $(-\frac{\pi}{2},\frac{\pi}{2})$, where $[x]$ is the largest integer in x which is $\leq x$.

$$y = \left\{ \begin{array}{ll} \sin(\pi(x+2)), & \quad -\frac{\pi}{2}<x<-1 \\ \sin(\pi(x+1)), & \quad -1\leq x<0 \\ \sin(\pi x), &\;\;\; \quad 0\leq x<1 \\ \sin(\pi(x-1)), & \:\:\:\:\quad 1\leq x<\frac{\pi}{2} \end{array} \right.$$

-

Hint: Because $\sin (x+2k\pi)=\sin x$ and $\sin(x+2k\pi+\pi)=-\sin x$ ($k\in \mathbb{Z}$), your function is in fact: $$f(x)=\begin{cases}\sin(\pi x)&\mbox{if, }[x]\text{ is even}\\ -\sin (\pi x)&\mbox{if, }[x]\text{ is odd} \end{cases}$$ or since we are working in $(-\frac{\pi}{2},\frac{\pi}{2})$, $$f(x)=\begin{cases}\sin(\pi x)&\mbox{if, }0\le x<\frac{\pi}{2}\\ -\sin (\pi x)&\mbox{if, }-\frac{\pi}{2}< x<0 \end{cases}$$ I think you can finish the rest if you remember that $$\lim_{h\to 0}\frac{\sin ah}{h}=a$$

EDIT: Here is the rest:

Obviously $f$ is differentiable in $(-\frac{\pi}{2},0)\cup(0,\frac{\pi}{2})$. We need to check differentiability at $0$ separately with the definition:

$$\lim_{h\to 0^+}\frac{f(h)-f(0)}{h}=\lim_{h\to 0^+}\frac{\sin(\pi h)}{h}=\pi$$ while $$\lim_{h\to 0^-}\frac{f(h)-f(0)}{h}=\lim_{h\to 0^-}\frac{-\sin(\pi h)}{h}=-\pi$$ and therefore $f$ is not differentiable at $0$ even though it is continuous there.

-
So, here at $x=0$ , $f(x)$ is not differentiable. Am I right? – Argha Dec 21 '12 at 7:10
Right! I will add this to my answer. – Nameless Dec 21 '12 at 7:12
Thanks a lot. Now I got this. – Argha Dec 21 '12 at 7:17
Nice, Nice answer +1 – Babak S. Dec 21 '12 at 7:28