# How to approach finding the limit of a function with $\lfloor \sin x\rfloor$ in it

I am trying to solve a limit for the function $\cos(x/2)-\lfloor\sin x\rfloor$ but the floor function seems to confuse me.

What can I do to deal with this?

Thanks a-lot for the help :)

-
What limit are you trying to find? – Mark Bennet Nov 18 '11 at 11:24
$(k\pi)/2$ where k = 0,1,2,3 (four limits) – Jason Nov 18 '11 at 11:32
Note the Floor of $\sin(x)$ is -1 if $\sin x<1$ and is 0 if $\sin x>0$. – David Mitra Nov 18 '11 at 11:35
@David: Unless it's +1. – TonyK Nov 18 '11 at 11:38
@David Indeed, thanks. – David Mitra Nov 18 '11 at 11:39

First $$\lfloor\sin x\rfloor =\cases{ 1,& \sin x=1 \cr 0,& 1>\sin x>0\cr -1,& \sin x <0 }$$

For $k=0$, you're computing $$\lim_{x\rightarrow 0} (\cos(x/2) - \lfloor\sin x\rfloor).$$ Now $\lim\limits_{x\rightarrow 0} \cos(x/2)=1$.

But $\lim\limits_{x\rightarrow 0} \lfloor\sin x\rfloor$ does not exist, since $\lim\limits_{x\rightarrow0^+}\lfloor\sin x\rfloor=0$ and $\lim\limits_{x\rightarrow0^-}\lfloor\sin x\rfloor=-1$.

From the previous two observations, it follows that $\lim\limits_{x\rightarrow 0} (\cos(x/2) - \lfloor\sin x\rfloor)$ does not exist.

For $k=1$, you're computing $$\lim_{x\rightarrow \pi/2} (\cos(x/2) - \lfloor\sin x\rfloor).$$ As $$\lim\limits_{x\rightarrow \pi/2} \cos(x/2)=\sqrt2/2$$ and $$\lim\limits_{x\rightarrow \pi/2} \lfloor\sin x\rfloor=0,$$ it follows that $\lim\limits_{x\rightarrow 0} (\cos(x/2) - \lfloor\sin x\rfloor)=\sqrt2/2$.

I'll leave the other two limits for you.

-
Hmm, Thanks but I fail to understand how you can do that since $\lfloor{sinx}\rfloor$ is not continues at $\pi/2$ – Jason Nov 18 '11 at 12:09
That doesn't come into play; when taking limits, it does not matter what the function does at the limit point. $\lim_{x\rightarrow a} f(x)=L$ if $f(x)$ can be made as close to $L$ as desired by taking $x$ sufficiently close to, $\it\ but\ different\ from\$ $a$. – David Mitra Nov 18 '11 at 12:13
Remember, in the definition of limits, the value of the function at the point $a$ doesn't matter at all, undefined or something weird, whatever. The limit is decided by the values in a small open set around $a$, not including $a$. So even though the value changes suddenly at $\pi/2$, the values around $\pi/2$ don't change so suddenly. Note, if a function is continuous at $a$, we have $f(a) = \lim_{x\to a} f(x) .$ If it is not continuous, the limit may still exist, it just won't equal $f(a).$ – Ragib Zaman Nov 18 '11 at 12:17
:) Sorry I forgot that the functions do not have to be continues to apply arithmetic rules of limits - they just have to be defined :) Thanks for the help – Jason Nov 18 '11 at 12:38

This function is defined at points (kπ)/2 where k = 0,1,2,3, so just apply the formula

-
It is defined but It's not continues so I can't just apply it.. Or can I? – Jason Nov 18 '11 at 11:46
@Jason, You can't. A definition of continuity at $x=a$ is that $\lim_{x\to a} f(x) = f(a).$ and since the floor function is not continuous at integers, we can't simply plug it in. Thinking about or drawing a graph of sin x, think about the limits from the left and the right separately. Do they agree? – Ragib Zaman Nov 18 '11 at 11:56
@RagibZaman yep I agree that's exactly what I did in my head :). But that's why I am stuck :( and David's tip doesn't seem to help me – Jason Nov 18 '11 at 12:00
I had a student who liked to say "... and then you just do the math " ! – The Chaz 2.0 Nov 18 '11 at 12:14