How to find the function $f(x) = [x]^2-[x^2]$ is discontinuous at all integers except $1$...... Problem : 
How to find the function $f(x) = [x]^2-[x^2]$ is discontinuous at all integers except 1. where $[\hspace{2pt}\cdot\hspace{2pt}]$ represents the greatest integer function. 
My approach : let $x = n \in Z$  
Left hand limit : Let h is very approx. 0 
$\lim_{h \to 0^+} [n+h]^2-[(n+h)^2]$
$\lim_{ h\to 0^+} n^2-n^2 = 0$ 
Now how to proceed further please suggest will be of great help , thanks. 
 A: For h tending zero from above, we have a limit of zero as shown in your attempt.
For h tending to zero from below we get $lim_{h→0^-}[n+h]^2 = lim_{h→0^-}(n-1)^2 = n^2 -2n +1$ and $lim_{h→0^-}[(n+h)^2] = lim_{h→0^-}[n^2 +2hn +h^2] = n^2 -1$ for sufficiently small h. Thus  $lim_{h→0^-}[n+h]^2-[(n+h)^2]= 2-2n.$ 
These two limits differ form $n \neq 1$. Thus $f(x)$ discontinuous at all integers except 1.
A: Observe
$$[3.1^2]-[3.1]^2=9-9=0.$$
$$[2.9^2]-[2.9]^2=8-4=4.$$
You can generalize from this example, replacing $3\pm0.1$ by $n\pm h$ with $n>0$ and $h$ small enough that $(n\pm h)^2$ doesn't differ from $n^2$ by more than one.
It is an easy matter to show that the RHS are always $0$ and $2n-2$.
For negative $n$, the situation is different because the floor of a negative is the negative of the ceiling.
$$[(-3.1)^2]-[-3.1]^2=9-16=-7.$$
$$[(-2.9)^2]-[-2.9]^2=8-9=-1.$$
The RHS are $2n-1$ and $-1$.
Finally, for $n=0$,
$$[0.1^2]-[0.1]^2=0-0=0.$$
$$[(-0.1)^2]-[-0.1]^2=0-1=-1.$$
A: Looking at the function $f$ near integers is a good idea, but you didn't put much effort into this, have you?
So, here are your next steps:


*

*Take some values of $x$ and actually calculate the function. Specifically, look for values around integers, let's say, $2$. Look at $f(1.5), f(1.8), f(1.9), f(2), f(2.1)$. What happens around $2$?

*Now, take some other integer, say, $10$. Look at $f(9.8), f(9.9), f(10), f(10.1)$?


After looking at the values for a while, you should notice a pattern. Once you have that, you will be able to make a general plan of how you can prove the original statement. First do it in an informal way, but then go through the steps again and try to make them more rigorous.
