# Am I using sandwich theorem incorrectly?

I saw this question and wondered how OP of that question was able to do : $$0<\sin x+1<2$$ this $$\frac 0{|x|}<\frac{\sin x+1}{|x|}<\frac 2{|x|}$$ and when $x\to \infty$ he got the limit evaluated as zero.

Why i wondered is because it is not working on this inequality $$2\leq x+ \frac 1x\leq 20$$ where $x\in [1,b]$ and if i multiply both sides with $|x|=x$ in the same way in which it is done in above question the i will get $$2x\leq x^2+1\leq 20x$$ and then i take limit i get $$\lim_{x\to 0}2x\leq \lim_{x\to 0} (x^2+1)\leq\lim_{x\to 0}20x$$ which implies $1=0$ and this is false!

One may say that $0$ is not in domain of $x/x$ but we are allowed to take limit at $0$.

So where is my conceptual error?

Edit:

On basis of comments i will give this example where we have restricted domain an still we can apply sandwich theorem $$\frac 1{1+|x|}\leq \frac{e^x-1}{x}\leq 1+|x|(e-2)$$ this inequality is true for any value of x in $[-1,1]-{0}$ on applying limit $$\lim_{x\to 0}\frac 1{1+|x|}\leq \lim_{x\to 0}\frac{e^x-1}{x}\leq \lim_{x\to 0}(1+|x|(e-2))$$ we get correct value of expression. And in this case also $0$ is not in the range if $x$ but we are allowed to take its limit at $x=0$.

• But the starting point $2\leq x+1/x\leq 20$ is NOT true for any $x>0$!!! So of course you obtain a false statement when you make $x\to 0$. – guestDiego May 22 '16 at 14:44
• No i have $x\in [1,b]$ and that equality is true in this range – ramsay May 22 '16 at 14:46
• Of course, it is true in that range: $[1,b]$. But the limiting point, i.e. 0 is NOT in that range! – guestDiego May 22 '16 at 14:48
• You have not runned into a mistery of mathematics! – guestDiego May 22 '16 at 14:49
• @guestdiego see the last lines i edited – ramsay May 22 '16 at 14:53

Here is an example that has problems akin to your example.

$$1\le x\le2x$$

For $x\in[1,2]$.

We want to evaluate $\lim_{x\to0}$.

$$1\le0\le0$$

Can you figure out what's wrong here?

• example is great and makes sense! but the reason why sandwich is not working, i am not able to make out? – ramsay May 22 '16 at 15:47
• @ramsay Try and pick out what parts are important when I created my inequalities, and see what fails when I do the limit. Think about it for a few minutes and tell me what you think. – Simply Beautiful Art May 22 '16 at 15:48
• I think that inequality is not true when $x\to 0$ that inequality is only valid when $x\in [1,2]$ – ramsay May 22 '16 at 16:02
• @ramsay And that's why your inequality failed. – Simply Beautiful Art May 22 '16 at 16:46
• But even in case of that $(e^x-1)/x$ The inequality is true only when $x\in [-1,1]-\{0\}$ , but why do we get correct answer when we take limit at 0 even though it is not in the interval?(sorry) – ramsay May 22 '16 at 17:15

When you let $x \to 0$, you cannot claim $x \in [1,b]$ anymore.

• But when we apply sandwich theorem we don't change the range. – ramsay May 22 '16 at 14:44
• @ramsay No, you can't take $x\to0$ and stay in the range. At most, you can take $x\to1$, or you need to adjust the range to include the limit. – Simply Beautiful Art May 22 '16 at 14:48
• @simpleArt but why this guys is not changing the range – ramsay May 22 '16 at 14:50
• @ramsay Because the limit is already inside the range, so there is no need. His equality holds for $x\in\mathbb{R}$, so no worries. – Simply Beautiful Art May 22 '16 at 14:50