answered 11 years ago
The code does not show up correctly, trying again:
g=function('g', x) h=function('h', x) dg = g.diff(x) dg sage output: D[0](g)(x) dg.subs(g==h*x) sage output: D[0](g)(x)