If $\lim (f(x) + 1/f(x)) = 2 $ prove that $\lim_{x \to 0} f(x) =1 $ 
Let $f:(-a,a) \setminus \{ 0 \} \to (0 , \infty) $ and assume $\lim_{x
 \to 0} \left( f(x) + \dfrac{1}{f(x) } \right) = 2$. Prove using the
definition of limit that $\lim_{x \to 0} f(x) = 1$

Attempt:
Let $L = \lim_{x \to 0} f(x) $. Let $\epsilon > 0$ be given. If we can find some $\delta > 0$ with $|x| < \delta $ such that $|f(x) - 1 | < \epsilon $ then we will be done.
We know that since $f(x) > 0$, then $\lim 1/f(x) $ is defined. In fact, applying the limit to hypothesis, we end up with
$$ L+ \dfrac{1}{L} = 2 $$
and certainly $L=1$ as desired. I am having difficulties making this proof formal in $\delta-\epsilon$ language. Can someone assist me?

First, note that:
$$a + \frac{1}{a} - 2 = \frac{a^2 - 2a + 1}{a} = \frac{(a - 1)^2}{a}.$$
So, roughly speaking, given we can make $\left|f(x) + \frac{1}{f(x)} - 2\right|$ as small as we like, we should be able to make $\frac{(f(x) - 1)^2}{|f(x)|}$ as small as we like. There are two ways for this to happen: either $f(x)$ is exceptionally close to $1$ or $|f(x)|$ is extremely, unreasonably large. However, in the latter case, $|f(x)|$ being very large means that $(f(x) - 1)^2$ is even larger, which will prevent the whole fraction from being small, so there really was only one option.
Let's formalise this. First, we need to eliminate the possibility of $|f(x)|$ becoming overly large, so let's try to show that $f(x)$ is bounded on some neighbourhood of $x = 0$.
I'm going to pick, fairly arbitrarily, $\varepsilon = 1$, and apply it to the limit definition of $f(x) + 1/f(x) \to 2$. Then, there exists some $\delta_0 > 0$ such that
\begin{align*}
0 < |x| < \delta_0 &\implies \left|f(x) + \frac{1}{f(x)} - 2\right| = \frac{(f(x) - 1)^2}{|f(x)|} < 1 \\
&\implies f(x)^2 - 2f(x) + 1 < |f(x)| \\
&\implies f(x)^2 + (\pm 1 - 2)f(x) + 1 < 0,
\end{align*}
where the $\pm$ depends on the sign of $f(x)$. In either case, we have a convex parabola, and the solutions to the above inequalities will be bounded. That is, there exists some $M$ such that $|f(x)| \le M$ for all $x \in (-\delta_0, \delta_0) \setminus \{0\}$. Since $f(x) \neq 0$ for at least some $x$ near $0$, we know $M > 0$.
Now we prove the limit. Suppose $\varepsilon > 0$. We have, for $0 < |x| < \delta_0$,
\begin{align*}
|f(x) - 1| < \varepsilon &\impliedby (f(x) - 1)^2 < \varepsilon^2 \\
&\impliedby \frac{(f(x) - 1)^2}{M} < \frac{\varepsilon^2}{M} \\
&\impliedby \frac{(f(x) - 1)^2}{|f(x)|} < \frac{\varepsilon^2}{M} \\
&\impliedby \left|f(x) + \frac{1}{f(x)} - 2\right| < \frac{\varepsilon^2}{M}.
\end{align*}
Using the definition of the known limit, there is some $\delta_1$ such that
$$0 < |x| < \delta_1 \implies \left|f(x) + \frac{1}{f(x)} - 2\right| < \frac{\varepsilon^2}{M},$$
and hence
$$0 < |x| < \min\{\delta_0, \delta_1\} \implies |f(x) - 1| < \varepsilon,$$
completing the proof.
