# How can this function be continous at all points?

I have an exercise in which I need to determine which functions are continous for all points

Note: $\lfloor x\rfloor$ is floor of $x$.

Function I need to consider is $f(x)= \lfloor x\rfloor+\sqrt{x- \lfloor x\rfloor}$

How can I prove that this function is continuous at integer values if neither $\lfloor x\rfloor$ nor $\sqrt{x- \lfloor x\rfloor}$ are continuous at integer values?

I can determine it visually from graph and intuitively when considering values close to integers from both sides, but how can I rigorously prove it?

-

Hint: For any $n\in \mathbb{N}$, we have $$\lim_{x\to n-} \lfloor x\rfloor=n-1$$ and $$\lim_{x\to n+} \lfloor x\rfloor=n$$

-

It's simple to see that it suffices to prove the continuity of $f$ on the integer. So let $n\in\Bbb Z$ then:

$$\lim_{x\to n^+}f(x)=\lim_{x\to n^+}n+\sqrt{x-n}=n$$and$$\lim_{x\to n^-}f(x)=\lim_{x\to n^-}n-1+\sqrt{x-n+1}=n-1+1=n$$ so $$\lim_{x\to n^+}f(x)=\lim_{x\to n^-}f(x)=n=f(n)$$ hence $f$ is continuous at $n$ and we conclude.

-

$1-{\bf 1}_{\Bbb Q}$ and ${\bf 1}_{\Bbb Q}$ are everyhere discontinuous, but their sum is $1$, which is continuous.

-
This isn't really an answer. –  vadim123 Mar 16 '14 at 20:11
@vadim123 I think it is quite relevant. –  Pedro Tamaroff Mar 16 '14 at 20:16