Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

A suggestion: convert to a string, use string method replace and reconvert to a sage expression.

F = function('F',x)
print diff(F(2*x))
f = function('f',x)
f(x) = sage_eval(str(diff(F(2*x))).replace('D[0](F)','f'),locals={'x':x,'f':f})
f(x)