On Apr 1, 2:34 pm, Michael Orlitzky <mich...@orlitzky.com> wrote: > Substitution doesn't even work pre-evaluation: > > sage: f = function('f', x) > sage: f_prime = f.diff(x) > sage: g = function('g', x) > sage: f_prime.substitute_function(f,g) > D[0](f)(x)
That's because you're trying to substitute expressions, not functions: sage: f,g (f(x), g(x)) For that, you would have to use a different substitution function and it wouldn't have any effect anyway because the expression f(x) does not occur in f_prime. If you fix this, the substitution does work: sage: f = f.operator() sage: g = g.operator() sage: f,g (f, g) sage: f_prime.substitute_function(f,g) D[0](g)(x) There is a different issue, which is fixed by http://trac.sagemath.org/sage_trac/ticket/12801 -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org