<s>[INST] How to calculate Taylor expansion of $\cos(\sin x)$ I know that Taylor expansion of $\cos x = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} + O(x^6)$
and that of $\sin x = x - \frac{x^3}{3!} + \frac{x^5}{5!} - O(x^7)$.
But how do I calculte the Taylor Expansion of $\cos(\sin x)$. 
 [/INST] We know that for any $x$ (close to $0$):
$$
\cos x = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - O(x^6)\\
\sin x = x - \frac{x^3}{3!} + \frac{x^5}{5!} - O(x^7)
$$
We can find $\cos\sin x$ by substituting $x\to \sin x$ in the expansion of $\cos x$:
$$
\cos x = 1 - \frac{(x - \frac{x^3}{3!} + \frac{x^5}{5!} - O(x^7))^2}{2!} + \frac{(x - \frac{x^3}{3!} + \frac{x^5}{5!} - O(x^7))^4}{4!} + O(x^6)
$$
We know that $O(x^a)^b=O(x^{ab})$, so the error terms because of the sine expansion will be smaller (go to zero faster) than $O(x^6)$. We may also omit any power of $x$ with exponent at least $6$, because of the $O(x^6)$. Now, we can calculate the result:
$$
\cos\sin x=1-\frac 12 x^2+\frac 5{24}x^4+O(x^6)
$$
Another way to calculate this is to repeatedly differentiate $\cos\sin x$ and evaluate the result in $x=0$, but that requires some more effort I think, because you get a lot of terms/factors due to the product and chain rule.
</s>