#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:
-------------------------------+------------------------

Old description:

> Taking the derivative of a symbolic function returns the D-notation:
> sage: var('x y z')
> sage: f(x) = function('f',x,y,z);
> sage: f(x).diff(x,y)
> D[0, 1](f)(x, y, z)
>
> Unfortunately, the meaning of this notation is not documented anywhere,
> neither in diff(), nor in derivative() nor in function(). There is a ton
> of tickets about improving ambiguities and malfunctions related to this
> notation, but it would be very helpful to at least document how it is
> supposed to work and what it means if a user sees output as above.
>
> See here for related tickets:
> * #6344
> * #6480
> * #6756
> * #12796
>
> and this discussion:
> https://groups.google.com/forum/#!topic/sage-devel/_xD5lymnTuo

New description:

 Taking the derivative of a symbolic function returns the D-notation:
 sage: var('x y z')
 sage: f(x) = function('f',x,y,z);
 sage: f(x).diff(x,y)
 D[0, 1](f)(x, y, z)

 Unfortunately, the meaning of this notation is not documented anywhere,
 neither in diff(), nor in derivative() nor in function(). There is a ton
 of tickets about improving ambiguities and malfunctions related to this
 notation, but it would be very helpful to at least document how it is
 supposed to work and what it means if a user sees output as above.

 See here for related tickets:
 * #6344
 * #6480
 * #6756
 * #12796
 * #7401 (similar topic, not same issue)

 and this discussion:
 https://groups.google.com/forum/#!topic/sage-devel/_xD5lymnTuo

--

Comment (by kcrisman):

 Can you comment on some of the chain-rule type issues in #6480, then?  I
 have to say that in particular the stuff at
 http://ask.sagemath.org/question/9932/how-to-substitute-a-function-within-
 derivatives/ and #6480 is massively confusing.  Heck, let's add #7401
 while we're at it.

 I don't even know whether ''any'' of those things are "really" right or
 wrong at this point.   I suppose you shouldn't be allowed to substitute in
 a function that "isn't there" in 6 and 7, but then why does 8 "work"?  In
 any case, shouldn't there be an error raised if one attempts something
 like this when it's not "legitimate"?
 {{{
 # 6. Fails.
 x = var('x')
 f = function('f', x)
 g = function('g', x)
 p = f.diff()
 print p.substitute_function(f, g) # Outputs "D[0](f)(x)"

 # 7. Fails.
 x = var('x')
 f = function('f', x)
 g = function('g', x)
 p = f.diff()
 print p.substitute_function(f(x), g(x)) # Outputs "D[0](f)(x)"

 # 8. Works.
 x = var('x')
 f = function('f')
 g = function('g')
 p = f(x).diff()
 print p.substitute_function(f, g) # Outputs "D[0](g)(x)"
 }}}
 These are ''very'' subtle differences to anyone who is not in symbolic
 algebra/expressions, and part of the issue is the difference between
 expressions and functions, no doubt.  So comment:1 is a good start, but
 definitely only a start.

--
Ticket URL: <http://trac.sagemath.org/ticket/17445#comment:4>
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