# Taylor series of a taylor series: why can we do this?

Suppose we have two functions with the following Taylor series: $$sin(x) = x-x^3/3!+x^5/5!+O(x^6)$$ $$e^x = 1+x+x^2/2+x^3/3!+x^4/4!+x^5/5!+O(x^6)$$ I know, by intuition and because that's what we got taught, that if I want to compute the taylor series of $e^{sin(x)}$, I just have to plug in the first series into the second, and the I can cut of the higher exponent to get that $$e^{sin(x)} = 1+x+x^2/2-x^4/8-x^5/15+O(x^6)$$ Now my question is: why can we do this? I do not find it clear at all why an infinite series plugged into an infinite series could be handled this nicely. Does it have something to do with the uniqueness of Taylor expansion?

We can only do this because $\sin x$ evaluates to $0$ at $x = 0$. If we want to expand $e^{\cos x}$ at $x = 0$ for example, we must then use the expansion of $e^x$ at $x = \cos 0 = 1$
• Uh. $e^x$ evaluates to $1$ at $x=0$... – Dan Uznanski Jan 15 '15 at 21:06