Prove limit of function

Solution 1:

Assume $f(x)$ does not converge towards $1$ when $x\to 0$. That means there exists $\epsilon>0$ and a sequence $(x_n)_{n\in\mathbb{N}}$ such that $x_n\to 0$, and $|f(x_n)-1|>\epsilon$ for all $n$, so either $f(x_n)>1+\epsilon$ or $f(x_n)<1-\epsilon$.

Now, notice that the function $g:x\mapsto x+1/x$ admits a strict minimum for $x=1$. That means there exists $\sigma\in\mathbb{R}$ such that in both of the above cases, $g(f(x_n))>2+\sigma$, which is impossible, hence the result.

Solution 2:

Hint Prove first that there exists some $\delta$ such that $f$ is positive and bounded on $(x- \delta, x+ \delta)$.

Hint 2: $$\lim \limits_{x \to a}f(x)+\frac{1}{f(x)}=2 \Leftrightarrow \\ \lim \limits_{x \to a}(f(x)+\frac{1}{f(x)}-2)=0 \Rightarrow \\ \lim \limits_{x \to a}(f(x)^2-2 f(x)+1)=0 $$ with the last step following from the fact that $f$ is positive and bounded.

Thus $$\lim \limits_{x \to a}(f(x)-1)^2=0 $$ Tke the square root now.