On Sep 28, 11:30 am, Tim Lahey <tim.la...@gmail.com> wrote: > > sage: f = function('f',t) > > sage: h = f.diff(t,1) > > sage: h.subs(t=0) > > D[0](f)(0) > > Based upon what I recall about the D notation, that's the derivative > of f(t) evaluated at t = 0. The f(0) tells where it's evaluated at and > the D[0] indicates that it's the derivative with respect to the first > argument. I hate the notation and the change to it is why I don't really > use Sage anymore. I find it difficult to parse, and I want notation I > can use with my committee and supervisor, but I seem to have lost that > argument.
Would you have suggestions for printing derivatives using partials? I think the main problem here is that one needs to "name" the formal variables, whereas mathematical notation otherwise identifies arguments by position. For instance, suppose we have a function f(x,y) for which we want to evaluate the derivative with respect to x at the point (x,y)=(x0,y0). Using partials, we'd need $$\left . \frac{\partial f}{\partial x} \right |_{(x,y)=(x0,y0)}$$ As you see, one has to "introduce" local variables x and y and bind them. In this particular case, there would be little confusion if we were to write instead $\frac{\partial f}{\partial x}(x0,y0)$, but this would already get much less clear if we would want to evaluate at $(x,y)= (y0,x0)$. What we could do, but this still looks funny, is be explicit about the variable names and write $$\left . \frac{\partial f(x_0,x_1,x_2}{\partial x_0} \right |_ {(x_0,x_1,x_2)=(a,b,c)}$$ That is at least an unambiguous way of writing $(D[0]f)(a,b,c)$. Perhaps with some heuristic rules, one could cut down on some of these elements if the formula is sufficiently simple. Do other programs produce easier to read derivatives while guaranteeing that the representation they produce is unambiguous? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---