Taylor expansion of $p(x^2)$ This might be a very simple question but let's say I have a function $p(x^2)$ and want to find a Taylor expansion of this function around $x_0=0$ with degree 3. I will of course use my Taylor expansion but since I have $p(x^2)$ am I then allowed to do this? I.e.
$$T_{3}p(x^2)=\sum_{k=0}^{3}\frac{p^{(k)}(0^2)}{k!}(x^2)^k$$
Because if I do this I will get a correct result as follows,
$$T_{3}p(x^2)=p(0)+p'(0)x^2+\frac{p''(0)x^4}{2}+\frac{p^{(3)}(0)x^6}{6}$$
But if I use the following, I will get a wrong answer.
$$T_{3}p(x^2)=\sum_{k=0}^{3}\frac{p^{(k)}(0^2)}{k!}x^k$$
Thanks in advance.
 A: Computing directly, the Taylor series of $f(x)=p(x^2)$ is
$$
T_{\infty}f(x) = \sum_{n=0}^{\infty}\frac{f^{(n)}(0)}{n!}x^n,
$$
and
\begin{align}
f^{(0)}(0)&=p(0)\\
\frac{d}{dx}p(x^2) &= \left.2xp'(x^2)\right|_{x=0} = 0\\
\frac{1}{2!}\frac{d^2}{dx^2}p(x^2) &= \left.p'(x^2)+2x^2p''(x)\right|_{x=0}=p'(0)\\
\frac{1}{3!}\frac{d^3}{dx^3}p(x^2) &= \left.2xp'(x^2)+\frac{8}{6}x^3p^{(3)}(x)\right|_{x=0}=0\\
\frac{1}{4!}\frac{d^4}{dx^4}p(x^2) &= \left.\frac{1}{2}p'(x^2)+2x^2p^{(3)}(x)+16x^4p^{(4)}=\frac{1}{2!}p''(0)(x)\right|_{x=0}.
\end{align}
If we continue this pattern, we can see that this Taylor series exactly matches the expression arrived at when we compute the Taylor series of $p(x)$ first, and then evaluate it at $x\to x^2$.

This shows that both methods of computing the Taylor series of $p(x^2)$ yield the same expression. A little more rigorously, let $R$ be the radius of convergence of the Taylor series of $p(x)$. Then as long as $x^2<R$, we can plug in $x^2$ to the Taylor series, and it will still converge and be equal to $x^2$ plugged into the left-hand side, i.e., $p(x)\to p(x^2)$.
