<s>[INST] $\epsilon$–$\delta$ proof that $\lim_{x\to x_0}\frac{1}{x} = \frac{1}{x_0}$ for all $x_0\neq 0$; how to identify $\delta$? I would like to use the $\epsilon$–$\delta$ definition of the limit of a function to show that
$$\lim_{x\to x_0} \frac{1}{x} = \frac{1}{x_0}$$
But I'm having trouble identifying a $\delta>0$ for arbitrary $\epsilon>0$ and  $x_0\neq 0$ so that
$$ 0<|x-x_0|<\delta \implies |\frac{1}{x} -\frac{1}{x_0}|<\epsilon$$
How can you find a $\delta$ that satisfies this condition?
 [/INST] Given $\ \varepsilon > 0.$
If $\varepsilon < \frac{1}{\vert x_0 \vert },$ then $\vert \varepsilon x_0 \vert<1,\ $ and so $$ x \in \left( \underbrace{\ \frac{x_0}{1 + \varepsilon x_0}\ }_{a}, \underbrace{\ \frac{x_0}{1- \varepsilon x_0}\ }_{b} \right) \implies \frac{1}{x} \in \left( \frac{1 - \varepsilon x_0}{x_0}, \frac{1+ \varepsilon x_0}{x_0} \right) = \left( \frac{1}{x_0} - \varepsilon, \frac{1}{x_0} + \varepsilon \right). $$
Else, if $\ \varepsilon \geq \frac{1}{\vert x_0 \vert }\ \left( > \frac{1}{2}\cdot \frac{1}{\vert x_0 \vert} \right),\ $ then $$ x \in \left( \underbrace{\ \frac{1}{ \frac{1}{x_0} + \frac{1}{2} \cdot \frac{1}{\vert x_0 \vert}\  } }_{c}, \underbrace{\ \frac{1}{ \frac{1}{x_0} - \frac{1}{2} \cdot \frac{1}{\vert x_0 \vert} }\ }_{d} \right) \implies \frac{1}{x} \in \left( \frac{1}{x_0} - \frac{1}{2} \cdot \frac{1}{\vert x_0 \vert}, \frac{1}{x_0} - \frac{1}{2} \cdot \frac{1}{\vert x_0 \vert} \right)$$
$$\subset \left( \frac{1}{x_0} - \varepsilon, \frac{1}{x_0} + \varepsilon \right). $$
So let $$\delta:= 
\begin{cases}
 \frac{b-a}{2}&\text{if}\, \varepsilon < \frac{1}{\vert x_0 \vert }\\
 \frac{d-c}{2}&\text{if}\, \varepsilon \geq \frac{1}{\vert x_0 \vert }\\
\end{cases}
$$
</s>