Let c be a real number, put x=c+h
So if x=c then it means that h→0
h(c)=cos(c)
limx→c h(x) = limx→c cos(x)
Put x=h+c
And as mentioned above, when x→c then it means that h→0
Which gives us limh→0 cos(c+h)
Expanding cos(c+h) = cos(c)cos(h)−sin(c)sin(h)
Which gives us limh→0 cos(h)cos(c)−sin(h)sin(c)
=cos(c)cos(0)−sin(c)sin(0)
=cos(c)
This gives us
limx→c h(x) = limx→c cos(x) = cos(c)=h(c)
And this proves that cos(x) is continuous all across its domain
=> Here g(x) is given by |x|
And |x|=−x for x<0 and x for x>0
For c<0
limx→cg(x)=−c=g(c)
and
For c>0
limx→cg(x)=c=g(c)
which shows that |x| is continuous in its domain