# How do you write h(x) = cos(x^2) as a composition of two or more functions?

$h \left(x\right) = f \left(g \left(x\right)\right)$ when
$\left\{\begin{matrix}f \left(x\right) = \cos \left(x\right) \\ g \left(x\right) = {x}^{2}\end{matrix}\right.$
If $f \left(x\right) = \cos \left(x\right)$
then $f \left(g \left(x\right)\right) = \cos \left(g \left(x\right)\right)$
and if $g \left(x\right) = {x}^{2}$
then $f \left(g \left(x\right)\right) = \cos \left({x}^{2}\right) = h \left(x\right)$