TITLE: When is Taylor series substitution valid?
QUESTION [6 upvotes]: Given that the Maclaurin series for $g(x) = \frac{1}{1+x}$ is $1 - x + x^2 - x^3 + x^4 ... $, I'm told that the Maclaurin series for $\frac{1}{1+x^2}$ is $1 - x^2 + x^4 - x^6 ... $, by substituting in $x^2$.
What I'm confused about is why this is valid for this case specifically and what rules govern when you can and can't do something like this -- for example, you couldn't do it with the series for $x$ itself and substitute in, say, $cos(x) = x$, right?

REPLY [6 votes]: The point is that
$$
\sum_{n=0}^{\infty}  x^n= \frac{1}{1-x}
$$
for all $\lvert x\rvert < 1$. So, whenever $x$ is something that has an absolute value less than $1$, then you have this equality. If you replace $x$ by $x^2$, then
$$
\sum_{n=0}^{\infty}  (x^2)^n = \frac{1}{1-x^2}
$$
and this is true when $\lvert x^2\rvert < 1$. You also have
$$
\sum_{n=0}^{\infty}  (\cos(x))^n = \frac{1}{1 - \cos(x)}
$$
for all $x$ such that $\lvert \cos(x)\rvert < 1$.
And you have
$$
\sum_{n=0}^{\infty}  (-x)^n = \frac{1}{1 + x}
$$
for all $x$ where $\lvert -x\rvert = \lvert x \rvert < 1$ (This is the series that you are considering. These all "come from" the first series.