1 | initial version |
Yes, for example using callable symbolic expressions:
sage: f(x) = x^3
sage: g(x) = sin(x)+1
sage: f(g(x)).expand()
sin(x)^3 + 3*sin(x)^2 + 3*sin(x) + 1
Or using expression substitution:
sage: f = x^3
sage: g = sin(x)+1
sage: f.subs({x : g}).expand()
sin(x)^3 + 3*sin(x)^2 + 3*sin(x) + 1