Finding the Maclaurin series of $e^{\sin x}$ by comparing coefficients
In this thread, Bernard showed how to find the Maclaurin series of $e^{\sin(x)}$ by differentiating it to give $\cos(x)e^{\sin(x)}$. I try to emulate this method to find the series expansion of $e^{\cos(x)}$. I differentiate it to obtain $-\sin(x)e^{\cos(x)}$.
The series for $-\sin(x)=-x+\dfrac{x^3}{3!}-\dfrac{x^5}{5!}+\dfrac{x^7}{7!}-\dfrac{x^9}{9!}+\dfrac{x^{11}}{11!}-\dfrac{x^{13}}{13!}+O(x^{15})$
If $e^{\cos(x)}$ has a series representation, suppose that it has the form:
$a+bx+cx^2+dx^3+ex^4+fx^5+gx^6+O(x^7)$
Differentiate this series we have:
$-\sin(x)e^{\cos(x)}= 0+b+2cx+3dx^2+4ex^3+5fx^4+6gx^5+7hx^6+8ix^7\tag{1}\label{eq:1}$
Multiply $e^{\cos(x)}$ with $-\sin(x)$, we obtain the series:
$a+(b-a)x+(c-b)x^2+(d-c+\dfrac{a}{6})x^3+(e-d+\dfrac{b}{6})x^4+(f+\dfrac{a}{120}+\dfrac{c}{6})x^5+(g+f+\dfrac{d}{6}-\dfrac{b}{120})x^6+O(x^7)\tag{2}\label{eq:2}$
Equate (\ref{eq:1}) and (\ref{eq:2}), we have:
$b+2cx+3dx^2+4ex^3+5fx^4+6gx^5+7hx^6+8ix^7=a+(b-a)x+(c-b)x^2+(d-c+\dfrac{a}{6})x^3+(e-d+\dfrac{b}{6})x^4+(f+\dfrac{a}{120}+\dfrac{c}{6})x^5+(g+f+\dfrac{d}{6}-\dfrac{b}{120})x^6+O(x^7)$
Two infinite series are equal if all their coefficients are equal to each other:
So equating the coefficients of the series on the left hand side with the right hand side, we have: $a=b$. When $x=0$,$e^{\cos(x)}=e, f(x)=a$ implies $a=e$ and $b=e$
Here is what starts to break down completely:
$b-a=2c$
$c-b=3d$
$d-c+\dfrac{a}{6}=4e$
$e-d+\dfrac{b}{6}=5f$
$f+\dfrac{a}{120}+\dfrac{c}{6}=6g$
$g-f+\dfrac{d}{6}-\dfrac{b}{120}=7h$
From there, I got $c=0$, which is a wrong answer.
Wolfram gives the series representation of $e^{\cos(x)}$ as followed:
$e-\dfrac{ex^2}{2}+\dfrac{ex^4}{6}+\dfrac{31e^6}{720}+...$
Why does this method work for Bernard's answer to $e^{\sin(x)}$ but fail to work for $e^{\cos(x)}$? What did I do wrong?

Multiply $e^{\cos x}$ with $-\sin x$ to get $\left(a+bx+cx^2+...\right)\left(-x+\dfrac{x^3}{3!}...\right)=-ax-bx^2...,$
and then set $-ax-bx^2...=b+2cx+3dx^2+...$ to get $b=0, -a=2c, d=0,...$
so $e^{\cos x}=a-\dfrac a2 x^2...$, and from evaluation at $x=0$ note that $a=e$.