Maclaurin series of $f(g(x))$ I was doing some exercise about Maclaurin expansion when I notice something, I used to remember the series formula of some common functions with $x$ as argument, but when I had to calculate the expansion for the same function but with $x^2$ as argument, for example, I always recalculate the series from scratch.
Then I started to realise that I could have just substituted $x$ with $x^2$. So is it wrong to say that, given a polynomial function $P(x)$ which represent the series of Maclaurin for a function $f(x)$, the series of Maclaurin for $f(g(x))$ is equal to $P(g(x))$ when $g(x)$ approach to $0$? 
If it's not completely wrong can you give me some hints in order to understand when it's correct?
 A: If $P$ converges within the disc $|x|<R$, then substituting $g(x)$ into the argument of $P$ changes the disc into $|g(x)|<R$. As long as this is obeyed, $P(g(x))$ converges.
A: The most important point here is that each function has a unique Taylor Series at a each point in its domain.  You might find different ways to write the same series, but in the end the forms are really the same. In your case, this means that both a substitution and a direct calculation will give the valid Taylor Series (though the series might look a bit different).
Moreover, as pointed out prior, you will have to be careful about where your new series converges when you substitute. Always ensure you are in the disk of convergence for your new series when you substitute.
A: As always,
for this type of question
on generating functions,
the book "generatingfunctionology"
is a great reference.
It can be downloaded for free here:
https://www.math.upenn.edu/~wilf/DownldGF.html
A: Check out page 66 of Serge Lang's complex analysis textbook (4th edition).
He states and proves a theorem which tells you sufficient conditions for composing two power series formally (making no allusions to the analytic properties of the series).
In addition to the radius of convergence conditions alluded to in answers above, the odd requirement is that the inner series, $h$ in
$$
f(h(x))=g(x)
$$
has constant term zero. 
