Any help in solving the following problem would be greatly appreciated:
Let $f, g_1, g_2$ be functions from $\mathbb R$ to $\mathbb R$, with $g_1(x) \leq f(x) \leq g_2(x)$, for all $x \in \mathbb R$. Suppose that, for some $p \in \mathbb R$, we have $\lim_{x \rightarrow p} g_1(x) = \lim_{x \rightarrow p} g_2(x) = c$. Show that $ \lim_{x\rightarrow p} f(x) = c,$ as well.
I've spent hours on it and haven't come up with anything worth posting.