Negation of definition of continuity

The negation is:

There exists $ϵ>0$ such that for all $δ>0$, there is an $x_\delta$ such that $ |x_\delta−x_0|<δ$ yet $|f(x_\delta)−f(x_0)|≥ϵ$


Your negation is correct; you should specify though that what you're defining is continuity at the point $x_0$, which is distinct from continuity in the whole domain $S$.

Your choice of $\epsilon=1/2$ is fine. However you need to do some more work to show that $f$ can't be continuous. Suppose we try to make $f$ into a continuous function by assigning $f(0)=y_0$. Take any $\delta>0$.

Case 1: Suppose $y_0<0$. Let $x=1/(\pi/2+2\pi N)$ where $N$ is chosen large enough so $|x|<\delta$. Then $|f(x)-f(x_0)|=|1-y_0|\geq1>\epsilon$ which proves discontinuity.

Case 2: Suppose $y_0\geq0$. Let $x=1/(-\pi/2+2\pi N)$ where $N$ is chosen large enough so $|x|<\delta$. Then $|f(x)-f(x_0)|=|-1-y_0|\geq1>\epsilon$ which again proves discontinuity.

Thus we conclude there's no choice of $y_0=f(0)$ which makes $f$ continuous at zero.


The negation is:

there exists $\epsilon >0$ such that for any $\delta>0$ we can find an $x$ such that $|x-x_0|<\delta$ and $|f(x)-f(x_0)| > \epsilon$.

And you have just proved this.