Show solutionHide solution
We must show that \(f(x)=\cos(x^2)\) is continuous at every real number.
Recall the standard result: if \(g\) is continuous at \(a\) and \(h\) is continuous at \(g(a)\), then the composite function \(h\circ g\) is continuous at \(a\).
Write \(f\) as a composition. Let
\[g(x)=x^2,\qquad h(u)=\cos u,\]so that
\[f(x)=h(g(x))=\cos(x^2).\]Step 1: Continuity of \(g(x)=x^2\). The identity function \(x\mapsto x\) is continuous on \(\mathbb{R}\), and the product of continuous functions is continuous. Hence \(g(x)=x\cdot x\) is continuous at every \(a\in\mathbb{R}\). Equivalently,
\[\lim_{x\to a} x^2=a^2=g(a).\]Step 2: Continuity of \(h(u)=\cos u\). The cosine function is continuous on \(\mathbb{R}\), so for every real \(u_0\),
\[\lim_{u\to u_0}\cos u=\cos u_0.\]Step 3: Apply the composition rule. Fix any \(a\in\mathbb{R}\). Since \(g\) is continuous at \(a\), we have \(g(x)\to g(a)=a^2\) as \(x\to a\). Since \(h\) is continuous at \(u_0=a^2\), it follows that
\[\lim_{x\to a} f(x)=\lim_{x\to a}\cos(x^2)=\cos\!\left(\lim_{x\to a}x^2\right)=\cos(a^2)=f(a).\]Thus the limit of \(f\) at \(a\) exists and equals the value of \(f\) at \(a\). Since \(a\) was an arbitrary real number, \(f(x)=\cos(x^2)\) is continuous on \(\mathbb{R}\).
Therefore \(f(x)=\cos(x^2)\) is a continuous function.