The given function is
f(x)=|x−5|={5−x,ifx<5x−5,ifx≥5
The function is defined at all points of the real line.
Let c be a point on a real line. Then, c<5 or c=5 or c>5
Case I : c<5
Then, f(c)=5−c
limx→cf(x)=limx→c(5−x)=5−c
∴limx→cf(x)=f(c)
Therefore, f is continuous at all real numbers less than 5.
Case II : c=5
Then f(c)=f(5)=(5−5)=0
Then, limx→5f(x)=limx→5(5−x)=(5−5)=0
limx→5f(x)=limx→5(x−5)=0
∴limx→5f(x)=limx→5f(x)=f(c)
Therefore, f is continuous at x=5
Case III : c>5
Then, f(c)=f(5)=c−5
limx→cf(x)=limx→c(x−5)=c−5
∴limx→cf(x)=f(c)
therefore, f is continuous at all real numbers greater than 5.
Hence, f is continuous at every real number and therefore, it is a continuous function.