#17445: Missing documentation of derivative operator/notation
-------------------------------+------------------------
       Reporter:  schymans     |        Owner:
           Type:  enhancement  |       Status:  new
       Priority:  major        |    Milestone:  sage-6.5
      Component:  symbolics    |   Resolution:
       Keywords:               |    Merged in:
        Authors:  schymans     |    Reviewers:
Report Upstream:  N/A          |  Work issues:
         Branch:               |       Commit:
   Dependencies:               |     Stopgaps:
-------------------------------+------------------------

Comment (by nbruin):

 Replying to [comment:10 schymans]:
 > I would much prefer this behaviour:
 > {{{
 > sage: f.diff(x,y) == f.diff(y,x)
 > f.diff(x,y) == f.diff(y,x)
 > }}}
 >
 > It would be unambiguous and shorter. What is the advantage of the
 D-notation again?
 Please write `f(x,y)` there so that it's clear you're differentiating an
 expression, not a function:
 {{{
 sage: var('x,y')
 (x, y)
 sage: f=function('f')
 sage: f.diff(x,y)
 AttributeError: 'NewSymbolicFunction' object has no attribute 'diff'
 }}}
 The advantage is that you can actually represent evaluations of the
 derivative:
 {{{
 sage: f(x,y).diff(x,y).subs(x=2,y=3)
 D[0, 1](f)(2, 3)
 }}}
 Would you propose to print that as the (admittedly shorter) `f.diff(2,3)`?
 It's absolutely possible to print `f(x,y).diff(x,y)` for `D[0,1](f)(x,y)`
 because at some point we can see we have an expression with an operator
 that is an `FDerivativeOperator`, and where the arguments form a list of
 distinct symbolic variables. But we have to print `D[0,1](f)(t,t^2)`.
 Printing `f.diff(t,t^2)` is just something else entirely.

--
Ticket URL: <http://trac.sagemath.org/ticket/17445#comment:13>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to