f(x) = (x2 + cos x)/(x2 + 1)

Here, x2 is always continuous for all real values of x and cosine is a continuous function
\(\therefore\) p(x) is a continuous function and q(x) = x2 + 1
It is a polynonimal function
\(\therefore\) It is continuous for all real values of x
\(\therefore\) f(x) is a continuous function.