Proof of discontinuity at a point I am trying to prove that the function $f(x) = \frac{1}{x}$ for $x \neq 0$ and $0$ if $x = 0$ is continuous everywhere except $x = 0$. Here is my attempt.

We first prove continuity. Let $x_0 > 0$ and $\epsilon > 0$. Set $\delta = \min\left(\frac{x_0}{2}, \frac{\epsilon x_0^2}{2}\right)$. Then $|x - x_0| < \delta$ implies
\begin{align*}
|f(x) - f(x_0)| & = \left \lvert \frac{1}{x} - \frac{1}{x_0} \right \rvert \\
& = \frac{|x-x_0|}{xx_0} \\
& < \frac{\frac{x_0^2}{2} \epsilon}{\frac{x_0}{2}} \\
& = \epsilon. 
\end{align*}

I'm stuck on the $x < 0$ case. In the above work, the step $|xx_0| = xx_0$ breaks down in that case unless $x < 0$, but $\delta$ can't depend on $x$.
To prove discontinuity at $x = 0$, I need to find $\epsilon > 0$. so that $\forall \delta > 0$, there exists $y$ such that $|y| < \delta$ and $|f(x) - f(y)| \geq \epsilon$. Here is my attempt.

Let $\epsilon = 0$, $\delta > 0$, and pick $0 > y > \delta$. Then $|y| = -y < \delta$. Also:
$$f(x) - f(y)| = \left \lvert f(0) - \frac{1}{y} \right \rvert = \frac{1}{y} < \delta.$$

This fails because $\delta$ has to be arbitrary, unless I can begin with the case where $\delta < 1$ and then take the case where $\delta \geq 1$.
 A: Your 3rd display line's denominator should be $x_0^2/2,$ not $x_0/2.$ (Typo?) This step should be justified by stating that if $x_0>0$ and $|x-x_0|<\delta$ then $x>x_0-\delta\ge x_0-x_0/2=x_0/2>0,$ so $(x_0x)^{-1}\le (x_0\cdot x_0/2)^{-1}.$
You can do the cases $x_0>0$ and $x_0<0$ at once. Let $\delta=\min (|x_0|/2,\epsilon x_0^2/2).$  Now if $x_0\ne 0$ and $|x-x_0|<|x_0|/2$ then $|x|>|x_0|/2>0$. Hence for any $x_0\ne 0$  we assert that $$|x-x_0|<\delta \implies |x-x_0|<|x_0|/2 \implies |x_0x|=|x_0|\cdot |x|> |x_0|\cdot |x_0|/2=x_0^2/2>0.$$
So if $x_0\ne 0$ and $|x-x_0|<\delta$ then  $$|f(x)-f(x_0)|=|x_0-x|/|x_0x|\le|x_0-x|/ (x_0^2/2)<(\epsilon x_0^2/2)/(x_0^2/2)=\epsilon.$$
A: Let
$$x_n=\frac 1n \text{ and }\; y_n=-\frac 1n$$
We have
$$\lim_{n\to+\infty}x_n=\lim_{n\to+\infty}y_n=\color{red}{0}$$
$$f(x_n)=n\;\text{ and }\; f(y_n)=-n$$
So
$$\lim_{n\to+\infty}f(x_n)\ne\lim_{n\to+\infty}f(y_n)$$
thus, by the sequential catacterisation of the limit, we conclude that
$$\lim_{x\to\color{red}{0}}f(x)\;\text{ doesn't exist}$$
A: $x_0<0$ sets up the same way.
Suppose $x_0<0$
Let $\delta = \min (\frac {|x_0|}{2},\frac {|x_0|^2}{2})$
$|\frac {1}{x} - \frac {1}{x_0}| = |\frac {x_0-x}{xx_0}| < \epsilon $
$|x-x_0|<\delta \implies x_0<x<0 \implies xx_0 > 0$
$|\frac {1}{x} - \frac {1}{x_0}|< \frac {\delta}{xx_0} \le \epsilon$
In the next step, we must show that there exists an $\epsilon > 0$ such that for any $\delta$ there is an $x$ with $|x-0|<\delta$ such that $|f(x) - f(0)| > \epsilon$
Note we can not choose $\epsilon = 0$ as in the work above.  But we can choose $\epsilon  = 1$
Then with $x = \min (\frac 12, \frac {\delta}{2}), |f(x) - f(0)|>\epsilon$
A: To prove it is continuous at $x_0\ne 0$ let $\delta < |x_0|$.
Then if $|x-x_0| < \delta$ then
either $x_0 - \delta < x<  x_0 +\delta < 0$ if $x_0 < 0$. or $0 < x_0-\delta < x < x_0 + \delta$ if $x_0> 0$.
Either way you have $x,x_0$ are the same sign.  And $xx_0 > 0$.
