# Show that

Question:

Show that $f(x)=\cos x^{2}$ is a continuous function.

Solution:

Given: $f(x)=\cos \left(x^{2}\right)$

This function $f$ is defined for every real number and $f$ can be written as the composition of two functions as

$f=g \circ h$, where $g(x)=\cos x$ and $h(x)=x^{2}$

$\left[\because(g o h)(x)=g(h(x))=g\left(x^{2}\right)=\cos \left(x^{2}\right)=f(x)\right]$

It has to be first proved that $g(x)=\cos x$ and $h(x)=x^{2}$ are continuous functions.

It is evident that $g$ is defined for every real number.

Let $c$ be a real number.

Then, $g(c)=\cos c$

Put $x=c+h$

If $x \rightarrow c$, then $h \rightarrow 0$

$\lim _{x \rightarrow c} g(x)=\lim _{x \rightarrow c} \cos x$

$=\lim _{h \rightarrow 0} \cos (c+h)$

$=\lim _{h \rightarrow 0}[\cos c \cos h-\sin c \sin h]$

$=\lim _{h \rightarrow 0} \cos c \cos h-\lim _{h \rightarrow 0} \sin c \sin h$

$=\cos c \cos 0-\sin c \sin 0$

$=\cos c \times 1-\sin c \times 0$

$=\cos c$

$\therefore \lim _{x \rightarrow c} g(x)=g(c)$

So, $g(x)=\cos x$ is a continuous function.

Now,

$h(x)=x^{2}$

Clearly, $h$ is defined for every real number.

Let $k$ be a real number, then $h(k)=k^{2}$

$\lim _{x \rightarrow k} h(x)=\lim _{x \rightarrow k} x^{2}=k^{2}$

$\therefore \lim _{x \rightarrow k} h(x)=h(k)$

So, $h$ is a continuous function.

It is known that for real valued functions $g$ and $h$, such that $(g \circ h)$ is defined at $x=c$, if $g$ is continuous at $x=c$ and if $f$ is continuous at $g(c)$, then, $(f \circ g)$ is continuous at $x=c$.

Therefore, $f(x)=(g o h)(x)=\cos \left(x^{2}\right)$ is a continuous function.