I have to show that the limit of a function, if it exists, is unique.
My attempt is proceed by contradiction: so let's assume that $f(x)\to l_1$ as $x\to x_0$ and $f(x) \to l_2$ as $x \to x_0$, with $l_1 \ne l_2$.
By the first limit we have that for all $\varepsilon_1 >0$ there exists $\delta_1 >0$ such that $0<|x-x_0| < \delta_1$ implies $|f(x)-l_1| < \varepsilon_1$, by the second limit for all $\varepsilon_2 >0$ there exists $\delta_2 >0$ such that $0<|x-x_0| < \delta_2$ implies $|f(x)-l_2| < \varepsilon_2$.
Since $l_1 \ne l_2$ we can suppose, without loss of generality, that $l_1>l_2$ and since $\varepsilon_1$ and $\varepsilon_2$ are arbitrary we can choose $\varepsilon_1=\varepsilon_2=\varepsilon$.
Let $\delta:=\min\{\delta_1,\delta_2\}$, so if $0<|x-x_0|<\delta$ we have that simultaneously $$|f(x)-l_1|<\varepsilon \Leftrightarrow l_1-\varepsilon < f(x) < l_1+\varepsilon$$ $$|f(x)-l_2|<\varepsilon \Leftrightarrow l_2-\varepsilon < f(x) < l_2+\varepsilon$$ Since $l_1>l_2$, from the inequalities if follows that $$l_1-\varepsilon<l_2+\varepsilon$$ Since $l_1>l_2$ it is $\frac{l_1-l_2}{2}>0$, so if we choose $\varepsilon<\frac{l_1-l_2}{2}$ we get $$l_1-\varepsilon<l_2+\varepsilon\Rightarrow\varepsilon>l_1-\varepsilon-l_2=\frac{l_1-l_2}{2}$$ Which is a contradiction with $\varepsilon<\frac{l_1-l_2}{2}$, but I'm not sure if this is correct because in the last step I've substituted $\varepsilon$ only in one term and not in all the terms of the inequality. Is this correct? Thanks.