Ask Your Question

Revision history [back]

This is definitely a bug; I reported it as trac ticket #28207.

As a workaround, you can plot the derivative manually:

sage: f(x) = piecewise([((-oo, -1), 0), ((-1, 1), exp(-1/(1 - x^2))), ((1, oo), 0)])
sage: df(x) = piecewise([((-oo,-1), 0), ((-1,1), diff(exp(-1/(1 - x^2)), x)), ((1,oo), 0)])
sage: plot(df, (x,-2,2))

derivative of bump function

For linear combinations, you can use linearity of the derivative (as a workaround).