<s>[INST] What is wrong with my series expansion of $\cos(\sin(x))$ I need to expand the Maclaurin series for $f(x)=\cos(\sin(x))$
I take the first derivative of this function and I obtain $f'(x)=\sin(\sin(x))\cdot -\cos(x)$
I then assume that the series of $f(x)=\cos(\sin(x))$ takes the form:
$b_0+b_1x+b_2x^2+b_3x^3+b_4x^4+b_5x^5+b_6x^6+b_7x^7+O(x^8)$
The series for $-\cos(x)=-1+\dfrac{x^2}{2}-\dfrac{x^4}{24}+\dfrac{x^6}{720}-\dfrac{x^8}{40320}+\dfrac{x^{10}}{3628800}-\dfrac{x^{12}}{479001600}$
I let $a_0$ through $a_n$ denotes the coefficients of $-cos(x)$, so I have:
$a_0=-1, a_1=0, a_2=\dfrac{1}{2}, a_3=0, a_4=-\dfrac{1}{24},...$
The series for $f'(x)=\sin(\sin(x))\cdot -\cos(x)=b_1+2b_2x+3b_3x^2+4b_4x^3+5b_5x^4+6b_6x^5+7b_7x^6+8b_8x^7$
This means the differentiate the series of $f(x)=\cos(\sin(x))$
The Cauchy product of two power series is defined as:
$A= a_0+a_1x+a_2x^2+a_3x^3+a_4x^4+...$
$B= b_0+b_1x+b_2x^2+b_3x^3+b_4x^4+...$
$A\cdot B=a_0b_0+(a_0b_1+a_1b_0)x+(a_0b_2+a_1b1_1+a_2b_0)x^2...$
I equate the coefficients of $f'(x)=\sin(\sin(x))\cdot -\cos(x)$
It is here that I am lost, this method works well for series expansion of $e^{cos(x)}$ and $e^{sin(x)}$, but it doesn't seem to work here. I don't know the series expansion of $\sin(\sin(x))$
Is there any better method than employing directly the Taylor formula for $x=0$. An elegant way of expanding this functions rather than brute force calculation.
 [/INST] Rather than calculating derivatives. Substitute 
\begin{eqnarray*}
\sin(x)=x-\frac{x^3}{6}+\frac{x^5}{120}-\frac{x^7}{5040}+\cdots
\end{eqnarray*}
into
\begin{eqnarray*}
\cos(x)=1-\frac{x^2}{2}+\frac{x^4}{24}-\frac{x^6}{720}+\cdots.
\end{eqnarray*}
This gives
\begin{eqnarray*}
\cos(\sin(x))=1 &-& \frac{1}{2} \left( x-\frac{x^3}{6}+\frac{x^5}{120}-\frac{x^7}{5040}+\cdots \right)^2 \\ 
& +& \frac{1}{24}\left( x-\frac{x^3}{6}+\frac{x^5}{120}-\frac{x^7}{5040}+\cdots \right)^4 \\
&-& \frac{1}{720} \left(  x-\frac{x^3}{6}+\frac{x^5}{120}-\frac{x^7}{5040}+\cdots \right)^6+\cdots.
\end{eqnarray*}
and expand upto the order you require 
\begin{eqnarray*}
\cos(\sin(x))=1 -\frac{x^2}{2} +\frac{5x^4}{24}+\cdots.
\end{eqnarray*}
</s>