Hello, Is there a way in Sage to express the derivative at one point of a "formal" function?
I mean: something equivalent to "at(diff(f(x),x), x=123);" in Maxima or "eval(diff(f(x),x), x=123);" or "D(f)(123);" in Maple or "D[f [x],x]/.x->123" or "Derivative[1][f][123]" in Mathematica. For instance, the following does not work: f=function('f',x) g=(f(x)).function(x) h=derivative(g) h(0) because Sage sends to Maxima "diff('f(0), 0, 1)" and, of course, Maxima complains ("Maxima ERROR: Non-variable 2nd argument to diff:"). Of course, if f is explicitly known (e.g. with "f(x):=1+x^2"), there is no problem. Actually, I would like to be able to show with Sage that f(x+a)+f(x- a)-2*f(x) is f''(x) at the first nonvanishing order in a, but it is still far away from working: Sage's "taylor" does not work with a "formal" function, and, even though Maxima does slightly better, it's not enough: for "taylor(f(x-a),a,0,2);", Maxima's result involves "d/ da f(x-a) |a=0", while further simplification to -f'(x) would be needed. Thanks for your help, Christophe Deroulers University Paris Diderot-Paris 7, Physics Department --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---