# derivative calculation involving floor function $\left\lfloor {{x^2}} \right\rfloor {\sin ^2}(\pi x)$ [duplicate]

I was asked to find when the function is differentiable and what is the derivative of:

$$\left\lfloor {{x^2}} \right\rfloor {\sin ^2}(\pi x)$$

Now, I am not sure how to treat the floor function.

## marked as duplicate by Davide Giraudo, Thomas Andrews, TMM, Vedran Šego, rschwiebJan 2 '14 at 13:51

• The floor function is constant, except for jumps whenever $x^2$ is an integer. – user61527 Dec 31 '13 at 21:55
Hint: Split into two cases: Either $x^2$ is an integer, or it is not an integer. When $x^2\notin{\mathbb{Z}}$, $\lfloor x^2\rfloor$ will be a constant in some small interval around $x$, and so $$\frac{d}{dx} \lfloor x^2\rfloor\sin^2(\pi x)=\lfloor x^2\rfloor 2\pi \sin (\pi x) \cos(\pi x).$$
Try using the definition of the derivative to determine what happens when $x^2\in\mathbb{Z}$. There will be two cases depending on whether or not $x\in\mathbb{Z}$. In one of the cases, the derivative is not defined, and in the other case it will be zero.
• So you're saying: $f(x) = \left\lfloor {{x^2}} \right\rfloor = f'(x)$. Right? – AndrePoole Dec 31 '13 at 22:12