<s>[INST] How to compute power series by composition Is it possible to compute the power series of every function (e.g. around $0$) just by composing of the power series of its arguments?
For example: 
The power series of $\sin(x^2)$ around $0$ is the composition of power series of $\sin(x)$ and $x^2$:
$compose(x-\frac{x^3}{6}+\frac{x^5}{120}+..., x^2) = x^2 - \frac{x^6}{6} + \frac{x^{10}}{120}+...$
If the answer to my question is "yes", then how would you compute the power series of $\sqrt{\cos(x)}$? Because $\sqrt{x}$ doesn't have a power series expansion around $0$ and you can't simply compose the power series of $\sqrt{x}$ and that one of $\cos(x)$ to find the expansion of $\sqrt{\cos(x)} = 1-\frac{x^2}{4}-\frac{x^4}{96}+O\left(x^5\right)$.
 [/INST] Use the series for $\sqrt{1+x}$ and $\cos x - 1$
$$\sqrt{1+x} = 1+\frac{1}{2}x-\frac{1}{8}x^2+\frac{1}{16}x^3\pm\dots$$
$$\cos x - 1 = -\frac{1}{2}x^2+\frac{1}{24}x^4 \pm \dots$$
Now substitute the second into the first:
$$\sqrt{\cos x} =\sqrt{1 + (\cos x-1)} \\=
 1+\frac{1}{2}\left(-\frac{1}{2}x^2+\frac{1}{24}x^4\pm \dots\right) 
-\frac{1}{8}\left(-\frac{1}{2}x^2+\frac{1}{24}x^4 \pm\dots\right)^2+ \dots\\
= 1-\frac{1}{4}x^2-\frac{1}{96}x^4 \pm \dots
$$
</s>