Squeeze Theorem/Functions

Theorem
Let $a$ be a point on an open real interval $I$.

Also let $f$, $g$ and $h$ be real functions defined and continuous at all points of $I$ except for possibly at point $a$.

Suppose that:
 * $\forall x \ne a \in {I}: g \left({x}\right) \le f \left({x}\right) \le h \left({x}\right)$
 * $\displaystyle \lim_{x \to a} \ g \left({x}\right) = \lim_{x \to a} \ h \left({x}\right) = L$.

Then $\displaystyle \lim_{x \to a} \ f \left({x}\right) = L$.

Proof
We start by proving the special case where $\forall x: g \left({x}\right) = 0$ and $L=0$, in which case $\displaystyle \lim_{x \to a} \ h \left({x}\right) = 0$.

Let $\epsilon > 0$ be a positive real number.

Then by the definition of the limit of a function, $\exists \delta > 0: 0 < \left|{x - a}\right| < \delta \implies \left|{h \left({x}\right)}\right| < \epsilon$.

Now $\forall x \ne a: 0 = g \left({x}\right) \le f \left({x}\right) \le h \left({x}\right)$ so that $\left|{f \left({x}\right)}\right| \le \left|{h \left({x}\right)}\right|$.

Thus:
 * $0 < |x-a| < \delta \implies \left|{f \left({x}\right)}\right| \le \left|{h \left({x}\right)}\right| < \epsilon$

By the transitive property of $\le$, this proves that:
 * $\displaystyle \lim_{x \to a} \ f \left({x}\right) = 0 = L$

We now move on to the general case, with $g \left({x}\right)$ and $L$ arbitrary.

For $x \ne a$, we have:
 * $g \left({x}\right) \le f \left({x}\right) \le h \left({x}\right)$

By subtracting $g \left({x}\right)$ from all expressions, we have:
 * $0 \le f \left({x}\right) - g \left({x}\right) \le h \left({x}\right) - g \left({x}\right)$

Since as $x \to a, h \left({x}\right) \to L$ and $g \left({x}\right) \to L$, we have:
 * $h \left({x}\right) - g \left({x}\right) \to L - L = 0$

From the special case, we now have:
 * $f \left({x}\right) - g \left({x}\right) \to 0$

We conclude that:
 * $f \left({x}\right) = \left({f \left({x}\right) - g \left({x}\right)}\right) + g \left({x}\right) \to 0 + L = L$

Alternative Proof
Alternatively, the result Limit of Function by Convergent Sequences can directly applied to the Squeeze Theorem for Sequences:

Let $f, g, h$ be real functions defined on an open interval $\left({a .. b}\right)$, except possibly at the point $c \in \left({a .. b}\right)$.

Let:
 * $\displaystyle \lim_{x \to c} \ g \left({x}\right) = l$
 * $\displaystyle \lim_{x \to c} \ h \left({x}\right) = m$
 * $g \left({x}\right) \le f \left({x}\right) \le h \left({x}\right)$ except perhaps at $x = c$.

Let $\left \langle {x_n} \right \rangle$ be a sequence of points of $\left({a .. b}\right)$ such that $\forall n \in \N^*: x_n \ne c$ and $\displaystyle \lim_{n \to \infty} \ x_n = c$.

By Limit of Function by Convergent Sequences, $\displaystyle \lim_{n \to \infty} \ g \left({x_n}\right) = l$ and $\displaystyle \lim_{n \to \infty} \ h \left({x_n}\right) = l$.

Since $g \left({x_n}\right) \le f \left({x_n}\right) \le h \left({x_n}\right)$ it follows from the Squeeze Theorem for Sequences that $\displaystyle \lim_{n \to \infty} \ f \left({x_n}\right) = l$.

The result follows from Limit of Function by Convergent Sequences.