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.
 A: 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*}
A: Set $f(x) = \cos(\sin(x))$. 
Compute
$$ f'(x) = - \sin(\sin(x)) \cos(x) \qquad f''(x) = - \cos(\sin(x)) \cos^2(x) + \sin(\sin(x)) \sin(x) $$
So
$$ f''(x) = - f(x) \cos^2(x) - f'(x) \tan(x) $$
Assume $f(x)$ has Maclaurin series $\sum a_n x^n$, and denote the Maclaurin series expansions
$$ - \cos^2(x) = \sum b_n x^n \qquad -\tan(x) = \sum c_n x^n $$
the relation gives
$$ \sum (n+2)(n+1) a_{n+2} x^n = \sum a_n b_m x^{n+m} + \sum (n+1)a_{n+1} c_m x^{n+m} $$
Setting the coefficients equal to each other you have
$$  a_{n+2} = \frac{1}{(n+1)(n+2)}\sum_{m = 0}^n  (a_m b_{n-m} + (m+1) a_{m+1} c_{n-m}) $$
So if you know what $a_0$ and $a_1$ are, you can use this formula to compute successively the higher order $a_n$s, provided you know the coefficients $b_n$ and $c_n$. (This is essentially the procedure you described in your post.) 
(Notice that $a_0 = f(0) = \cos(0) = 1$ and $a_1 = f'(0) = 0$. In fact, since $f(x)$ is an even function of $x$, we know that its Maclaurin expansion should have no odd terms.)
The only thing that is not so convenient for this procedure, however, is the fact that the explicit formula for the Maclaurin coefficients of $\tan(x)$ is somewhat obscure. 
