Say I want to show the function f(x)=x+1 when x is rational and f(x)=2x when x is irrational is only continuous at 1.
Clearly, it is only continuous when x=1. To show this, I proved $\lim_{x \to 1} f(x) = f(1) $ by considering the limit of both pieces. I'm not sure if this is correct though. Is there a way to do this by definition?
I'm also a little stuck how to show f(x) is discontinuous elsewhere rigorously, though. Would I do it by delta-epsilon definition of continuity? By finding a sequence (x_n)->c where f(x_n)-/->f(c)?