The function f(x)=xmod3 is a piecewise function, and therefore might have discontinuities at the points where the pieces meet.
Since xmod3 outputs the remainder when x is divided by 3, the different pieces occur when x is an integer multiple of 3, that is when x=3n, for some integer n.
Let's analyze the behavior of the function around x=0 and x=3, which are two consecutive integer multiples of 3.
- For x -values slightly less than 0, f(x)=−2.
- For x -values slightly greater than 0, f(x)=1.
As x approaches 0 from the left and from the right, the function approaches different values, which means the limit doesn't exist, and the function is discontinuous at x=0.
Similarly, analyzing the behavior of the function around x=3, we can see that the limit also doesn't exist, and the function is discontinuous at x=3.
In general, the function f(x)=xmod3 is discontinuous at all points of the form x=3n, where n is any integer.