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.
If you have $\displaystyle f(x)=\sum_{n=0}^\infty a_n x^n$ for any $x\in (-r,r)$ then you have the same equality for $f(x^2), x\in(-\sqrt{r},\sqrt{r}),$ for $f(\sqrt{x}) ,x\in(-r^2,r^2),$ $\cdots$ It is just a change of the name of the variable. The only important thing is that the new variable belongs to the domain where equality holds.
Of course, you can get the Taylor series of $f(x^2)$ or $f(\sqrt{x})$ (if it exists, in the second case), but if you know the Taylor series of $f(x)$ is just to make a substitution.