Dirichlet's Function

Let g(x) be:

g(x)={1x∈Q0x∉Q

Pasted image 20241106135111.png

This is discontinuous because for any c∈R we can construct a sequence of rational numbers (qn)⊆Q where qn→c and also (xn)⊆(Q)c where xn→c. Notice that:

g(qn)=1→1,g(xn)=0→0

These two sequences converge to c but converge to different values, so then the function cannot have a limit at c and thus isn't continuous there.