TITLE: Substituting for Taylor series
QUESTION [18 upvotes]: So my question is simple:
Why is substitution valid? I mean it seems counter-intuitive to me mainly because of the chain rule.
For example: 
The Taylor series of $e^{x^2}$  is  simply done by substituting $x^2$ wherever $x$ goes in the original sum of the Taylor series for $e^x$.
But if I do the Taylor series manually for the function $e^{x^2}$  I have to apply the chain rule and so I get other terms and it's not immediately obvious to me why it is that the same series comes up.
For what reason is this substitution valid? Thanks.

REPLY [2 votes]: We know that for any real number $x,$
$$e^x=\sum_{n=0}^{\infty}\frac{x^n}{n!}.$$
Now if $x$ is a real number, then so is $x^2!$ It follows that
$$\tag 1 e^{x^2}=\sum_{n=0}^{\infty}\frac{(x^2)^n}{n!} = \sum_{n=0}^{\infty}\frac{x^{2n}}{n!}.$$
We didn't use the word "substitution" or say "let $u$ equal …" anywhere. That's all that is going on here.
How do we know $(1)$ is the Taylor series of $e^{x^2}$ at $0?$ That follows from this theorem: Suppose $f(x)=\sum_{n=0}^{\infty} a_nx^n,$ where the power series converges in $(-r,r)$ for some $r>0.$ Then $f$ is infinitely differentiable in $(-r,r),$ and $a_n = D^nf(0)/n!$ for all $n.$
Now to your comment on this easy approach vs. the long awful slog of computing the Taylor coefficients of $e^{x^2}$ by hand: I'm not sure why you're bothered by this. It is just one of many examples of a problem that has two solutions, one simple and direct, the other long, difficult, and possibly tedious. Happens all the time.