Derive taylor series of $e^{\sin(x)}$ in two different ways I need to find the Taylor series of $e^{\sin(x)}$ up to $x^4$ in two different ways. First I derived it by calculating the derivatives of the function, and I found the answer $P_4(x) = 1+x+ \frac{x^2}{2} - \frac{x^4}{8}$. Now I need to use the Taylor series of $e^y$ and plug in the Taylor series of $\sin(x)$ to find an answer. After that I need to draw a conclusion. So I know the Taylor series of $e^y$ up to $y^4$ looks like $P_4(y) = 1 + y + \frac{y^2}{2} + \frac{y^3}{6} + \frac{y^4}{24}$ and the Taylor series of $\sin(x)$ up to $x^4$ looks like $P_4(x) = x - \frac{x^3}{6}$. I substituted the Taylor series of $\sin(x)$ into the $y$ variable of the Taylor series of $e^y$, but it doesn't give me the same answer as the answer I got by using the first four derivates of $e^{\sin(x)}$. Am I doing anything wrong?
 A: After computing$$1+\left(x-\frac{x^3}6\right)+\frac12\left(x-\frac{x^3}6\right)^2+\frac16\left(x-\frac{x^3}6\right)^3+\frac1{24}\left(x-\frac{x^3}6\right)^4$$you must eliminate the monomials whose degree is greater than $4$. And then you will get the same answer as before.
A: Let $e^{\sin x}=\sum_{r=0}^\infty a_rx^r$
$\sin x=\ln(\sum_{r=0}^\infty a_rx^r)$
Differentiate both sides with respect to $x$
$\cos x(\sum_{r=0}^\infty a_rx^r)=\sum_{r=1}^\infty a_rrx^{r-1}$
Expand $\cos x$ and compare the constant and the coefficients of $x,x^2,x^3,x^4$ to find $a_r,0\le r\le4$
A: Let
\begin{equation*}
D(x)=\sum_{k=0}^\infty d_kx^k
\end{equation*}
be a power series expansion. Then the function $E(x)=e^{D(x)}$ has the power series expansion
\begin{equation*}
E(x)=\sum_{k=0}^\infty e_kx^k,
\end{equation*}
where the coefficients $e_k$ for $k\in\{0\}\cup\mathbb{N}$ satisfy
\begin{align}
e_0&=e^{d_0},\\
e_k&=\frac1k\sum_{\ell=1}^k\ell d_\ell e_{k-\ell}
=\frac1k\sum_{\ell=0}^{k-1}(k-\ell)d_{k-\ell}e_{\ell},\quad k\in\mathbb{N},\\
e_n&=e^{d_0}\left(d_n+\sum_{j=1}^{n-1}\sum_{\substack{\sum_{i=0}^jm_i=n,\\ m_i\ge1, 0\le i\le j}} \prod_{i=0}^j\frac{m_id_{m_i}}{n-\sum_{q=0}^{i-1}m_q}\right), \quad n\in\mathbb{N},
\end{align}
and
\begin{equation}\label{alpha-k-power-eq}
e_k= e^{d_0}\sum_{j=1}^k\frac1{j!} \sum_{\substack{\sum_{\ell=1}^ji_\ell=k,\\ i_\ell\ge1,1\le\ell\le j}} \prod_{\ell=1}^jd_{i_\ell}, \quad k\in\mathbb{N}.
\end{equation}
These conclusions can be found in the paper [1] below.
[1] Feng Qi, Xiao-Ting Shi, and Fang-Fang Liu, Expansions of the exponential and the logarithm of power series and applications, Arabian Journal of Mathematics 6 (2017), no. 2, 95--108; available online at https://doi.org/10.1007/s40065-017-0166-4.
Consequently, we finally can obtain
$$
\exp(\sin x)=1+x+\frac{x^2}{2}-\frac{x^4}{8}-\frac{x^5}{15}-\frac{x^6}{240}+\frac{x^7}{90}+\frac{31 x^8}{5760}+\frac{x^9}{5670}-\frac{2951 x^{10}}{3628800}-\frac{x^{11}}{3150}+\dotsm.
$$
