<s>[INST] Prove limit of function I need to prove this limit:

Given $f:(-1,1) \to \mathbb{R}\,$ and $\,f(x)>0,\,$ if $\,\lim_{x\to 0} \left(f(x) + \dfrac{1}{f(x)}\right) = 2,\,$ then $\,\lim_{x\to 0} f(x) = 1$.

 [/INST] Write $c(x) = f(x) + \frac{1}{f(x)}$.  Solve a quadratic equation to see that
$f(x)$ is either $(c(x)+\sqrt{c(x)^2-4}\;)/2$ or $(c(x)-\sqrt{c(x)^2-4}\;)/2$ .  So, for all $x$, we have
$$
\frac{c(x)-\sqrt{c(x)^2-4}}{2} \le f(x) \le \frac{c(x)+\sqrt{c(x)^2-4}}{2}
$$
But we are told that $\lim c(x) = 2$, so that
$$
\lim \frac{c(x)-\sqrt{c(x)^2-4}}{2} = 1\quad\text{and}\quad \frac{c(x)+\sqrt{c(x)^2-4}}{2} = 1.
$$
Our function $f(x)$ is between these, so $\lim f(x) = 1$.
</s>