Given:
f(x)=cos(x2)(i)
f(x) has a real and finite value for all x∈R.
Thus, the domain of f(x) is R.
Let us take g(x)=cosx and h(x)=x2.
Now g(x)=cosx is a cosine function and hence continuous.
Again, h(x)=x2 is a polynomial function and hence continuous.
Thus, (g∘h)(x)=g(h(x))=g(x2).
g(h(x))=cos(x2)=f(x)[Changing x to x2 in g(x) is cosx]
Since cosx is continuous and x2 is continuous, the composite function of two continuous functions is continuous for all x∈R.
Alternatively,
Take g(x)=x2 and h(x)=cosx.
Then (h∘g)(x)=h(g(x))=h(x2).
h(g(x))=cos(x2)=f(x)
Thus, f(x)=cos(x2) is continuous for all x∈R.