Piecewise function, prove function is continuous at 0

379 Views Asked by At

Consider the piecewise function: $$f(x)=\begin{cases} x & \text{if $x$ is rational}\\ -x & \text{if $x$ is irrational} \end{cases} $$

This produces a function that jumps rapidly between $x$ and $-x$ throughout its graph. It can be shown that this function is discontinuous for all nonzero values of $x$. I do not need to prove this, but I do need to prove that this function is continuos at $0$.

2

There are 2 best solutions below

0
On

$|f(x)-f (0)|=|x|$.

Your turn!

0
On

$$\forall \epsilon \exists \delta >0 :|x-x_0|<\delta \Rightarrow |f(x)-f(x_0)|<\epsilon\\ |x-0|<\delta \Rightarrow |f(x)-f(0)|<\epsilon\\ |x|<\delta \Rightarrow |\pm x-0|<\epsilon \\ |x|<\delta \Rightarrow |\pm 1||x|<\epsilon\\\delta <\epsilon $$