On Jul 18, 2009, at 5:00 PM, Tim Lahey wrote: > On Jul 18, 2009, at 7:49 PM, Jason Grout wrote: > >> >> Burcin Erocal wrote: >> >>> I attached a patch to the trac ticket that contains an initial >>> attempt >>> at the MMA notation: >>> >>> http://trac.sagemath.org/sage_trac/ticket/6344 >> >> FYI, a few days ago Burcin uploaded a new patch on 6344 and asked for >> review. Here are the examples: >> >> OLD: >> >> sage: var('x,y') >> sage: f = function('f') >> sage: f(x).derivative(x) >> D[0](f)(x) >> sage: f(x,x).derivative(x,2) >> D[0, 0](f)(x, x) + 2*D[0, 1](f)(x, x) + D[1, 1](f)(x, x) >> >> >> NEW: >> >> sage: f(x).derivative(x) >> D[1](f)(x) >> sage: f(x,x).derivative(x,2) >> D[2, 0](f)(x, x) + 2*D[1, 1](f)(x, x) + D[0, 2](f)(x, x) >> >> NEW LATEX: >> >> sage: latex(f(x).derivative(x)) >> f'\left(x\right) >> sage: latex(f(x,x).derivative(x,2)) >> f^{(2,0)}\left(x, x\right) + 2 \, f^{(1,1)}\left(x, x\right) + >> f^{(0,2)}\left(x, x\right) > > Is standard partial derivative notation going to be used ever? > Say in latex(f(x,y).derivative(x,2))? > > Also, is it possible to have some intelligence on when to use > \left and \right? Certainly for (x) they aren't really needed. > >> If you have an issue with the above printing, please speak now!
Just a sec, I thought we were going to move away from the D[i,j,...] notation for text as well as latex, and it my mind sage: f(x,y).derivative(x,2) is much more evocative of (df/dx^2)(x,y) than as used above. Golam brings up a good point about paste-ability as well, and though this could be fixed by introducing a D object with __getitem__ I would much prefer the default to be the admittedly less powerful but much more intuitive diff(f(x), x) and df/dx notations. - Robert --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---