If a function is defined in pieces, and if the definition changes at
x=a, then we use the definition for x<a to compute
limx→a−f(x), we use the definition at x=a to
compute f(a), and the definition for x>a to compute
limx→a+f(x), and then we compare the three
quantities.
Example: If f(x)={1−xx<0,x2x≥0,
then
limx→0−f(x)=limx→0−1−x=1limx→0+f(x)=limx→0+x2=0f(0)=x2|x=0=0.
Since the limits from the left and right do not agree, there is no overall
limit, and the function is discontinuous at x=0.