Replacing $q^2$ by $q$

51 Views Asked by At

I have a rather strange question. Suppose we are given a formal power series $$S(q^2) = \sum_{n = 0}^\infty a_n q^{2n}.$$ I wish to replace $q^2$ by $q$. This implies that $S(q) = \sum_{n = 0}^\infty a_n q^n$. For example, replacing $q^2$ by $q$ in $$\sum_{n = 0}^\infty n^2 q^{2n} = \frac{q^2 (1 + q^2)}{(1 - q^2)^3}, \quad |q| < 1$$ leads to $$\sum_{n = 0}^\infty n^2 q^n = \frac{q (1 + q)}{(1 - q)^3}, \quad |q| < 1.$$

My question is: How do I make the statement "replace $q^2$ by $q$" precise and mathematically sound? I think replacing $q^2$ to $q$ is a valid operation. But, apparently, saying "replace $q^2$ by $q$" is ambiguous because if $f$ and $g$ are some arbitrary functions, then, in general, $f(q^2) = g(q^2)$ does not imply $f(q) = g(q)$.