#10982: symbolic derivatives should be able to have non-variable arguments
---------------------------------------------------------+------------------
       Reporter:  casamayou                              |         Owner:  
burcin  
           Type:  defect                                 |        Status:  new  
   
       Priority:  minor                                  |     Milestone:  
sage-5.1
      Component:  calculus                               |    Resolution:       
   
       Keywords:  simplify, maxima, symbolic derivative  |   Work issues:       
   
Report Upstream:  N/A                                    |     Reviewers:       
   
        Authors:                                         |     Merged in:       
   
   Dependencies:                                         |      Stopgaps:       
   
---------------------------------------------------------+------------------

Comment (by dsm):

 This seems to work for me in 5.0:

 {{{

 sage: x, y, r, t = var('x, y, r, t')
 sage: f = function('f', x, y)
 sage: F = f(x = r*cos(t), y = r*sin(t))
 sage: d = (diff(F,r,2) + diff(F,t,2)/r**2 + diff(F,r)/r)
 sage: d.simplify()
 (sin(t)*D[1, 1](f)(r*cos(t), r*sin(t)) + cos(t)*D[0, 1](f)(r*cos(t),
 r*sin(t)))*sin(t) + (sin(t)*D[0, 1](f)(r*cos(t), r*sin(t)) + cos(t)*D[0,
 0](f)(r*cos(t), r*sin(t)))*cos(t) + (sin(t)*D[1](f)(r*cos(t), r*sin(t)) +
 cos(t)*D[0](f)(r*cos(t), r*sin(t)))/r - ((r*sin(t)*D[0, 1](f)(r*cos(t),
 r*sin(t)) - r*cos(t)*D[1, 1](f)(r*cos(t), r*sin(t)))*r*cos(t) -
 (r*sin(t)*D[0, 0](f)(r*cos(t), r*sin(t)) - r*cos(t)*D[0, 1](f)(r*cos(t),
 r*sin(t)))*r*sin(t) + r*sin(t)*D[1](f)(r*cos(t), r*sin(t)) +
 r*cos(t)*D[0](f)(r*cos(t), r*sin(t)))/r^2
 sage: d.simplify_full()
 D[0, 0](f)(r*cos(t), r*sin(t)) + D[1, 1](f)(r*cos(t), r*sin(t))
 sage: diff(F,r).simplify()
 sin(t)*D[1](f)(r*cos(t), r*sin(t)) + cos(t)*D[0](f)(r*cos(t), r*sin(t))
 sage: diff(F,r).simplify_full()
 sin(t)*D[1](f)(r*cos(t), r*sin(t)) + cos(t)*D[0](f)(r*cos(t), r*sin(t))
 }}}


 Although I'm too lazy to bisect to find out when it started working again,
 it'd probably be a good idea to add a doctest to make sure that it stays
 that way.  Not quite sure where to put it, though.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10982#comment:7>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to