#15021: Return unevaluated derivative from BuiltinFunction
-------------------------------+------------------------
       Reporter:  eviatarbach  |        Owner:
           Type:  defect       |       Status:  new
       Priority:  major        |    Milestone:  sage-6.4
      Component:  symbolics    |   Resolution:
       Keywords:               |    Merged in:
        Authors:               |    Reviewers:
Report Upstream:  N/A          |  Work issues:
         Branch:               |       Commit:
   Dependencies:               |     Stopgaps:
-------------------------------+------------------------

Comment (by nbruin):

 This issue was discussed before. We have the functionality in
 `FDerivativeOperator`, it's just not available on top level or as a method
 on BuiltinFunction instances:

 [http://permalink.gmane.org/gmane.comp.mathematics.sage.devel/58041]

 I thought this stuff was on trac somewhere already, but I cannot find it
 presently. For archival purposes:

 {{{
 from sage.symbolic.operators import FDerivativeOperator
 class Doperator:
     def __init__(self,vars=None):
         self.vars= [] if vars is None else vars

     def __call__(self,f):
         return FDerivativeOperator(f,self.vars)

     def __getitem__(self,i):
         if isinstance(i,tuple):
             newvars=self.vars+list(i)
         else:
             newvars=self.vars+[i]
         return Doperator(newvars)

 D=Doperator()
 }}}

 With that code one can input the form that sage prints:
 {{{
 sage: var('x,y')
 sage: D[0](f)(x, y)/x + D[0, 1](f)(x, y)
 D[0](f)(x, y)/x + D[0, 1](f)(x, y)
 }}}

 Input will never be in Leibnitz notation, since unevaluated functions do
 not have names for their parameters, just position numbers for them.

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