Consider the two vector-valued functions \begin{align} &f(x,y)=(x+y^2, y+x^3) \\ & g(x,y)=(2x+y^3, 2y+x^4). \end{align} Then \begin{align} f(g(x,y))&=((2x+y^3)+(2y+x^4)^2,(2y+x^4)+(2x+y^3)^3) \\ &= (2x+4y^2+y^3+4x^4y+x^8, 2y+8x^3+x^4+12x^2y^3+6xy^6+y^{27}) \end{align} gives vector substitution $f \circ g$.
By vector-substitution, I mean the vector composition $f \circ g=(f_1(g_1(x,y),g_2(x,y)), f_2(g_1(x,y),g_2(x,y))$, where $f(x,y)=(f_1(x,y),f_2(x,y))$ and $g(x,y)=(g_1(x,y),g_2(x,y))$.
Can you please suggest some computer algebra code (e.g., PARI/GP, SAGE, SymPy etc.) doing the above operation?
If it were one-variable functions like $f(x)=\sum_{i=1}^n a_ix^n$ and $g(x)=\sum_{j=1}^{m}b_jx^j$, then PARI/GP function subst(f,x,g) would compute $f \circ g$.
But in our case, these are vector-valued functions.
Indeed, I want to find some non-trivial $g(x,y)=(\cdots, \cdots)$ that commutes with $f(x,y)=(x+y^2, y+x^3)$.
With GIAC you can do:
This gives:
GIAC is the general purpose symbolic algebra software powering the graphical interface Xcas. It is certainly possible to use it online, but I didn't search the website.
Personally, I use it in R with the help of the R package giacR: